Fixed podman update --pids-limit

Added the functionality for a user to update the PIDs limit for a
container.

Fixes: #16543

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
Jake Correnti
2022-12-30 23:05:12 -05:00
parent aeb36e5dad
commit 479052afa6
5 changed files with 29 additions and 11 deletions

View File

@ -1,5 +1,5 @@
####> This option file is used in:
####> podman create, run
####> podman create, run, update
####> If file is edited, make sure the changes
####> are applicable to all of those.
#### **--pids-limit**=*limit*

View File

@ -53,6 +53,8 @@ This command takes one argument, a container name or ID, alongside the resource
@@option memory-swappiness
@@option pids-limit
## EXAMPLEs
@ -63,12 +65,12 @@ podman update --cpus=5 myCtr
update a container with all available options for cgroups v2
```
podman update --cpus 5 --cpuset-cpus 0 --cpu-shares 123 --cpuset-mems 0 --memory 1G --memory-swap 2G --memory-reservation 2G --blkio-weight-device /dev/zero:123 --blkio-weight 123 --device-read-bps /dev/zero:10mb --device-write-bps /dev/zero:10mb --device-read-iops /dev/zero:1000 --device-write-iops /dev/zero:1000 ctrID
podman update --cpus 5 --cpuset-cpus 0 --cpu-shares 123 --cpuset-mems 0 --memory 1G --memory-swap 2G --memory-reservation 2G --blkio-weight-device /dev/zero:123 --blkio-weight 123 --device-read-bps /dev/zero:10mb --device-write-bps /dev/zero:10mb --device-read-iops /dev/zero:1000 --device-write-iops /dev/zero:1000 --pids-limit 123 ctrID
```
update a container with all available options for cgroups v1
```
podman update --cpus 5 --cpuset-cpus 0 --cpu-shares 123 --cpuset-mems 0 --memory 1G --memory-swap 2G --memory-reservation 2G --memory-swappiness 50 ctrID
podman update --cpus 5 --cpuset-cpus 0 --cpu-shares 123 --cpuset-mems 0 --memory 1G --memory-swap 2G --memory-reservation 2G --memory-swappiness 50 --pids-limit 123 ctrID
```
## SEE ALSO