Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion 04_setup_ironic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Copy link
Member

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}}"

Copy link
Member

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.

Copy link
Member Author

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..

Copy link
Member

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


# 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
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Member

@stbenjam stbenjam Nov 20, 2020

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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() {
Expand Down