Description
Docker has a "rename" subcommand allowing to change a container name. This feature is missing in podman, and is useful in some cases.
Thank you!
I agree the feature from docker would be useful. Shutting down and removing the container then creating a new one isn't a valid answer when you run containers in production.
I was thinking about a podman alias command that would let you add/remove aliases that would act as extra names for a container. Changing a container's actual name would be very difficult for us do to the internal structure of containers, but I can easily let you add/remove additional names from existing containers.
@mheon hello :).
Sooo. an alias might work, but we'll need to find a way to make this alias work for tasks like "podman start
Also, it would be needed to set a "preferred alias" or something that shows up in a podman ps output as the container name, else we will have "some" issues finding what container is running and so on.
Fact is, we really rely on the container name for a lot of tasks, and we need it to be as stable as possible - like docker ;).
Usages include:
I don't know if @EmilienM has other thoughts.. ?
During a rename, can the container ID change ?
@baude I think the id can change - at least, I see no reason for us to base our workflows on ids as they aren't predictable, on the contrary to the name (hence the need of the "rename" :) ).
Aliases would work like container names for everything except PS, where
we'd probably need a separate column for them (would be good enough for
grep, but probably break things if you're parsing the output of PS). Of
course, if you wanted to filter to a single container based on name/alias,
we could make that work exactly like it does now
On Mon, Dec 3, 2018, 11:54 Cédric Jeanneret <[email protected] wrote:
@baude https://github.com/baude I think the id can change - at least, I
see no reason for us to base our workflows on ids as they aren't
predictable, on the contrary to the name (hence the need of the "rename" :)
).—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/issues/1925#issuecomment-443782918,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHYHCCVeIqOKeDvdJDLmn3IDk9HSwFrBks5u1VdSgaJpZM4Y-4ds
.
@mheon hmm ok. well, I think we can give a try?
I think I can slot this in early next week
Hello @mheon - any news for this? :)
Cheers,
C.
hello @mheon - any news? We have a really ugly work-around, and would really appreciate something more "nice" :).
I'll bump it up the to-do list again, but no promises - things consistently keep managing to explode and require attention.
@mheon This probably goes along with the clone stuff.
Seems like this would be something for a new developer to take a stab at?
Agree - if we have any interns coming on, or anyone who wants to take a
first issue, a clone command is a good starting point.
On Sat, Apr 13, 2019, 04:58 Daniel J Walsh notifications@github.com wrote:
Seems like this would be something for a new developer to take a stab at?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/issues/1925#issuecomment-482791182,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHYHCG6aM0-QLs-3f5kDvdeeLhrfYsoSks5vgZwbgaJpZM4Y-4ds
.
@dougsland interested in trying a Podman issue? Then we can get you a Podman sticker too!
@TomSweeneyRedHat sure thing, let me check and dig this.
@dougsland are you working on this issue? can I take this up?
@dougsland are you working on this issue? can I take this up?
@weirdwiz I am in a conference right now but my plan is continue on this next week. However, if you have any patch ready to go fell free to submit.
@dougsland I see, I will leave you to it then as you are already working on it :grinning:
@dougsland @ashley-cui @weirdwiz @QiWang19 Since this never made progress could someone verify that they are working on it, or grab it for themselves.
I can take this if @dougsland hasn't stated.
To be 100% clear here: I don't think podman rename makes sense in current context. I would greatly prefer a podman container clone that makes a copy of an existing container, with changes.
(Aliases are also a potential option, but I think we should start with clone)
I am fine with this, as long as we have an alternative.
FWIW, Docker has a rename.... https://docs.docker.com/engine/reference/commandline/rename/
@mheon @rhatdan, let's find a consensus on how to proceed. Instead of rename we would add a clone that might expose an optional --name flag?
@QiWang19, do you have enough cycles to work on that or shall we add a community tag?
@vrothberg I'm poking at clone in spare cycles, but it's a bit of a monster - needs a pretty significant rewrite of our parsing code to handle it.
Can we start small, and only allow clone to change the name in the beginning. Then we can add options as people ask.
Not sure we need full support for every option.
Sure, I can get something with basic functionality landed quickly, I think.
On Wed, Oct 2, 2019, 09:53 Daniel J Walsh notifications@github.com wrote:
Can we start small, and only allow clone to change the name in the
beginning. Then we can add options as people ask.Not sure we need full support for every option.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/issues/1925?email_source=notifications&email_token=AB3AOCEX6EVO3GZKCYNTTRDQMSRWLA5CNFSM4GH3Q5WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAE2ILQ#issuecomment-537502766,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3AOCASXWWHKDBYAUAQYS3QMSRWLANCNFSM4GH3Q5WA
.
Great. I assigned @mheon :+1:
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.
Is there any progress on this issue? I was looking for a rename feature in a blue-green-deploy. First start a new container with a postfix. Update het mapping in our loadbalancer. Remove the old container. And finally rename the new container to the old one to het back in the original situation without hardly any downtime (only the time that the mapping was updated). For this usecase An alias would indeed also work, which is why I am wondering of there is any progress of alternatives.
It's on the agenda, but not an immediate priority - for now, all of our effort is going into the new HTTP API.
Still in the future.
FYI, this is now a RFE Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1829029
@TomSweeneyRedHat well, just tried to check it out and didn't have access to it; even when logged in.
@renich I'm not sure how the perms work on the Red Hat Bugzilla system. In short, it basically has the same info as in this issue. When we have an issue pointing at a BZ or vice versa, I like to set up a pointer the other way so we don't forget to close one out after it's fixed.
@mheon Want to work on this with an Intern?
I think first step is probably to convert all of these various issues requesting renaming, updating, moving into pods, etc into one single podman container clone issue.
Beyond that, I need to do a bit of architecture work to figure out how this exactly should look, I don't know for sure how complex this is going to be.
I was looking for a feature and came here. I hope it will be added soon.
Best way to get new features is to open PRs :^)
A friendly reminder that this issue had no activity for 30 days.
Sadly coming up on two years on this one
A friendly reminder that this issue had no activity for 30 days.
This one got a little more active this week.