Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2 image builder updateos document insufficient arguments to yum #6502

Merged

Conversation

salemgolemugoo
Copy link
Contributor

Description of changes

While building a custom AMI with pcluster utility for RHEL8 got this error in the EC2 Builder Log:

2024-10-28T16:12:25.489+01:00 Stdout: Freed space: 53 M
2024-10-28T16:12:25.554+01:00 Stdout: Is this ok [y/N]:
2024-10-28T16:12:25.554+01:00 CmdExecution: Command execution has been completed
2024-10-28T16:12:25.554+01:00 CmdExecution: [ ERROR ] Command execution has resulted in an error
2024-10-28T16:12:25.554+01:00 CmdExecution: Stderr: OS='rhel8' PLATFORM='RHEL' DISABLE_KERNEL_UPDATE='false' if [[ ${PLATFORM} == RHEL ]]; then yum -y update if [[ ${OS} == "rhel8" ]] || [[ ${OS} == "rocky8" ]] || [[ ${OS} == "rhel9" ]] || [[ ${OS} == "rocky9" ]] || [[ ${OS} == "alinux2023" ]] ; then # package-cleanup has changed in RHEL8 and it works differently https://access.redhat.com/solutions/1227 yum remove $(yum repoquery --installonly --latest-limit=-2 -q) else package-cleanup -y --oldkernels --count=1 fi elif [[ ${PLATFORM} == DEBIAN ]]; then DEBIAN_FRONTEND=noninteractive apt-get -y update if [[ ${DISABLE_KERNEL_UPDATE} == true ]]; then DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade else DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --with-new-pkgs upgrade fi apt-get --purge autoremove -y fi Operation aborted.
2024-10-28T16:12:25.554+01:00 CmdExecution: ExitCode 1
2024-10-28T16:12:25.555+01:00 ExecuteBash: FINISHED EXECUTION
2024-10-28T16:12:26.591+01:00 Executor: FINISHED EXECUTION OF ALL DOCUMENTS
2024-10-28T16:12:26.594+01:00 TOE has completed execution with failure - Execution failed!
2024-10-28T16:12:40.437+01:00 Waiting for command to complete (command id: e61c5a18-e926-4df6-8bf6-9f40a992a4b5). Attempt number: 34.
2024-10-28T16:12:40.746+01:00 Command failed (command id: e61c5a18-e926-4df6-8bf6-9f40a992a4b5, state: Failed)
2024-10-28T16:12:42.621+01:00 Action failed for step ApplyBuildComponents. Failing step
2024-10-28T16:12:43.085+01:00 Step ApplyBuildComponents failed

The issue is related to this command yum remove $(yum repoquery --installonly --latest-limit=-2 -q). It just waits for user input indefinitely.

Tests

Executed fixed script on the build instance. Checked the status echo $?

@salemgolemugoo salemgolemugoo requested review from a team as code owners October 28, 2024 18:31
@salemgolemugoo
Copy link
Contributor Author

@delagoya any updates?

@delagoya
Copy link
Contributor

Not my repo - will ping the ParallelCluster service team about the PR.

@dreambeyondorange dreambeyondorange enabled auto-merge (squash) December 2, 2024 16:37
@dreambeyondorange dreambeyondorange added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Dec 2, 2024
@dreambeyondorange dreambeyondorange merged commit 9d0edaa into aws:develop Dec 2, 2024
26 of 27 checks passed
@salemgolemugoo salemgolemugoo deleted the fix/cli-image-builder-document branch December 2, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog-update Disables the check that enforces changelog updates in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants