-
Notifications
You must be signed in to change notification settings - Fork 460
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
adds config and switches to manage pull-image for create/run commands #627
adds config and switches to manage pull-image for create/run commands #627
Conversation
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.
LGTM
manual output: new flag config detail:
create pod.. then create container with pull-image-on-create set to false (default)
now remove the container... set the flag to true and try again
|
Looking good @mikebrow for a quick look. Will take a better look tomorrow when I get a chance. One thing, you might need to update https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md with the new flag. |
I did think that over. IMO this is more applicable for a release note... the usage documents the flag on the main and config help pages:
The default is (false) the original behavior, that which is expected by kubelet. IMO this is more a release note notice than a feature that should be highlighted in the docs for use in the cli. Note: no-pull is not in the crictl.md document. Would have to be a new section describing pod, container, and image workflow, summarizing pull policy mechanics for kubernetes, the new flag, and the no-pull override that is activate-able when the new flag is set to pull images on create. Which is more a design/admin thing.. possibly open issue for an admin guide? |
test fail is dupe of #626 will rebase and retest when that merges. |
I must be missing something -- why isn't this controlled by the pod's image Pull Policy? |
The pull policy is not part of the CRI and only handled by the kubelet internally. |
This isn't as urgent as I thought.. crictl isn't in the path between kublet and the CRI runtimes.. kublet goes directly to a sock. Not sure where I got the impression otherwise. crictl is used by kubeadm, some k/k tests, some health monitoring in gce... |
Now I finally got the whole context and the reason of my confusion. Thank you for the clarification. 🙂 |
LGTM NB but still think the flag should be added to https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md. It will be added to the config file etc when set so would need to be documented. |
:-) and done.. see additional commits.. cheers. |
Thanks @mikebrow, nice update. |
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
4197d94
to
5bf5702
Compare
5bf5702
to
c8afd59
Compare
c8afd59
to
085ba20
Compare
@hickeyma @saschagrunert note the new commit adding somewhat significant (non-breaking) changes. Could use updated reviews. |
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
085ba20
to
65224eb
Compare
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.
/lgtm
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, mikebrow 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 |
We are pre-loading a bunch of images, but not all of them, so this change will result in some failures. Let's see which ones and fix those. TODO describe this. * kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
We are pre-loading a bunch of images, but not all of them, so this change will result in some failures. Let's see which ones and fix those. TODO describe this. * kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
We already preload a bunch of images before running tests, and it makes sense to disable pull during crictl create, as it should save some time and result in less flakiness in the tests (related to network glitches). crictl 1.19 added this option, and "no pull on create" is the new default. This reverts the hunk of commit 40b9d97 which changes the default. For more details, see kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461 and kubernetes-sigs/cri-tools#627 crictl 1.19 added these options (see [1] for details). First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 [v2: remove options from crictl.yaml] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 [v2: remove options from crictl.yaml] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This builds on commit 35f6461. crictl 1.19 added these options in [1]. First, set no-pull-on-run, which should eliminate flakes like this one: > `ctr_id=$(crictl run "$TESTDIR"/container_pids_limit.json "$TESTDATA"/sandbox_config.json)' failed > time="2020-11-18T05:02:01Z" level=fatal msg="running container: creating container failed: rpc error: code = Unknown desc = Error reading blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4: Get \"https://cdn02.quay.io/sharedimages/86f0a285-6f29-47c4-a3ae-7e2c70cad0ba/layer?Expires=1605676304&Signature=N976UlLi1Hb~jhKGQAy8JcmhlqFPdTzI3I3WiR7iEmb-x1YaIA6cWgWB3DffhwlaOrkzwHU8bAuWUEcwbD1N4tx3tAy7rhfQSyqWzbrs-OZJGON9aH7C5PkoqYPFDwGxQ1dzxtLSFR-hx1FmyN1lIuzFUKRmiQlPZPj14VGh51olcYgw2QVOPHE7~asGYa7EtQO~9q9A4Cgo7AAKzVsgDTjw19KReyIl5yh8am272W0AMrCoELwqC83F0FV3i6IZsomhnm30BHa4D5Xz1Jzr-dy4VWpM-Y8mowR4AVH9PLi6aALmYk1Ei54QjDEtkjSwc4sIVISb7g2uiKSDbLFHbQ__&Key-Pair-Id=APKAJ67PQLWGCSP66DGA\": net/http: TLS handshake timeout" Also, while no-pull-on-create is the default, set it anyway explicitly. A test case that requires an image not listed in $IMAGES should either do an explicit "crictl pull", or use --with-pull. [1] kubernetes-sigs/cri-tools#627 [v2: remove options from crictl.yaml] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
addresses issue #625
Signed-off-by: Mike Brown brownwm@us.ibm.com