Привет, у меня возникла проблема с сервером, на котором я использую LXC. Похоже, что после перезагрузки LXC-контейнеры перестали запускаться, хотя никаких изменений в аппаратной части или обновлениях не производилось. Я также попытался создать новый LXC, но и это не удалось.
Код:
`lxc_spawn: 1734 Operation not permitted - Failed to clone a new set of namespaces`
`__lxc_start: 2074 Failed to spawn container "123"`
`TASK ERROR: startup for container '123' failed`
`lxc-start 123 20221124235616.579 ERROR start - ../src/lxc/start.c:lxc_spawn:1734 - Operation not permitted - Failed to clone a new set of namespaces`
`lxc-start 123 20221124235616.580 ERROR start - ../src/lxc/start.c:__lxc_start:2074 - Failed to spawn container "123"`
`lxc-start 123 20221124235616.701 ERROR conf - ../src/lxc/conf.c:userns_exec_1:5052 - Failed to clone process in new user namespace`
`lxc-start 123 20221124235617.506 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:306 - The container failed to start`
`lxc-start 123 20221124235617.506 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options`
`_______________________`
`Code: root@host:~# systemctl status pve-container@123.service`
`● pve-container@123.service - PVE LXC Container: 123`
` Loaded: loaded (/lib/systemd/system/pve-container@.service; static)`
` Active: failed (Result: exit-code) since Thu 2022-11-24 16:25:07 PST; 27s ago`
` Docs: man:lxc-start`
` man:lxc`
` man:pct`
` Process: 19947 ExecStart=/usr/bin/lxc-start -F -n 123 (code=exited, status=1/FAILURE)`
` Main PID: 19947 (code=exited, status=1/FAILURE)`
` CPU: 381ms`
`Nov 24 16:25:06 host systemd[1]: Started PVE LXC Container: 123.`
`Nov 24 16:25:07 host systemd[1]: pve-container@123.service: Main process exited, code=exited, status=1/FAILURE`
`Nov 24 16:25:07 host systemd[1]: pve-container@123.service: Failed with result 'exit-code'.`
`_______________________`
И вот сообщения, которые появляются при попытке создания нового LXC:
`Code: Formatting '/mnt/HOMEPOOL/lxc/images/142/vm-142-disk-0.raw', fmt=raw size=8589934592 preallocation=off`
`Creating filesystem with 2097152 4k blocks and 524288 inodes`
`Filesystem UUID: 3220745f-952c-4450-b285-878023b67b1a`
`Superblock backups stored on blocks:`
` 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632`
`extracting archive '/mnt/HOMEPOOL/iso/template/cache/debian-11-standard_11.3-1_amd64.tar.zst'`
`../src/lxc/cmd/lxc_usernsexec.c: 407: main - Operation not permitted - Failed to unshare mount and user namespace`
`../src/lxc/cmd/lxc_usernsexec.c: 452: main - Inappropriate ioctl for device - Failed to read from pipe file descriptor 3`
`TASK ERROR: unable to create CT 142 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --zstd --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/142/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1`
`_______________________`
`lxcfs is running`
`Code: root@host:~# systemctl status lxcfs.service`
`● lxcfs.service - FUSE filesystem for LXC`
` Loaded: loaded (/lib/systemd/system/lxcfs.service; enabled; vendor preset: enabled)`
` Active: active (running) since Thu 2022-11-24 14:44:29 PST; 1h 3min ago`
` Docs: man:lxcfs(1)`
` Main PID: 32121 (lxcfs)`
` Tasks: 3 (limit: 76998)`
` Memory: 728.0K`
` CPU: 4ms`
` CGroup: /system.slice/lxcfs.service`
` └─32121 /usr/bin/lxcfs /var/lib/lxcfs`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_diskstats`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_loadavg`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_meminfo`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_stat`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_swaps`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_uptime`
`Nov 24 14:44:29 host lxcfs[32121]: - shared_pidns`
`Nov 24 14:44:29 host lxcfs[32121]: - cpuview_daemon`
`Nov 24 14:44:29 host lxcfs[32121]: - loadavg_daemon`
`Nov 24 14:44:29 host lxcfs[32121]: - pidfds`
Спасибо.
Код:
`lxc_spawn: 1734 Operation not permitted - Failed to clone a new set of namespaces`
`__lxc_start: 2074 Failed to spawn container "123"`
`TASK ERROR: startup for container '123' failed`
`lxc-start 123 20221124235616.579 ERROR start - ../src/lxc/start.c:lxc_spawn:1734 - Operation not permitted - Failed to clone a new set of namespaces`
`lxc-start 123 20221124235616.580 ERROR start - ../src/lxc/start.c:__lxc_start:2074 - Failed to spawn container "123"`
`lxc-start 123 20221124235616.701 ERROR conf - ../src/lxc/conf.c:userns_exec_1:5052 - Failed to clone process in new user namespace`
`lxc-start 123 20221124235617.506 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:306 - The container failed to start`
`lxc-start 123 20221124235617.506 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options`
`_______________________`
`Code: root@host:~# systemctl status pve-container@123.service`
`● pve-container@123.service - PVE LXC Container: 123`
` Loaded: loaded (/lib/systemd/system/pve-container@.service; static)`
` Active: failed (Result: exit-code) since Thu 2022-11-24 16:25:07 PST; 27s ago`
` Docs: man:lxc-start`
` man:lxc`
` man:pct`
` Process: 19947 ExecStart=/usr/bin/lxc-start -F -n 123 (code=exited, status=1/FAILURE)`
` Main PID: 19947 (code=exited, status=1/FAILURE)`
` CPU: 381ms`
`Nov 24 16:25:06 host systemd[1]: Started PVE LXC Container: 123.`
`Nov 24 16:25:07 host systemd[1]: pve-container@123.service: Main process exited, code=exited, status=1/FAILURE`
`Nov 24 16:25:07 host systemd[1]: pve-container@123.service: Failed with result 'exit-code'.`
`_______________________`
И вот сообщения, которые появляются при попытке создания нового LXC:
`Code: Formatting '/mnt/HOMEPOOL/lxc/images/142/vm-142-disk-0.raw', fmt=raw size=8589934592 preallocation=off`
`Creating filesystem with 2097152 4k blocks and 524288 inodes`
`Filesystem UUID: 3220745f-952c-4450-b285-878023b67b1a`
`Superblock backups stored on blocks:`
` 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632`
`extracting archive '/mnt/HOMEPOOL/iso/template/cache/debian-11-standard_11.3-1_amd64.tar.zst'`
`../src/lxc/cmd/lxc_usernsexec.c: 407: main - Operation not permitted - Failed to unshare mount and user namespace`
`../src/lxc/cmd/lxc_usernsexec.c: 452: main - Inappropriate ioctl for device - Failed to read from pipe file descriptor 3`
`TASK ERROR: unable to create CT 142 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --zstd --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/142/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1`
`_______________________`
`lxcfs is running`
`Code: root@host:~# systemctl status lxcfs.service`
`● lxcfs.service - FUSE filesystem for LXC`
` Loaded: loaded (/lib/systemd/system/lxcfs.service; enabled; vendor preset: enabled)`
` Active: active (running) since Thu 2022-11-24 14:44:29 PST; 1h 3min ago`
` Docs: man:lxcfs(1)`
` Main PID: 32121 (lxcfs)`
` Tasks: 3 (limit: 76998)`
` Memory: 728.0K`
` CPU: 4ms`
` CGroup: /system.slice/lxcfs.service`
` └─32121 /usr/bin/lxcfs /var/lib/lxcfs`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_diskstats`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_loadavg`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_meminfo`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_stat`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_swaps`
`Nov 24 14:44:29 host lxcfs[32121]: - proc_uptime`
`Nov 24 14:44:29 host lxcfs[32121]: - shared_pidns`
`Nov 24 14:44:29 host lxcfs[32121]: - cpuview_daemon`
`Nov 24 14:44:29 host lxcfs[32121]: - loadavg_daemon`
`Nov 24 14:44:29 host lxcfs[32121]: - pidfds`
Спасибо.
