Bug 1412567
| Summary: | Regression: atomic parses trailing arguments in command | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Stef Walter <stefw> |
| Component: | atomic | Assignee: | Brent Baude <bbaude> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | ajia, dperpeet, dwalsh |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-06-28 15:41:26 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: | |||
The description above is incorrect. The real cause of the problem is that the atomic command now parses trailing arguments that used to be passed to the command inside the container. This was detected by the Cockpit integration tests. Unfortunately we didn't update to testing against RHEL 7.3 Atomic until today ... fail :S (In reply to Stef Walter from comment #1) > The description above is incorrect. The real cause of the problem is that > the atomic command now parses trailing arguments that used to be passed to > the command inside the container. Stef, if previous description is incorrect, could you give an correct example? thanks. It's just the first sentence that's incorrect. INCORRECT: The atomic command on RHEL Atomic 7.3 no longer supports the --sysroot and --tmp-dir arguments. CORRECT: The atomic command now parses trailing arguments that used to be passed to the command inside the container. Possibly related argument parsing issue that has broken Fedora's usage of 'atomic storage reset': https://bugzilla.redhat.com/show_bug.cgi?id=1413862 Upstream Cockpit has committed a fix to work around this bug: https://github.com/cockpit-project/cockpit/pull/5486/commits/e006659929739fa1b9e4562fb67ce4a9ab07a6fb However the RHEL released versions atomic CLI and Cockpit will actually run into this issue. This remains a regression. (In reply to Stef Walter from comment #5) > It's just the first sentence that's incorrect. > > INCORRECT: The atomic command on RHEL Atomic 7.3 no longer supports the > --sysroot and --tmp-dir arguments. > > CORRECT: The atomic command now parses trailing arguments that used to be > passed to the command inside the container. IMO, we should document this change in atomic at least. No this is definitely a bug. I think this now works in upstream ... and the test in atomic-1.17.2-4 looks good.
[cloud-user@baude ~]$ sudo atomic --debug run rhel7/rhel-tools sosreport --sysroot /host --tmp-dir /host/var/tmp
docker run -it --name rhel-tools --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=rhel-tools -e IMAGE=rhel7/rhel-tools -v /run:/run -v /var/log:/var/log -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -v /:/host rhel7/rhel-tools sosreport --sysroot /host --tmp-dir /host/var/tmp
This container uses privileged security switches:
INFO: --ipc=host
Processes in this container can see and possibly interact with all semaphores and shared memory segments on the host as well as disables SELinux within the container.
INFO: --net=host
Processes in this container can listen to ports (and possibly rawip traffic) on the host's network.
INFO: --pid=host
Processes in this container can see and interact with all processes on the host and disables SELinux within the container.
INFO: --privileged
This container runs without separation and should be considered the same as root on your system.
For more information on these switches and their security implications, consult the manpage for 'docker run'.
sosreport (version 3.3)
This command will collect diagnostic and configuration infor...
[root@dell-per630-02 ~]# rpm -q atomic skopeo docker atomic-1.18.1-2.1.git0705b1b.el7.x86_64 skopeo-0.1.20-2.el7.x86_64 docker-1.12.6-30.1.git1398f24.el7.x86_64 [root@dell-per630-02 ~]# atomic version registry.access.redhat.com/rhel7/rhel-tools IMAGE NAME VERSION IMAGE ID registry.access.redhat.com/rhel7/rhel-tools:latest 7.3-25 4bc4f634f159 [root@dell-per630-02 ~]# atomic --debug run rhel7/rhel-tools sosreport --sysroot /host --tmp-dir /host/var/tmp The 'rhel-tools' container is using an older version of the installed 'rhel7/rhel-tools' container image. If you wish to use the newer image, you must either create a new container with a new name or uninstall the 'rhel-tools' container. # atomic uninstall --name rhel-tools rhel7/rhel-tools and create new container on the rhel7/rhel-tools image. # atomic update --force rhel7/rhel-toolss removes all containers based on an image. sosreport (version 3.3) This command will collect diagnostic and configuration information from this Red Hat Enterprise Linux system and installed applications. </ignore...> 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, 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/RHBA-2017:1627 |
Description of problem: The atomic command on RHEL Atomic 7.3 no longer supports the --sysroot and --tmp-dir arguments. Version-Release number of selected component (if applicable): # atomic host status State: idle Deployments: ● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard Version: 7.3.1 (2016-11-30 02:14:24) Commit: 42cfe1ca3305defb16dfd59cd0be5c539f19ea720dba861ed11e13941423ae86 OSName: rhel-atomic-host # rpm -qa atomic atomic-1.13.8-1.el7.x86_64 # atomic host upgrade Updating from: rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard 1 metadata, 0 content objects fetched; 837 B transferred in 3 seconds No upgrade available. How reproducible: Every time. Steps to Reproduce: 1. # atomic run rhel7/rhel-tools sosreport --sysroot /host --tmp- Actual results: atomic: unrecognized arguments: --sysroot /host --tmp-dir /host/var/tmp Try 'atomic --help' for more information. Expected results: No failure. Run the container. Additional info: Adding a '--' in the appropriate place makes the command work. Used to work in RHEL Atomic 7.2.x. Hence the regression. # atomic host status State: idle Deployments: ● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard Version: 7.2.7 (2016-09-09 18:43:35) Commit: 347c3f5eb641e69fc602878c646cf42c4bcd5d9f36847a1f24ff8f3ec80f17b1 OSName: rhel-atomic-host rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard Version: 7.2.6 (2016-07-29 19:54:25) Commit: b672bf8a457cb28e003dee20c53749636ef5fce3e4743afe4aaad269d3aaa62a OSName: rhel-atomic-host # rpm -q atomic atomic-1.10.5-7.el7.x86_64 # atomic run rhel7/rhel-tools sosreport --sysroot /host --tmp-dir /host/var/tmp rhel-tools sosreport (version 3.2) ... Works in Fedora Atomic 25 # atomic host status State: idle Deployments: ● fedora-atomic:fedora-atomic/25/x86_64/docker-host Version: 25.24 (2016-12-27 21:07:18) Commit: e456566ee11507ab105e3261e5d82a0ec0b023924c02253e8a1b63b76c5440d5 OSName: fedora-atomic fedora-atomic:fedora-atomic/25/x86_64/docker-host Version: 25.19 (2016-12-20 17:03:15) Commit: 1af39f18d4899dc0e94279cfb004e67bde46f361fcc2ccc3bd8bedf7f57a9339 OSName: fedora-atomic # rpm -qa atomic atomic-1.13.1-3.git5dfcaa9.fc25.x86_64 # atomic run cockpit/ws --sysroot /host --tmp-dir /host/var/tmp