-
Notifications
You must be signed in to change notification settings - Fork 1.5k
data/bootstrap: Check if release image architecture matches host architecture #4592
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,17 @@ do | |
| echo "Pull failed. Retrying $RELEASE_IMAGE..." | ||
| fi | ||
| done | ||
|
|
||
| # Sanity check the image metadata to see if the arches match | ||
| image_arch=$(podman inspect $RELEASE_IMAGE --format {{ "{{.Architecture}}" }}) | ||
| host_arch=$(uname -m) | ||
| case $host_arch in | ||
| "x86_64") host_arch="amd64" ;; | ||
| "aarch64") host_arch="arm64" ;; # not used, just for completeness | ||
| esac | ||
|
|
||
| if [[ "$image_arch" != "$host_arch" ]]; then | ||
| record_service_stage_failure | ||
| echo "ERROR: release image arch $image_arch does not match host arch $host_arch" | ||
| exit 1 | ||
|
||
| fi | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the
ppc64leands390xarchitectures not included here because they do not need any mangling?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct.
x86_64andaarch64map toamd64andarm64resp. it is a cause of confusion in many places.