Bug 2048789
| Summary: | broken toolbox in OCP 4.10 with non-default image | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Andreas Karis <akaris> | |
| Component: | RHCOS | Assignee: | Timothée Ravier <travier> | |
| Status: | CLOSED ERRATA | QA Contact: | HuijingHei <hhei> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 4.10 | CC: | cfields, dornelas, jdohmann, jligon, miabbott, mrussell, nstielau | |
| Target Milestone: | --- | |||
| Target Release: | 4.12.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
* Previously, updating to Podman 4.0 prevented users from using custom images with toolbox containers on {op-system}. This fix updates the toolbox library code to account for the new Podman behavior, so users can now use custom images with toolbox on {op-system} as expected. (link:https://bugzilla.redhat.com/show_bug.cgi?id=2048789[*BZ#2048789*])
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 2105456 (view as bug list) | Environment: | ||
| Last Closed: | 2023-01-17 19:47:08 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | 2093040 | |||
| Bug Blocks: | 2105456 | |||
|
Description
Andreas Karis
2022-01-31 20:11:23 UTC
The problem is that podman image inspect yields: "<no value>" and /usr/bin/toolboxd thus thus goes into the wrong branch in this if/else:
/usr/bin/toolbox
~~~
27 if ! container_exists; then
28 echo "Spawning a container '$TOOLBOX_NAME' with image '$TOOLBOX_IMAGE'"
29 if [[ -z "$runlabel" ]]; then
30 container_run
31 return
32 else
33 echo "Detected RUN label in the container image. Using that as the default..."
34 container_runlabel
35 return
36 fi
~~~
~~~
image_runlabel() {
sudo podman image inspect "$TOOLBOX_IMAGE" --format "{{.Labels.run}}"
}
~~~
~~~
sh-4.4# podman image inspect "$TOOLBOX_IMAGE" --format "{{.Labels.run}}"
<no value>
~~~
Thanks for the report! I'm surprised we have got this far along before hitting this problem; I suspect there was a change to `podman` which altered the behavior in this case. I have a proposed fix upstream - https://github.com/coreos/toolbox/pull/73 This should be fixed as part of `toolbox-0.0.9-1.rhaos4.11.el8` included in RHCOS/OCP 4.11 Test with 4.11.0-0.nightly-2022-07-06-145812, toolbox does not work well. Also test with RHCOS-411.86.202207062100-0, get same error sh-4.4# chroot /host sh-4.4# rpm -q toolbox toolbox-0.0.9-1.rhaos4.11.el8.noarch sh-4.4# vi ~/.toolboxrc REGISTRY=quay.io IMAGE=fedora/fedora:36-x86_64 TOOLBOX_NAME=toolbox-fedora-36 sh-4.4# toolbox .toolboxrc file detected, overriding defaults... Trying to pull quay.io/fedora/fedora:36-x86_64... Getting image source signatures Copying blob 75f075168a24 done Copying config 3a66698e60 done Writing manifest to image destination Storing signatures 3a66698e604003f7822a0c73e9da50e090fda9a99fe1f2e1e2e7fe796cc803d5 Spawning a container 'toolbox-fedora-36' with image 'quay.io/fedora/fedora:36-x86_64' 52567064981e4f9426db4ef4ddc0501fadc4e722fb03d8c8bd395a83d5ebe5d8 Container 'toolbox-fedora-36' in unknown state: 'created' Change status to ASSIGNED based on Comment 6, and the `unknown state` issue is tracked by https://bugzilla.redhat.com/show_bug.cgi?id=2093040 We won't be able to deliver this in time for 4.11, so re-targeting for 4.12 and setting a dependency on 2093040 Verify passed with build 412.86.202209030446-0, change the toolbox image and works [core@cosa-devsh ~]$ rpm -q podman toolbox podman-4.2.0-1.rhaos4.12.el8.x86_64 toolbox-0.1.0-1.rhaos4.12.el8.noarch $ vi ~/.toolboxrc REGISTRY=quay.io IMAGE=fedora/fedora:36-x86_64 TOOLBOX_NAME=toolbox-fedora-36 [core@cosa-devsh ~]$ toolbox .toolboxrc file detected, overriding defaults... Trying to pull quay.io/fedora/fedora:36-x86_64... Getting image source signatures Copying blob 62946078034b done Copying config 2ecb6df959 done Writing manifest to image destination Storing signatures 2ecb6df959942dd2fdeb65606ca2e42a54f8c06af10eeb594fdfc3e2656c53d1 Spawning a container 'toolbox-fedora-36' with image 'quay.io/fedora/fedora:36-x86_64' 0b9801f6ce382019cdd0ca711c66f6c917bf36f12922cc4a3a5b87de9bd5a276 toolbox-fedora-36 Container started successfully. To exit, type 'exit'. [root@toolbox /]# cat /etc/os-release NAME="Fedora Linux" VERSION="36 (Container Image)" ID=fedora VERSION_ID=36 VERSION_CODENAME="" PLATFORM_ID="platform:f36" PRETTY_NAME="Fedora Linux 36 (Container Image)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:36" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=36 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=36 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Container Image" VARIANT_ID=container Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7399 |