Bug 1330046 - stopped container is started again when restart docker-latest service
Summary: stopped container is started again when restart docker-latest service
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker-latest
Version: 7.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Brent Baude
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 10:43 UTC by Alex Jia
Modified: 2016-10-18 14:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-18 14:21:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.