Skip to content

Conversation

@rane-rajasi
Copy link
Contributor

@rane-rajasi rane-rajasi commented Mar 10, 2025

Implements support for Azure Linux machines via TDNF package manager

Changes implemented:

[x] TDNF package manager
[x] ConfigurePatching operation
[x] Auto Assessment operation
[x] Assessment operation
[x] Installation operation
[x] UTs
[x] Disabling Auto OS updates
[x] Selecting latest package version if multiple are available

Tests:

[x] On demand Installation success with all classifications selected:
        > 26.core.log
[x] Auto assessment, recurring on schedule
        > 3.aa.core.log
        > 3.core.log
        > 3 - Copy.status.txt
[x] Only Package inclusions installed
        > patchesToInclude': ['dracut*']
        > 1.core.log
        > 1 - Copy.status.txt
[x] With package exclusions
        > Excluding patches': ['openssh*', 'hyperv*', 'openssl*', 'systemd*']
        > 2.core.log
        > 2 - Copy.status.txt
[x] with Dependent packages
        > Requested hyperv-daemons-license which has dependencies: 'hyperv-daemons.x86_64', 'hypervfcopyd.x86_64', 'hypervkvpd.x86_64', 'hypervvssd.x86_64' and all 5 are installed
        > 3.core.log
        > 3 - Copy.status.txt
[x] Excluding a package because its dependency needs to be excluded
        > Excluded openssl-libs which is a dependent package of openssl. Hence both openssl and openssl-libs not installed
        > 5.core.log
        > 5 - Copy.status.txt
[x] Auto Patching request with only security and critical updates in request, which should install all classifications
        > 10.core.log
        > 10 - Copy.status.txt
[x] Logs for disabling auto OS (machine default) updates
        1. Machine default updates service installed but NOT enabled
                > Expected output: ConfigurePatching successfully reads and logs that auto OS updates are installed but disabled. No action is taken to disable them
                > 15.core.log
                > 15 - Copy.status.txt
        2. Machine default updates service NOT installed
                > Expected output: ConfigurePatching successfully reads and logs that auto OS updates are NOT installed and marks them as disabled. No action taken to disable them
                > 37.core.log
                > 37 - Copy.status.txt
        3. Machine default updates service installed and enabled
                > Expected output: ConfigurePatching successfully reads and logs that auto OS updates are installed and enabled and disables them. Action taken to disable auto OS updates
                > 17.core.log
                > 17 - Copy.status.txt
[x] Selecting latest package version if multiple are available
        1. Assessment logs where latest version is selected for multiple patches
                > 1.core.log
                > 1 - Copy(2).status.txt

Test Matrix

Concern about Azure Linux behavior:

[x] Kernel packages still show up as pending despite being installed. See cmd output below
image
cmd: 'sudo tdnf list installed kernel' lists all installed versions of 'kernel' on the VM and 'sudo tdnf list updates' lists all 'kernel' versions available to update. Even though we have the latest kernel version '6.6.78.1-3.az13' installed on the machine, it still shows up under patches to be updated. This affects Auto Patching since this patch will also show up in assessment results even after being installed. This is not a bug in our code but something to be tracked with Azure Linux team
NOTE: This is only observed for kernel patches

@rane-rajasi rane-rajasi requested review from a team, michellemcdaniel and rirakshi-dev and removed request for a team March 10, 2025 15:26
@codecov
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 96.98965% with 32 lines in your changes missing coverage. Please review.

Project coverage is 92.87%. Comparing base (1c95e78) to head (dfb665b).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...rc/core/src/package_managers/TdnfPackageManager.py 94.60% 22 Missing ⚠️
src/core/tests/Test_TdnfPackageManager.py 98.94% 5 Missing ⚠️
src/core/tests/Test_EnvLayer.py 93.75% 3 Missing ⚠️
src/core/tests/library/LegacyEnvLayerExtensions.py 96.96% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   92.51%   92.87%   +0.35%     
==========================================
  Files         100      103       +3     
  Lines       16351    17399    +1048     
==========================================
+ Hits        15127    16159    +1032     
- Misses       1224     1240      +16     
Flag Coverage Δ
python27 92.87% <96.98%> (+0.35%) ⬆️
python39 92.87% <96.98%> (+0.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@feng-j678 feng-j678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline

@kjohn-msft kjohn-msft changed the title Adding Azure Linux 3.0 support Feature: Adding Azure Linux 3.0 Base Support Mar 25, 2025
feng-j678
feng-j678 previously approved these changes Mar 26, 2025
nikhim-um
nikhim-um previously approved these changes Mar 27, 2025
@rane-rajasi rane-rajasi dismissed stale reviews from nikhim-um and feng-j678 via 4d46503 April 3, 2025 00:42
feng-j678
feng-j678 previously approved these changes Apr 3, 2025
Copy link
Collaborator

@kjohn-msft kjohn-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor left over comments.

@rane-rajasi rane-rajasi enabled auto-merge (squash) April 4, 2025 22:27
@rane-rajasi rane-rajasi merged commit 47cffe0 into master Apr 4, 2025
7 checks passed
@rane-rajasi rane-rajasi deleted the rarane-marinerbasesupport branch April 4, 2025 22:34
@rane-rajasi rane-rajasi mentioned this pull request Apr 25, 2025
rane-rajasi added a commit that referenced this pull request Apr 25, 2025
This release includes:
[x] Engg. hygiene: Remove TelemetryWriter related log noise
[#312](#312)
[x] Bugfix: Mitigate external Ubuntu Pro Client issue
[#308](#308)
[x] Feature: Adding support for Azure Linux 2.0 in Tdnf Package Manager
[#311](#311)
[x] Eng. sys: Upgrade CICD pipeline from Python 3.9 to Python 3.12
[#309](#309)
[x] Coverage: Increase code coverage - TimerManager and ServiceManager
[#307](#307)
[x] Bugfix: Unit tests broken in Python 3.12
[#306](#306)
[x] Feature: Adding Azure Linux 3.0 Base Support
[#293](#293)
[x] Bugfix: Retry Handler to Prevent Unbounded Retries while trying to
Mitigate YUM Update Errors
[#303](#303)
[x] BugFix: CentOS VMs not installing patches during Auto Patching
[#298](#298)
[x] Bugfix: Auto-assessment - Restricting execution permissions to root
user/ owner
[#299](#299)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants