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

podman update is missing #5763

Closed
kolyshkin opened this issue Apr 8, 2020 · 8 comments
Closed

podman update is missing #5763

kolyshkin opened this issue Apr 8, 2020 · 8 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. stale-issue

Comments

@kolyshkin
Copy link
Contributor

kolyshkin commented Apr 8, 2020

/kind feature

Description

podman update is missing

Steps to reproduce the issue:

$ podman update
$ podman container update

Describe the results you received:

$ podman update
Error: unrecognized command `podman update`
Try 'podman --help' for more information.
$ podman container update
Error: unrecognized command `podman container update`
Try 'podman container --help' for more information.

Describe the results you expected:

kir@ubuntu1910:~$ docker update   
"docker update" requires at least 1 argument.
See 'docker update --help'.

Usage:  docker update [OPTIONS] CONTAINER [CONTAINER...]

Update configuration of one or more containers
kir@ubuntu1910:~$ docker update --help

Usage:	docker update [OPTIONS] CONTAINER [CONTAINER...]

Update configuration of one or more containers

Options:
      --blkio-weight uint16        Block IO (relative weight), between 10 and 1000, or 0
                                   to disable (default 0)
      --cpu-period int             Limit CPU CFS (Completely Fair Scheduler) period
      --cpu-quota int              Limit CPU CFS (Completely Fair Scheduler) quota
      --cpu-rt-period int          Limit the CPU real-time period in microseconds
      --cpu-rt-runtime int         Limit the CPU real-time runtime in microseconds
  -c, --cpu-shares int             CPU shares (relative weight)
      --cpus decimal               Number of CPUs
      --cpuset-cpus string         CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems string         MEMs in which to allow execution (0-3, 0,1)
      --kernel-memory bytes        Kernel memory limit
  -m, --memory bytes               Memory limit
      --memory-reservation bytes   Memory soft limit
      --memory-swap bytes          Swap limit equal to memory plus swap: '-1' to enable
                                   unlimited swap
      --pids-limit int             Tune container pids limit (set -1 for unlimited)
      --restart string             Restart policy to apply when a container exits
kir@ubuntu1910:~$ 

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

$ podman --version
podman version 1.8.2

Package info (e.g. output of rpm -q podman or apt list podman):

$ rpm -q podman
podman-1.8.2-2.fc31.x86_64

Additional details:

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 8, 2020
@mheon
Copy link
Member

mheon commented Apr 8, 2020

This is deliberate. Podman containers are, by design, immutable once created.

There has been extensive discussion of a way to clone containers (podman container clone) to produce an identical copy with changes, which would act somewhat similar to update. No one's found the time to implement it yet, though.

@kolyshkin
Copy link
Contributor Author

This is deliberate

Would be nice to have it documented/stated somewhere (say output of podman update).

Podman containers are, by design, immutable once created

The resource limits can still be changed using runc update, systemctl set property, or directly writing into cgroup files. Not implying it was a bad decision, just thinking out loud.

@mheon
Copy link
Member

mheon commented Apr 8, 2020

This is deliberate

Would be nice to have it documented/stated somewhere (say output of podman update).

Sure - I'd want to hide the command so it doesn't seem like update is a real command that is ready to use, but we can make it output an error to this effect.

Podman containers are, by design, immutable once created

The resource limits can still be changed using runc update, systemctl set property, or directly writing into cgroup files. Not implying it was a bad decision, just thinking out loud.

Sure - the big blocker here is actually Podman's internal storage of container configuration. Our configs (which contain an initial version of the container's OCI spec among other things) are immutable as a design decision, to make state that needs to be distributed across different Podman processes as minimal as we can. This means that, while we can certainly adjust the resources of a running container, those changes will not be saved, so our report of the container configuration in podman inspect would be wrong, and the next time the container is restarted it would not have the changes made with podman update.

@github-actions
Copy link

github-actions bot commented May 9, 2020

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

@rhatdan
Copy link
Member

rhatdan commented Jun 9, 2020

@mheon What do you want to do with this one?

@mheon
Copy link
Member

mheon commented Jun 9, 2020

Consolidate everything related to this in one podman container clone issue

@baude
Copy link
Member

baude commented Sep 2, 2020

@mheon please do the consolidation and close this

@rhatdan
Copy link
Member

rhatdan commented Sep 10, 2020

Duplicate of #1925

@rhatdan rhatdan marked this as a duplicate of #1925 Sep 10, 2020
@rhatdan rhatdan closed this as completed Sep 10, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
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. stale-issue
Projects
None yet
Development

No branches or pull requests

5 participants