Skip to content

fix: remove aptmarkwalinuxAgent hold/unhold from cse main#7813

Draft
SriHarsha001 wants to merge 1 commit intomainfrom
sharsha/vmssCSEPerf1
Draft

fix: remove aptmarkwalinuxAgent hold/unhold from cse main#7813
SriHarsha001 wants to merge 1 commit intomainfrom
sharsha/vmssCSEPerf1

Conversation

@SriHarsha001
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Linux CSE entrypoint (cse_main.sh) to stop holding/unholding the walinuxagent package via aptmarkWALinuxAgent from the main flow, and regenerates the corresponding CustomData snapshot test artifacts in pkg/agent/testdata/ to reflect the new rendered script output.

Changes:

  • Removed aptmarkWALinuxAgent hold from basePrep in cse_main.sh.
  • Removed aptmarkWALinuxAgent unhold from nodePrep in cse_main.sh (both reboot-required and non-reboot paths).
  • Regenerated multiple pkg/agent/testdata/**/CustomData* snapshot files to match updated CSE output.

Reviewed changes

Copilot reviewed 63 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
File Description
parts/linux/cloud-init/artifacts/cse_main.sh Removes aptmark walinuxagent hold/unhold calls from the main provisioning flow.
pkg/agent/testdata/MarinerV2+Kata/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/MarinerV2+CustomCloud/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/Flatcar/CustomData.inner Regenerated rendered ignition/customdata snapshot payload.
pkg/agent/testdata/Flatcar+CustomCloud/CustomData.inner Regenerated rendered ignition/customdata snapshot payload.
pkg/agent/testdata/CustomizedImageLinuxGuard/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/CustomizedImageKata/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/CustomizedImage/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/AzureLinuxV3+Kata/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/AzureLinuxV2+Kata/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/AKSUbuntu2404+Teleport/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
pkg/agent/testdata/AKSUbuntu2204+China/CustomData Regenerated rendered CustomData snapshot (gzip/base64 blob changed).
Comments suppressed due to low confidence (2)

parts/linux/cloud-init/artifacts/cse_main.sh:478

  • aptmarkWALinuxAgent unhold has been removed from nodePrep, but installDeps (ubuntu/cse_install_ubuntu.sh) still runs aptmarkWALinuxAgent hold before apt operations. With this change, walinuxagent can remain held indefinitely after provisioning, preventing future package updates. Either remove the hold in installDeps as well, or reintroduce an explicit unhold at the appropriate completion point (including the reboot-required path).
    if $REBOOTREQUIRED; then
        echo 'reboot required, rebooting node in 1 minute'
        /bin/bash -c "shutdown -r 1 &"
    else
        if [ "$OS" = "$UBUNTU_OS_NAME" ]; then
            # logs_to_events should not be run on & commands
            if [ "${ENABLE_UNATTENDED_UPGRADES}" = "true" ]; then

parts/linux/cloud-init/artifacts/cse_main.sh:478

  • The comment # logs_to_events should not be run on & commands is now misleading in this Ubuntu branch since the only & invocation that used to follow (aptmark unhold) was removed. Consider deleting or relocating the comment to where it still applies to avoid confusion.
        if [ "$OS" = "$UBUNTU_OS_NAME" ]; then
            # logs_to_events should not be run on & commands
            if [ "${ENABLE_UNATTENDED_UPGRADES}" = "true" ]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant