Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement podman update --restart #20419

Closed
pinko-fowle opened this issue Oct 19, 2023 · 9 comments
Closed

Implement podman update --restart #20419

pinko-fowle opened this issue Oct 19, 2023 · 9 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@pinko-fowle
Copy link

Feature request description

I'd like to be able to do similar to Docker, and update the RestartPolicy for a container.

Suggest potential solution

On the Docker CLI, I can do docker update --restart=never wonderous_wozniak.

Trying to do similar in podman results in:

$ podman update --restart never st-postgres-13-bookworm
Error: unknown flag: --restart

Have you considered any alternatives?

Unknown.

Additional context

This is extra troublesome because unless-stopped restart policy doesnt work (#20418), and doing a naive solution like always does results in multiple containers each trying to start & grab the same ports on our machine. We would like to at least be able to tell some containers to stop restarting, but found that update lacks a --restart like Docker does.

@pinko-fowle pinko-fowle added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 19, 2023
@rhatdan
Copy link
Member

rhatdan commented Oct 19, 2023

Can you just use --replace and remove and recreate the container?

podman update can only update the cgroup settings for the running container. The current design of Podman does not allow the modification of the core container database.

@pinko-fowle
Copy link
Author

These are postgres, mysql, & other dev-focused data-storage containers, and have the data inside the container (volume mounts on Mac are notoriously slow). AFAIK, we'd lose the data inside the containers (unless we develop tools to copy the datas out/export the dbs). So I don't think we have a very good path to --replace'ing the containers.

One constraint we'd be fine living with, if this changes anything, is that we only want to change the RestartPolicy of stopped containers.

@rhatdan
Copy link
Member

rhatdan commented Oct 23, 2023

@mheon thoughts?

@mheon
Copy link
Member

mheon commented Oct 23, 2023

Same situation as #14678 - we can do this with SQLite, but not BoltDB. Good candidate for a Podman 5.1 once we deprecate Bolt?

Copy link

A friendly reminder that this issue had no activity for 30 days.

Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Dec 24, 2023

Now that we are moving to sqlite, we can recosider this, correct @mheon ?

@mheon
Copy link
Member

mheon commented Feb 26, 2024

Yes, though I don't think we can target this at 5.0 itself. Seems like a 5.1 thing. Removing the label.

@mheon mheon removed the 5.0 label Feb 26, 2024
@mheon
Copy link
Member

mheon commented May 7, 2024

This will be in 5.1

@mheon mheon closed this as completed May 7, 2024
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 6, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants