File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
cli/src/pcluster/resources/imagebuilder Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ CHANGELOG
3232- Reduce EFA installation time for Ubuntu by ~ 20 minutes by only holding kernel packages for the installed kernel.
3333- Add GetFunction and GetPolicy permissions to PClusterBuildImageCleanupRole to prevent AccessDenied errors during build image stack deletion.
3434- Fix validation error messages when ` DevSettings ` is null or ` DevSettings/InstanceTypesData ` is missing required fields.
35+ - Disable snap auto-refresh on Ubuntu during build image to prevent intermittent reboot failures.
3536
36373.14.0
3738------
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ phases:
3434 *) echo "Unsupported OS: $RELEASE" && exit {{ FailExitCode }} ;;
3535 esac
3636
37+ # Disable snap refresh to prevent background updates during build (Ubuntu only)
38+ - name : DisableSnapRefresh
39+ action : ExecuteBash
40+ inputs :
41+ commands :
42+ - |
43+ set -x
44+ OS="{{ build.OperatingSystemName.outputs.stdout }}"
45+ if [[ $OS =~ ^ubuntu ]] && command -v snap &>/dev/null; then
46+ snap watch --last=auto-refresh 2>/dev/null || true
47+ snap refresh --hold && mkdir -p /opt/parallelcluster && touch /opt/parallelcluster/pcluster_build_image_snap_hold
48+ fi
49+
3750 # Initialize system information and URLs
3851 - name : SystemInfo
3952 action : ExecuteBash
@@ -260,6 +273,11 @@ phases:
260273 echo "SSM agent is installed by default"
261274 fi
262275
276+ if [[ -f /opt/parallelcluster/pcluster_build_image_snap_hold ]]; then
277+ snap refresh --unhold 2>/dev/null || true
278+ rm -rf /opt/parallelcluster/pcluster_build_image_snap_hold
279+ fi
280+
263281 # Final cleanup
264282 rm -f /opt/parallelcluster/system_info
265283 /usr/local/sbin/ami_cleanup.sh "${CfnParamIsOfficialAmiBuild}"
You can’t perform that action at this time.
0 commit comments