meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vm:proxmox:lxc:issues [2021/01/27 19:45] – created 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 ===== | ||
+ | |||
+ | Gitlab runner fails to start docker executor: | ||
+ | < | ||
+ | ERROR: Job failed (system failure): prepare environment: | ||
+ | </ | ||
+ | |||
+ | **Reason:** '' | ||
+ | **Reproduction: | ||
+ | <code bash> | ||
+ | # works: | ||
+ | docker run -it busybox | ||
+ | |||
+ | # problem: | ||
+ | docker run --cpuset-cpus=' | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
===== Failed to set up mount namespacing: | ===== Failed to set up mount namespacing: | ||
Line 12: | Line 151: | ||
gru 28 08:19:10 hostname sshd[783]: pam_systemd(sshd: | gru 28 08:19:10 hostname sshd[783]: pam_systemd(sshd: | ||
gru 28 08:19:14 hostname systemd[877]: | gru 28 08:19:14 hostname systemd[877]: | ||
- | < | + | </code> |