meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vm:proxmox:lxc:issues [2021/03/22 15:44] – niziak | vm:proxmox:lxc:issues [2023/07/28 12:13] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LXC Issues ====== | ====== LXC Issues ====== | ||
| + | |||
| + | ===== lxc_init: Failed to run lxc.hook.pre-start for container ===== | ||
| + | |||
| + | After upgrade guest system from Debian 12.0 to 12.1. | ||
| + | |||
| + | <code bash> | ||
| + | lxc-start -lDEBUG -o error.log -F -n < | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | PVE ('' | ||
| + | |||
| + | |||
| + | ===== apply caps: operation not permitted: unknown. ===== | ||
| + | |||
| + | BalenaOS Build inside privileged LXC: | ||
| + | < | ||
| + | docker: Error response from daemon: OCI runtime create failed: container_linux.go: | ||
| + | </ | ||
| + | |||
| + | Solution (not secure!): | ||
| + | <file container.conf> | ||
| + | lxc.apparmor.profile: | ||
| + | lxc.cgroup.devices.allow: | ||
| + | lxc.cap.drop: | ||
| + | </ | ||
| + | |||
| + | Source: [[https:// | ||
| + | |||
| + | |||
| + | ===== Slow login into container ===== | ||
| + | |||
| + | see below | ||
| + | |||
| + | ===== Failed at step NAMESPACE spawning / | ||
| + | |||
| + | Debian Bullseye in unprivileged container: | ||
| + | |||
| + | < | ||
| + | systemd[579]: | ||
| + | systemd[579]: | ||
| + | </ | ||
| + | SOLUTION: enable container nesting. | ||
| + | |||
| + | |||
| + | |||
| + | ===== cannot stop container ===== | ||
| + | Container works, responds to pings but it is not possible to SSH or attach. | ||
| + | |||
| + | Normal commands to stop or reboot doesn' | ||
| + | |||
| + | **CAUSE:** Container was freezed for snapshot. All processess are in ' | ||
| + | **SOLUTION: | ||
| + | <code bash> | ||
| + | echo THAWED > / | ||
| + | </ | ||
| + | |||
| + | **Info**: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | ==== Investigation ==== | ||
| + | |||
| + | So killing container is solution: | ||
| + | <code bash> | ||
| + | pstree -p | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | kill -9 3747514 | ||
| + | </ | ||
| + | |||
| + | |||
| + | Now it is not possible to start LXC container again. Debugging: | ||
| + | <code bash> | ||
| + | lxc-start -o lxc-start.log -lDEBUG -F -n 200 | ||
| + | cat lxc-start.log | ||
| + | |||
| + | lxc-start 200 20210325085035.665 INFO conf - conf.c: | ||
| + | lxc-start 200 20210325085036.126 DEBUG conf - conf.c: | ||
| + | </ | ||
| + | |||
| + | **Reason:** after killing container systemd, orphaned cgroups left. | ||
| + | <code bash> | ||
| + | find / | ||
| + | |||
| + | # Lot of errors: | ||
| + | find: cannot delete ‘/ | ||
| + | </ | ||
| + | |||
| + | All processess from container 200 are in ' | ||
| + | <code bash> | ||
| + | ps axl | awk '$10 ~ /D/' | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | echo w > / | ||
| + | |||
| + | [587314.999001] smbd D 0 1181293 | ||
| + | [587314.999002] Call Trace: | ||
| + | [587314.999004] | ||
| + | [587314.999005] | ||
| + | [587314.999007] | ||
| + | [587314.999009] | ||
| + | [587314.999011] | ||
| + | [587314.999013] | ||
| + | [587314.999014] | ||
| + | [587314.999016] | ||
| + | [587314.999018] | ||
| + | [587314.999020] | ||
| + | |||
| + | </ | ||
| + | |||
| + | So it looks like whole container cgroup was freezed for snapshot and problem happens. | ||
| + | |||
| ===== nested docker in cpulimit ===== | ===== nested docker in cpulimit ===== | ||