Uh oh!
There was an error while loading. Please reload this page.
Rename a existing container - #8570
Conversation
cb27f73 to
73a69acCompareThere was a problem hiding this comment.
lies! i never wrote this ;)
There was a problem hiding this comment.
Oops let me see, It may be just a cut and paste issue.
There was a problem hiding this comment.
Sorry, It is a cut and paste errors(now removed).
SvenDowideit
commented
Oct 29, 2014
oh, yes, i would like this. Docs LGTM - now for an implementation question. what happens when you rename a container that has been linked to? does everything still hand together? (I presume so, but :)) |
1f39e4c to
62892b9Comparebrahmaroutu
commented
Oct 29, 2014
About the links, they work after rename, I tested them manually and also have integration tests that I can add, please let me know. I see the link is actually added to hosts file using IP address and container name is not used. |
SvenDowideit
commented
Oct 30, 2014
plus you need core review, @crosbymichael@tiborvass ? |
There was a problem hiding this comment.
Should be "an existing", here and below.
fredlf
commented
Nov 3, 2014
Docs LGTM from me once the grammar mistake is fixed. Ping @jamtur01 @ostezer. Still needs core review. Ping @crosbymichael@tiborvass Many thanks for the contribution. |
tiborvass
commented
Nov 3, 2014
@brahmaroutu Thanks for your contribution. I'd like to note though that this is not a proposal (hence my editing of the title). A proposal is either in a form of an issue explaining what are the changes needed and why, OR a PR to the documentation explaining what would change if it were implemented (see #8859 as an example). Design needs to be reviewed with @shykes. Sorry if it's taking longer than expected! I'll make sure we review this in the next design review session. |
62892b9 to
e0e9507Comparebrahmaroutu
commented
Nov 3, 2014
@fredlf Sorry, I made that minor change to docs. |
fredlf
commented
Nov 3, 2014
No problem, and thanks! |
50c38fb to
7712f98Compare7712f98 to
d06850aCompareshykes
commented
Dec 23, 2014
Design review with @icecrime I approve |
shykes
commented
Dec 23, 2014
#uxapproved |
There was a problem hiding this comment.
I don't think these are needed if you deleteAllContainers
LK4D4
commented
Jan 9, 2015
There was a problem hiding this comment.
There is a major issue here, as error is returned without releasing the lock (same for the code path right above):
$ docker run --name test busybox true
$ docker rename test " "
Error response from daemon: Error when allocating new name: Invalid container name ( ), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed
FATA[0000] Error: failed to rename container named test
$ docker ps -a # Hangs (probably daemon in deadlock)
I think we should use defer container.Unlock() to play safe.
There was a problem hiding this comment.
added defer on Unlock. thanks for pointing it out.
icecrime
commented
Jan 9, 2015
Not LGTM: there is a blocking issue (see my comment). |
62ecf5c to
3820e9dComparebrahmaroutu
commented
Jan 9, 2015
Please let me know if I change it to the first ever PUT on Docker server, makes sense, instead of POST? |
icecrime
commented
Jan 13, 2015
Can we get an API maintainer input on the method to use so we can move on with this cool PR? Ping @vieux@jfrazelle! |
vieux
commented
Jan 13, 2015
I would use GET parameter: |
brahmaroutu
commented
Jan 13, 2015
@vieux Can you also let me know if I should change it to PUT call? |
vieux
commented
Jan 13, 2015
Sorry I meant a We don't have any PUT on the API, we use only POST, GET or DELETE to I would stay on the POST |
Closesmoby#3036 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
3820e9d to
21a809dComparebrahmaroutu
commented
Jan 13, 2015
LK4D4
commented
Jan 13, 2015
LGTM |
thaJeztah
commented
Jan 13, 2015
fwiw; since I'm the one coming up with (If the need ever rises to be more "strict", I think that would require a complete review of the whole API) |
jessfraz
commented
Jan 13, 2015
LGTM |
vieux
commented
Jan 13, 2015
No API bump ? |
jessfraz
commented
Jan 13, 2015
@vieux making patch now |
vieux
commented
Jan 13, 2015
@jfrazelle thank you. |
vieux
commented
Jan 13, 2015
It's easier for us when there is doc, every week we can look and see if we need to add the new endpoints in swarm. |
brahmaroutu
commented
Jan 13, 2015
@jfrazelle thanks, let me know if I can help. |
The "or rename" part was removed from the error-message, because renaming wasn't possible at the time. Now that moby#8570 is merged, renaming existing containers is possible. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
brahmaroutu
commented
Jan 14, 2015
@borromeotlhs there are not many tests testing 409 and I did not add one. I can quickly add a test if you want but I need a issue to do so. |
Addresses #3036
Signed-off-by: Srini Brahmaroutu srbrahma@us.ibm.com