-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bug 1743873: data/bootstrap: extract ironic images from release image #2234
Conversation
/label platform/baremetal /assign @hardys |
/label platform/baremetal |
This uses the correct images now: From the release image:
podman ps:
|
@@ -87,7 +86,6 @@ podman wait -i 1000 ipa-downloader | |||
podman wait -i 1000 coreos-downloader | |||
while ! curl --fail http://localhost/images/rhcos-ootpa-latest.qcow2.md5sum ; do sleep 1; done | |||
while ! curl --fail --head http://localhost/images/ironic-python-agent.initramfs ; do sleep 1; done | |||
while ! curl --fail --head http://localhost/images/ironic-python-agent.tar.headers ; do sleep 1; done |
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 rhel based IPA image doesn't produce this file, so the move to openshift images made this wait forever.
Build ABORTED, see build http://10.8.144.11:8080/job/dev-tools/1066/ |
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1067/ |
/lgtm |
/retitle Bug 1743873: data/data/bootstrap: extract ironic images from release image |
@stbenjam: This pull request references Bugzilla bug 1743873, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
data/data/bootstrap/baremetal/files/usr/local/bin/startironic.sh.template
Show resolved
Hide resolved
#!/usr/bin/env bash | ||
# release-image.sh is a helper library for interacting with a release image. | ||
|
||
if ! podman inspect {{.ReleaseImage}} &>/dev/null; then |
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.
If multiple services run this concurrently? what is the behavior?
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.
currently podman
pulls multiple copies in parallel. containers/image#611 is long-running work on locks to make parallel pulls more efficient, but who knows if/when that will land.
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.
Looks like flock
is available on RHCOS. I can write something off that, unless you have a preference for a different way
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.
I was more interested making sure 2 runs of podman
simultaneously wouldn't cause some corruption.. performance wasn't a concern..
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.
I don't think it causes any corruption issues, but if more than a couple things start sourcing this it could get ugly performance-wise. Is there any objection to using something like flock
? It's not very portable, though, but it is on RHCOS. People also do hacky things with mkdir
as it's guaranteed to be atomic.
(
flock 9
if ! release=$( podman inspect {{.ReleaseImage}} --format '{{"{{"}} index .RepoDigests 0 {{"}}"}}' ) || [[ -z "${release}" ]]; then
echo "Warning: Could not resolve release image to pull by digest" 2>&1
release="{{.ReleaseImage}}"
fi
) 9>/var/lock/release-image.lock
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.
I'm fine locking somehow in shell. I'm also fine serializing these two services via some systemd magic. And because this is metal-only, I'm fine not locking at all too ;). Ahbinav may be more opinionated.
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.
You could have a systemd service to pull the release image and have bootkube and ironic depend on it
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.
Thanks, @markmc, I think that is a nice approach. I've updated this PR.
@stbenjam: This pull request references Bugzilla bug 1743873, which is valid. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1078/ |
data/data/bootstrap/systemd/units/release-image.service.template
Outdated
Show resolved
Hide resolved
data/data/bootstrap/systemd/units/release-image.service.template
Outdated
Show resolved
Hide resolved
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1101/ |
startironic.sh now uses the ironic images specified in the release. In order to do that, this change pulls out the code from bootkube to get the images to it's own script, and adds a service that downloads the release image so it only happens once.
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1102/ |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, hardys, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@stbenjam: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@stbenjam: All pull requests linked via external trackers have merged. Bugzilla bug 1743873 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Catching up with d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234).
Catching up with d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234).
Catching up with d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234).
Catching up with d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234).
…--quiet We've had the option since 9dfdc3c (bootkube.sh: suppress podman output when pulling images, 2019-02-21, openshift#1293). But since d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234) that image pool has happened in a separate unit so output will be in journals/release-image.log and not cluttering up journals/bootkube.log. So get noisy again, to get information like: $ podman pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1 Trying to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1...Failed error pulling image "quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1": unable to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unable to pull image: Error determining manifest MIME type for docker://quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unexpected http code: 500 (Internal Server Error), URL: https://quay.io/v2/auth?scope=repository%3Aopenshift-release-dev%2Focp-release-nightly%3Apull&service=quay.io instead of silence like: -- Logs begin at Tue 2020-05-19 18:47:10 UTC, end at Tue 2020-05-19 19:12:00 UTC. -- May 19 18:47:40 ip-10-0-29-43 systemd[1]: Starting Download the OpenShift Release Image... May 19 18:47:40 ip-10-0-29-43 release-image-download.sh[1747]: Pulling quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1... May 19 18:47:41 ip-10-0-29-43 podman[1749]: 2020-05-19 18:47:41.135323376 +0000 UTC m=+0.318008863 system refresh
…--quiet We've had the option since 9dfdc3c (bootkube.sh: suppress podman output when pulling images, 2019-02-21, openshift#1293). But since d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234) that image pool has happened in a separate unit, so output will be in journals/release-image.log and not cluttering up journals/bootkube.log. So get noisy again, to get information like: $ podman pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1 Trying to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1...Failed error pulling image "quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1": unable to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unable to pull image: Error determining manifest MIME type for docker://quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unexpected http code: 500 (Internal Server Error), URL: https://quay.io/v2/auth?scope=repository%3Aopenshift-release-dev%2Focp-release-nightly%3Apull&service=quay.io instead of silence like: -- Logs begin at Tue 2020-05-19 18:47:10 UTC, end at Tue 2020-05-19 19:12:00 UTC. -- May 19 18:47:40 ip-10-0-29-43 systemd[1]: Starting Download the OpenShift Release Image... May 19 18:47:40 ip-10-0-29-43 release-image-download.sh[1747]: Pulling quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1... May 19 18:47:41 ip-10-0-29-43 podman[1749]: 2020-05-19 18:47:41.135323376 +0000 UTC m=+0.318008863 system refresh
…--quiet We've had the option since 9dfdc3c (bootkube.sh: suppress podman output when pulling images, 2019-02-21, openshift#1293). But since d1ec85a (data/bootstrap: extract ironic images from release image, 2019-08-19, openshift#2234) that image pull has happened in a separate unit, so output will be in journals/release-image.log and not cluttering up journals/bootkube.log. So get noisy again, to get information like: $ podman pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1 Trying to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1...Failed error pulling image "quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1": unable to pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unable to pull image: Error determining manifest MIME type for docker://quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1: unexpected http code: 500 (Internal Server Error), URL: https://quay.io/v2/auth?scope=repository%3Aopenshift-release-dev%2Focp-release-nightly%3Apull&service=quay.io instead of silence like: -- Logs begin at Tue 2020-05-19 18:47:10 UTC, end at Tue 2020-05-19 19:12:00 UTC. -- May 19 18:47:40 ip-10-0-29-43 systemd[1]: Starting Download the OpenShift Release Image... May 19 18:47:40 ip-10-0-29-43 release-image-download.sh[1747]: Pulling quay.io/openshift-release-dev/ocp-release-nightly@sha256:542a73a1c3a7ce5e8fa89ea3cd8a9c346dec1f0d437cf7e40bcb773683770be1... May 19 18:47:41 ip-10-0-29-43 podman[1749]: 2020-05-19 18:47:41.135323376 +0000 UTC m=+0.318008863 system refresh
startironic.sh now uses the ironic images specified in the release. In
order to do that, this change pulls out the code from bootkube to
get the images to it's own script, and adds a service that downloads the
release image so it only happens once.
fixes #2090