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.
Bug 1449497 - 7.4: docker fails to start stopped container
Summary: 7.4: docker fails to start stopped container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.4
Hardware: All
OS: Linux
high
high
Target Milestone: beta
: ---
Assignee: Mrunal Patel
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1451923 (view as bug list)
Depends On:
Blocks: 1451079
TreeView+ depends on / blocked
 
Reported: 2017-05-10 07:15 UTC by Jan Pazdziora
Modified: 2019-03-06 01:25 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1451079 (view as bug list)
Environment:
Last Closed: 2017-08-02 00:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2344 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2017-08-08 22:51:38 UTC

Description Jan Pazdziora 2017-05-10 07:15:27 UTC
Description of problem:

When container is stopped, docker no longer starts it when docker start is run.

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

docker-1.12.6-19.1.git92b10e4.el7.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. docker run --name date rhel7 date
2. docker start date

Actual results:

# docker run --name date rhel7 date
Wed May 10 06:04:29 UTC 2017
# docker start -a date
container with id exists: 0cca32ae5fe7c90371d98be53bec5e7cd0c9c2d2da82a51acc6ef49cb5434953
Error response from daemon: invalid header field value "oci runtime error: container with id exists: 0cca32ae5fe7c90371d98be53bec5e7cd0c9c2d2da82a51acc6ef49cb5434953\n"

Expected results:

# docker run --name date rhel7 date
Wed May 10 06:04:29 UTC 2017
# docker start -a date
Wed May 10 07:13:51 UTC 2017

Additional info:

This is a regression against released docker-1.12.6-16.el7.x86_64.

Comment 4 Qian Cai 2017-05-10 13:33:12 UTC
Some commit in docker-runc introduced this regression.

Comment 8 Qian Cai 2017-05-10 13:56:01 UTC
Bisecting indicated this is the culprit.
https://github.com/projectatomic/runc/commit/e6f0161fcd389a03f41f86746807e9a45dac050b

Comment 9 Ed Santiago 2017-05-10 20:29:19 UTC
Still present in docker-1.12.6-23.git62520c0.el7

Comment 12 Antonio Murdaca 2017-05-11 13:16:38 UTC
Mrunal do you know why that commit in runc broke this? https://github.com/projectatomic/runc/commit/e6f0161fcd389a03f41f86746807e9a45dac050b

Comment 16 Michael Nguyen 2017-05-15 19:42:14 UTC
I am seeing something that might be related to this BZ when running a private registry container with --restart=always.

# docker run -d -p 5000:5000 --restart=always --name registry registry:2
Unable to find image 'registry:2' locally
Trying to pull repository registry.access.redhat.com/registry ... 
Trying to pull repository docker.io/library/registry ... 
2: Pulling from docker.io/library/registry
79650cf9cc01: Pull complete 
70ce42745103: Pull complete 
77edd1a7fa4d: Pull complete 
432773976ace: Pull complete 
3234a47fe5a9: Pull complete 
Digest: sha256:a3551c422521617e86927c3ff57e05edf086f1648f4d8524633216ca363d06c2
6b51a64cecb9b7757d3474e34c248478470b3325cc21e91df6143d6383b1db72
# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
6b51a64cecb9        registry:2          "/entrypoint.sh /etc/"   5 seconds ago       Up 4 seconds        0.0.0.0:5000->5000/tcp   registry
# systemctl restart docker
# docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
docker.io/registry   2                   9d0c4eabab4d        4 days ago          33.17 MB
[root@rhelah ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@rhelah ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS               NAMES
6b51a64cecb9        registry:2          "/entrypoint.sh /etc/"   32 seconds ago      Exited (2) 21 seconds ago                       registry
[root@rhelah ~]# docker start registry
Error response from daemon: invalid header field value "oci runtime error: container with id exists: 6b51a64cecb9b7757d3474e34c248478470b3325cc21e91df6143d6383b1db72\n"
Error: failed to start containers: registry

# rpm -qa docker
docker-1.12.6-26.git62520c0.el7.x86_64

Comment 17 Mrunal Patel 2017-05-15 22:26:30 UTC
Found the root cause. I am working on a fix for this.

Comment 18 Mrunal Patel 2017-05-16 19:49:46 UTC
Here is the PR for the fix: https://github.com/projectatomic/runc/pull/7

Comment 20 Antonio Murdaca 2017-05-18 13:39:58 UTC
*** Bug 1451923 has been marked as a duplicate of this bug. ***

Comment 21 Luwen Su 2017-07-08 07:31:08 UTC
Looks fine in docker-1.12.6-41.1.gitf55a118.el7.x86_64

# docker start -a date
Sat Jul  8 07:29:42 UTC 2017

Comment 23 errata-xmlrpc 2017-08-02 00:11:21 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://access.redhat.com/errata/RHBA-2017:2344


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