Bug 1313555

Summary: atomic uninstall gives non-zero exit
Product: Red Hat Enterprise Linux 7 Reporter: Chris Evich <cevich>
Component: sadc-containerAssignee: Jeremy Eder <jeder>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 7.2CC: sct
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 16:56:41 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:

Description Chris Evich 2016-03-01 21:53:12 UTC
Description of problem:
When uninstalling, the script tries to remove an existing sadc container.  That works fine, unless no container was started, or it was already removed (manually).  In that case, the script returns non-zero exit status when it shouldn't (since removing the container was the goal).

Version-Release number of selected component (if applicable):

registry.access.redhat.com/rhel7/sadc         latest              96ca6a153fd6        16 hours ago        215 MB

How reproducible:
Trivial

Steps to Reproduce:
1. atomic install registry.access.redhat.com/rhel7/sadc:latest
2. atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest

Actual results:
-bash-4.2# atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest
docker run --rm --privileged -v /:/host -e HOST=/host -v /var/log:/var/log -e IMAGE=registry.access.stage.redhat.com/rhel7/sadc:latest -e NAME=sadc registry.access.stage.redhat.com/rhel7/sadc:latest /usr/local/bin/sysstat-uninstall.sh ; docker rm -f sadc
Error response from daemon: no such id: sadc
Error: failed to remove containers: [sadc]
-bash-4.2# echo $?
1

Expected results:
-bash-4.2# atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest
docker run --rm --privileged -v /:/host -e HOST=/host -v /var/log:/var/log -e ...whatever...
-bash-4.2# echo $?
0


Additional info:
The rsyslog image uninstall does not have this problem

Comment 5 errata-xmlrpc 2016-05-12 16:56:41 UTC
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://rhn.redhat.com/errata/RHBA-2016-1067.html