-
Notifications
You must be signed in to change notification settings - Fork 203
Account for podman version < 2.0.0 #1151
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 |
|---|---|---|
|
|
@@ -12,6 +12,9 @@ source validation.sh | |
|
|
||
| early_deploy_validation | ||
|
|
||
| # Account for differences in 1.* and 2.* version reporting. | ||
| PODMAN_VERSION=$(sudo podman version -f json | jq -r '.Version,.Client.Version|strings') | ||
|
|
||
dtantsur marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # To replace an image entry in the openshift releae image, set | ||
| # <ENTRYNAME>_LOCAL_IMAGE - where ENTRYNAME matches an uppercase version of the name in the release image | ||
| # with "-" converted to "_" e.g. to use a custom ironic-inspector | ||
|
|
@@ -160,7 +163,12 @@ then | |
| sudo podman run -d --net host --privileged --name ipa-downloader --pod ironic-pod \ | ||
| -v $IRONIC_DATA_DIR:/shared ${IRONIC_IPA_DOWNLOADER_LOCAL_IMAGE} /usr/local/bin/get-resource.sh | ||
|
|
||
| sudo podman wait -i 1000ms ipa-downloader | ||
| # Units have been introduced in 2.x | ||
| if printf '2.0.0\n%s\n' "$PODMAN_VERSION" | sort -V -C; then | ||
| sudo podman wait -i 1000ms ipa-downloader | ||
| else | ||
| sudo podman wait -i 1000 ipa-downloader | ||
| fi | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: do we really need to maintain the backward compatibility to a previous (major) version? Wouldn't be simpler to bump the podman min version required by dev-scripts?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do need to do this. CentOS doesn't have a podman that understands units, and RHEL 8.3 requires them.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok got it just for this command , not in general |
||
| fi | ||
|
|
||
| function is_running() { | ||
|
|
||
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.
Shorter version could be
sudo podman version --format "{{.Version}}"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.
The format argument to podman doesn't work on some versions.
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.
And it's .Client.Version on newer podmans..
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.
There's also a .Server.Version but it seems both are supported