fix: remove aptmarkwalinuxAgent hold/unhold from cse main#7813
Draft
SriHarsha001 wants to merge 1 commit intomainfrom
Draft
fix: remove aptmarkwalinuxAgent hold/unhold from cse main#7813SriHarsha001 wants to merge 1 commit intomainfrom
SriHarsha001 wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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 holdfrombasePrepincse_main.sh. - Removed
aptmarkWALinuxAgent unholdfromnodePrepincse_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 unholdhas been removed fromnodePrep, butinstallDeps(ubuntu/cse_install_ubuntu.sh) still runsaptmarkWALinuxAgent holdbefore apt operations. With this change, walinuxagent can remain held indefinitely after provisioning, preventing future package updates. Either remove the hold ininstallDepsas 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 & commandsis 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #