podman: [Bug]: The podman container update command doesn't seem to work.
Issue Description
The podman container update command doesn’t seem to work.
Steps to reproduce the issue
Steps to reproduce the issue
podman container create --name testing registry.opensuse.org/opensuse/leap /bin/sh -c 'sleep 3600'podman container start testingpodman container inspect -f '{{.HostConfig.BlkioWeight}}' testingpodman update --blkio-weight 10 testingpodman container inspect -f '{{.HostConfig.BlkioWeight}}' testing
NOTE: On Ubuntu 22.04 I had to use --memory-swap because --blkio-weight returned an error:
2023-01-23T11:07:22.541171Z: opening file `io.weight` for writing: No such file or directory
Error: `/usr/bin/crun update --resources=/var/tmp/podman2282833966 5a3aceff3fa774c996ee639d29028e4b155e923202483600d710f92e1c4efba1` failed: exit status 1
Describe the results you received
The inspect command returns the same value before and after podman update, which didn’t return any error.
Describe the results you expected
The inspect command should return the changed value after podman update, otherwise the latter command should fail with an error message.
podman info output
podman info on openSUSE Tumbleweed (QEMU VM w/ 2 vCPU's & 1536M RAM):
host:
arch: amd64
buildahVersion: 1.28.0
cgroupControllers:
- cpuset
- cpu
- io
- memory
- hugetlb
- pids
- rdma
- misc
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.5-2.1.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.1.5, commit: unknown'
cpuUtilization:
idlePercent: 99.77
systemPercent: 0.1
userPercent: 0.13
cpus: 2
distribution:
distribution: '"opensuse-tumbleweed"'
version: "20230119"
eventLogger: journald
hostname: susetest
idMappings:
gidmap: null
uidmap: null
kernel: 6.1.7-1-default
linkmode: dynamic
logDriver: journald
memFree: 534142976
memTotal: 1542692864
networkBackend: cni
ociRuntime:
name: runc
package: runc-1.1.4-2.1.x86_64
path: /usr/bin/runc
version: |-
runc version 1.1.4
commit: v1.1.4-0-ga916309fff0f
spec: 1.0.2-dev
go: go1.18.6
libseccomp: 2.5.4
os: linux
remoteSocket:
path: /run/podman/podman.sock
security:
apparmorEnabled: true
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: false
seccompEnabled: true
seccompProfilePath: /etc/containers/seccomp.json
selinuxEnabled: false
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.2.0-1.1.x86_64
version: |-
slirp4netns version 1.2.0
commit: unknown
libslirp: 4.7.0
SLIRP_CONFIG_VERSION_MAX: 5
libseccomp: 2.5.4
swapFree: 2148233216
swapTotal: 2148507648
uptime: 2h 11m 1.00s (Approximately 0.08 days)
plugins:
authorization: null
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- registry.opensuse.org
- docker.io
store:
configFile: /etc/containers/storage.conf
containerStore:
number: 1
paused: 0
running: 1
stopped: 0
graphDriverName: overlay
graphOptions:
overlay.mountopt: nodev,metacopy=on
graphRoot: /var/lib/containers/storage
graphRootAllocated: 30054285312
graphRootUsed: 2665611264
graphStatus:
Backing Filesystem: btrfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "true"
imageCopyTmpDir: /var/tmp
imageStore:
number: 1
runRoot: /run/containers/storage
volumePath: /var/lib/containers/storage/volumes
version:
APIVersion: 4.3.1
Built: 1673913600
BuiltTime: Mon Jan 16 19:00:00 2023
GitCommit: ""
GoVersion: go1.17.13
Os: linux
OsArch: linux/amd64
Version: 4.3.1
### Podman in a container
No
### Privileged Or Rootless
None
### Upstream Latest Release
Yes
### Additional environment details
Tried on both:
- openSUSE Tumbleweed (QEMU VM w/ 2 vCPU's & 1536M RAM) running as root
- Laptop with Ubuntu 22.04 using [Kubic repo](https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04) running as non-root.
### Additional information
_No response_
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 25 (20 by maintainers)
This is being worked on.
We don’t have an exact timeframe, but probably first half of this year?
Refactoring inspect would be a sizable amount of work given the complexity (you need to support cgroups v1 and v2 both, and the various cgroups modes that we support (split cgroups, for example). So I’m going to say “not worth it” unless you have serious time constraints.