Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Users may not be able to uninstall images using 'atomic uninstall'
Due to an error in parsing the uninstall command for an image, the 'atomic' command may not successfully uninstall an image.
To workaround the error, users may run the raw 'docker' command that can be found by inspecting the 'uninstall' label of an 'image'
Using atomic-1.15.4-1.el7.x86_64 and the cockpit-ws container on the Red Hat registry, I found that the 'atomic uninstall' command is failing.
This is a regression, as I am able to successfully uninstall the same container using atomic-1.14.1-5.el7.x86_64.
See below for some output.
# atomic uninstall registry.access.redhat.com/rhel7/cockpit-ws
bad operand type for unary +: 'unicode'
# atomic --debug uninstall registry.access.redhat.com/rhel7/cockpit-ws
Namespace(_class=<class 'Atomic.uninstall.Uninstall'>, args=[], assumeyes=False, debug=True, display=False, force=False, func='uninstall', image='registry.access.redhat.com/rhel7/cockpit-ws', name=None, opt1=None, opt2=None, opt3=None, storage=None)
bad operand type for unary +: 'unicode'
Traceback (most recent call last):
File "/bin/atomic", line 188, in <module>
sys.exit(_func())
File "/usr/lib/python2.7/site-packages/Atomic/uninstall.py", line 62, in uninstall
be.uninstall(img_obj, name=self.args.name, atomic=self)
File "/usr/lib/python2.7/site-packages/Atomic/backends/_docker.py", line 350, in uninstall
cmd =+ uninstall_command
TypeError: bad operand type for unary +: 'unicode'
# docker inspect registry.access.redhat.com/rhel7/cockpit-ws | grep uninstall
"uninstall": "/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-uninstall",
"uninstall": "/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-uninstall",
# docker run --rm registry.access.redhat.com/rhel7/cockpit-ws cat /container/atomic-uninstall
#!/bin/sh -eu
# This is the install script for Cockpit when run in a privileged container
#
# The host file system must be mounted at /host
cd /
PATH="/bin:/sbin"
if [ ! -d /host/etc -o ! -d /host/proc -o ! -d /host/var/run ]; then
echo "host file system is not mounted at /host" >&2
exit 1
fi
if [ ! -f /host/usr/bin/cockpit-bridge ]; then
echo "cockpit-bridge must be installed in the host" >&2
exit 1
fi
if [ ! -d /host/usr/share/cockpit ]; then
echo "cockpit-shell and other resources must be installed in the host" >&2
exit 1
fi
if [ -f /host/usr/libexec/cockpit-ws ]; then
echo "cockpit-ws must not be installed in the host" >&2
exit 1
fi
set -x
# Everything else is settings and should remain
rm -f /host/etc/pam.d/cockpit
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:1323
Using atomic-1.15.4-1.el7.x86_64 and the cockpit-ws container on the Red Hat registry, I found that the 'atomic uninstall' command is failing. This is a regression, as I am able to successfully uninstall the same container using atomic-1.14.1-5.el7.x86_64. See below for some output. # atomic uninstall registry.access.redhat.com/rhel7/cockpit-ws bad operand type for unary +: 'unicode' # atomic --debug uninstall registry.access.redhat.com/rhel7/cockpit-ws Namespace(_class=<class 'Atomic.uninstall.Uninstall'>, args=[], assumeyes=False, debug=True, display=False, force=False, func='uninstall', image='registry.access.redhat.com/rhel7/cockpit-ws', name=None, opt1=None, opt2=None, opt3=None, storage=None) bad operand type for unary +: 'unicode' Traceback (most recent call last): File "/bin/atomic", line 188, in <module> sys.exit(_func()) File "/usr/lib/python2.7/site-packages/Atomic/uninstall.py", line 62, in uninstall be.uninstall(img_obj, name=self.args.name, atomic=self) File "/usr/lib/python2.7/site-packages/Atomic/backends/_docker.py", line 350, in uninstall cmd =+ uninstall_command TypeError: bad operand type for unary +: 'unicode' # docker inspect registry.access.redhat.com/rhel7/cockpit-ws | grep uninstall "uninstall": "/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-uninstall", "uninstall": "/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-uninstall", # docker run --rm registry.access.redhat.com/rhel7/cockpit-ws cat /container/atomic-uninstall #!/bin/sh -eu # This is the install script for Cockpit when run in a privileged container # # The host file system must be mounted at /host cd / PATH="/bin:/sbin" if [ ! -d /host/etc -o ! -d /host/proc -o ! -d /host/var/run ]; then echo "host file system is not mounted at /host" >&2 exit 1 fi if [ ! -f /host/usr/bin/cockpit-bridge ]; then echo "cockpit-bridge must be installed in the host" >&2 exit 1 fi if [ ! -d /host/usr/share/cockpit ]; then echo "cockpit-shell and other resources must be installed in the host" >&2 exit 1 fi if [ -f /host/usr/libexec/cockpit-ws ]; then echo "cockpit-ws must not be installed in the host" >&2 exit 1 fi set -x # Everything else is settings and should remain rm -f /host/etc/pam.d/cockpit