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 1096293 - `docker start` doesn't fail on started container
Summary: `docker start` doesn't fail on started container
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Jack Rieden
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1090071
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-09 15:20 UTC by Lukáš Doktor
Modified: 2019-03-06 01:18 UTC (History)
11 users (show)

Fixed In Version: docker-0.11.1-19.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1090071
Environment:
Last Closed: 2015-03-26 11:35:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukáš Doktor 2014-05-09 15:20:09 UTC
+++ This bug was initially created as a clone of Bug #1090071 +++

Description of problem:
On older (0.9) docker, the `docker start $running_container` failed. The new 0.10.2 version just prints the container name and proceeds.

Version-Release number of selected component (if applicable):
docker-0.10.0-8.el7.x86_64
docker-io-0.10.0-2.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. docker run -i -t -name test fedora bash
2. docker start test

Actual results:
[root@t530 ~]# docker start test
test
[root@t530 ~]# echo &?
0

Expected results:
[root@t530 ~]# docker start test
Error: Cannot start container test: The container 429d709bc86c037b09e9f74dfab40aa33dc19bcf3109daf3f5b2fbbd3c6df297 is already running.
2014/04/22 15:29:28 Error: failed to start one or more containers
[root@t530 ~]# echo &?
1

--- Additional comment from Lukas Doktor on 2014-05-05 03:38:57 EDT ---

Upstream Docker version 0.10.0, build dc9c28f/0.10.0 has the same issue (silently passes even thought the container was already running)

Comment 3 Daniel Walsh 2014-05-19 20:34:12 UTC
I don't think this is a bug but a request for enhancement.  I don't see any documentation that says this is what docker should do.

Comment 4 Chris Evich 2014-05-19 21:13:06 UTC
IMHO, the destinction would be if it could even be a problem to ignore the second 'start'.  I could see this as splitting-hairs as well, but in that case it should probably at least be documented behavior somewhere.

I'm not a concurrency/parallel expert, but I'd guess as long as either double-start or double-stop reports an error it's fine.  It's asking for trouble if both ignore the double call.  In that case I'd call it a bug b/c: The start or stop needn't come from the same interface  (i.e. CLI and REST, arriving at the "same" time). In other words, as long as one way (start or stop) ignores doubles, but the other way makes a stink, there are unlikely to be any races possible in customer use/calls.

Comment 5 Lukáš Doktor 2014-05-20 11:27:23 UTC
The main issue here is inconsistency. Old docker behaved differently, than the current one. It would be nice to choose one way and stick with it.

Comment 6 Daniel Walsh 2014-05-20 12:43:07 UTC
Lukas.  I agree I think this one should be fixed.  I think docker start should tell you the container is already started.  

But since the app is controlled by upstream, we only have the ability to send patches.

Comment 7 Chris Evich 2014-05-20 14:07:18 UTC
IMHO, the between-versions behavior inconsistency is nearly always a hard-sell, especially for something sooooo new.  While having it change like this is frustrating for testing/development, it's somewhat to be expected.  We'll have a much easier argument to make for this change if it can be pinned to a nastier problem to expect end-users to workaround.  If we can't, then probably best close this and fixup our tests with version-dependant behavior.

Comment 10 Chris Evich 2014-06-17 14:39:25 UTC
Confirmed fixed in docker-0.11.1-19.el7.x86_64 (or slightly earlier).  Multiple starts, just keep printing the container's name for an already running container.

Comment 11 Matthew Heon 2014-06-17 18:05:06 UTC
Given that this change was intentionally made by upstream, we're not going to fix it. There is now documentation in the manpages and Docker web documentation which establishes that this is intended behaviour (included in docker-0.11.1-19.el7). This should clarify that this is not a bug and remove confusion.

Comment 12 Chris Evich 2014-06-17 18:57:34 UTC
Yep, no need to fix it now and updated documentation is great as well.  Docker autotest has also been updated to reflect this behavior, so we're all good now.  Thanks!


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