Skip to content

Conversation

@gmarciani
Copy link
Contributor

@gmarciani gmarciani commented Dec 18, 2025

Description of changes

Problem

The build image for Ubuntu 22.04 and 24.04 intermittently fails the reboot step, which is executed before the execution of our cookbook.

Root Cause

Our investigations show that such failure is related to snapd restarting the SSM Agent right before the reboot. snapd does it as part of its auto-refresh mechanism, which for tries to upgrade the packages in the background. We think this may interfere with the ssm agent reporting the successful status of the reboot.

Solution

Disable snap refresh for all snap packages during the build process.

This is how snap refresh hold/unhold works:

root@ip-172-31-0-49:~# snap refresh --time
timer: 00:00~24:00/4
last: today at 15:59 UTC
next: today at 22:03 UTC

root@ip-172-31-0-49:~# snap refresh --hold
Auto-refresh of all snaps held indefinitely

root@ip-172-31-0-49:~# snap refresh --time
timer: 00:00~24:00/4
last: today at 15:59 UTC
hold: forever
next: today at 22:03 UTC (but held)

root@ip-172-31-0-49:~# snap refresh --unhold
Removed auto-refresh hold on all snaps

root@ip-172-31-0-49:~# snap refresh --time
timer: 00:00~24:00/4
last: today at 15:59 UTC
next: today at 22:03 UTC

Tests

  • Verified fix on Ubuntu 22.04 and Ubuntu 24.04 builds that were previously failing
  • Confirmed snap refresh hold is applied and removed correctly

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gmarciani gmarciani changed the base branch from develop to release-3.14 December 18, 2025 18:15
@gmarciani gmarciani changed the title Wip/mgiacomo/3141/fix build ubhu 1218 1 [BuildImage] Fix reboot failures on Ubuntu by preventing snap auto-refresh from interfering with build Dec 18, 2025
to prevent background updates of SSM agent that could lead to reboot failures.
@gmarciani gmarciani force-pushed the wip/mgiacomo/3141/fix-build-ubhu-1218-1 branch from ab6cffc to 941e113 Compare December 18, 2025 20:49
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