Bug 1330046

Summary: stopped container is started again when restart docker-latest service
Product: Red Hat Enterprise Linux 7 Reporter: Alex Jia <ajia>
Component: docker-latestAssignee: Brent Baude <bbaude>
Status: CLOSED NOTABUG QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: dwalsh
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-18 14:21:54 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 Alex Jia 2016-04-25 10:43:09 UTC
Description of problem:
Running a container image is managed by Atomic then stop it, and restart docker-latest service, the stopped container is started again. 

Version-Release number of selected component (if applicable):
# rpm -q docker-latest atomic
docker-latest-1.10.3-12.el7.x86_64
atomic-1.9-4.gitff44c6a.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. atomic install registry.access.redhat.com/rhel7/rsyslog:latest
2. atomic run registry.access.redhat.com/rhel7/rsyslog:latest
3. docker-latest ps 
4. docker-latest stop <container_id>

Actual results:

# docker-latest ps
CONTAINER ID        IMAGE                                             COMMAND                  CREATED             STATUS              PORTS               NAMES
aff96890b1ce        registry.access.redhat.com/rhel7/rsyslog:latest   "/bin/rsyslog.sh"        6 seconds ago       Up 5 seconds                            rsyslog

# docker-latest stop aff96890b1ce
aff96890b1ce

# docker-latest ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

# docker-latest ps -a
CONTAINER ID        IMAGE                                             COMMAND                  CREATED              STATUS                       PORTS               NAMES
aff96890b1ce        registry.access.redhat.com/rhel7/rsyslog:latest   "/bin/rsyslog.sh"        About a minute ago   Exited (0) 13 seconds ago                        rsyslog

# systemctl restart docker-latest
# docker-latest ps
CONTAINER ID        IMAGE                                             COMMAND                  CREATED              STATUS              PORTS               NAMES
aff96890b1ce        registry.access.redhat.com/rhel7/rsyslog:latest   "/bin/rsyslog.sh"        About a minute ago   Up 2 seconds                            rsyslog

Expected results:


Additional info:

I have a running rsyslog container before upgrading docker-latest RPM packages, I found the running rsyslog container is still running after upgrading docker-latest, it should be an expected result, in order to get a clear test environment, I stopped rsyslog container and deleted it from my RHEL7 system, and also delete all of inactive containers, and then I ran steps in above section Steps to Reproduce.

Comment 2 Daniel Walsh 2016-10-18 14:21:54 UTC
If the container is set to autostart then restarting the daemon would start the container.  I don't see this as a bug.

Reopen if you don't agree or I am mistaken.