2017-05-19 20:51:20 |
Dawid Wróbel |
bug |
|
|
added bug |
2017-05-19 20:52:58 |
Dawid Wróbel |
description |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set couchpotato raw.idmap -"
However upon starting the container, I get errors as following:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
Please note that if I set idmap to either "both 999 999" or echo -e "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set couchpotato raw.idmap -"
However upon starting the container, I get errors (log excerpt below). If, on the other hand, I set idmap to either "both 999 999" or echo -e "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
Log excerpt:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
|
2017-05-19 20:53:24 |
Dawid Wróbel |
description |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set couchpotato raw.idmap -"
However upon starting the container, I get errors (log excerpt below). If, on the other hand, I set idmap to either "both 999 999" or echo -e "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
Log excerpt:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set mycontainer raw.idmap -"
However upon starting the container, I get errors (log excerpt below). If, on the other hand, I set idmap to either "both 999 999" or echo -e "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
Log excerpt:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
|
2017-05-19 20:53:42 |
Dawid Wróbel |
description |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set mycontainer raw.idmap -"
However upon starting the container, I get errors (log excerpt below). If, on the other hand, I set idmap to either "both 999 999" or echo -e "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
Log excerpt:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
I am trying to map two users (999, 1001) to one of my containers. I added both IDs to /etc/subgid and /etc/subuid. I followed by setting raw.id_map property value (as instructed here https://lists.linuxcontainers.org/pipermail/lxc-users/2017-March/013034.html):
"echo -e "both 999 999\nboth 1001 1001" | lxc config set mycontainer raw.idmap -"
However upon starting the container, I get errors (log excerpt below). If, on the other hand, I set idmap to either "both 999 999" or "both 1001 1001" only - i.e. if I map only one user at the time, the container starts just fine and the user is mapped as expected.
My subgid and subuid look as follows:
lxd:100000:65536
root:100000:65536
root:1001:1
root:999:1
Log excerpt:
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/02/22 18:54 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc 20170519204102.895 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer" already existed.
lxc 20170519204102.896 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-1" already existed.
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-1: No such file or directory
lxc 20170519204102.897 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-2" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-2: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-3" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-3: No such file or directory
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-4" already existed.
lxc 20170519204102.898 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-4: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-5" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-5: No such file or directory
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-6" already existed.
lxc 20170519204102.899 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-6: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-7" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-7: No such file or directory
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-8" already existed.
lxc 20170519204102.900 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-8: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-9" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-9: No such file or directory
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/mycontainer-10" already existed.
lxc 20170519204102.901 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/mycontainer-10: No such file or directory
lxc 20170519204102.123 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.123 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsns_chown:1485 - Error requesting cgroup chown in new namespace
lxc 20170519204102.169 WARN lxc_conf - conf.c:lxc_delete_network:3038 - Failed to remove "vethUVG4PV" from host: Invalid argument.
lxc 20170519204102.170 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "mycontainer".
lxc 20170519204102.764 ERROR lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.
lxc 20170519204102.764 ERROR lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "mycontainer".
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.764 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
lxc 20170519204102.770 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.770 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/mycontainer-11
lxc 20170519204102.775 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.775 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/mycontainer-11
lxc 20170519204102.781 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.781 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/mycontainer-11
lxc 20170519204102.787 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.787 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/mycontainer-11
lxc 20170519204102.793 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.793 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/mycontainer-11
lxc 20170519204102.798 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.798 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/mycontainer-11
lxc 20170519204102.803 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.803 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/mycontainer-11
lxc 20170519204102.808 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.808 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/mycontainer-11
lxc 20170519204102.813 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.813 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/mycontainer-11
lxc 20170519204102.818 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.818 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/mycontainer-11
lxc 20170519204102.823 ERROR lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings
lxc 20170519204102.823 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/mycontainer-11
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.9-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri May 19 16:42:04 2017
InstallationDate: Installed on 2016-07-28 (295 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install) |
|
2017-05-28 12:10:04 |
Christian Brauner |
lxd (Ubuntu): status |
New |
In Progress |
|
2017-05-29 09:19:41 |
Christian Brauner |
lxd (Ubuntu): assignee |
|
Christian Brauner (cbrauner) |
|
2017-05-30 07:17:39 |
Christian Brauner |
bug watch added |
|
https://github.com/lxc/lxc/issues/1598 |
|
2017-06-01 23:52:56 |
Christian Brauner |
lxd (Ubuntu): status |
In Progress |
Fix Committed |
|
2017-06-01 23:53:13 |
Christian Brauner |
bug task added |
|
lxc (Ubuntu) |
|
2017-06-01 23:53:21 |
Christian Brauner |
lxc (Ubuntu): status |
New |
Fix Committed |
|
2017-06-01 23:53:35 |
Christian Brauner |
lxc (Ubuntu): assignee |
|
Christian Brauner (cbrauner) |
|
2017-06-30 05:04:20 |
Stéphane Graber |
lxd (Ubuntu): status |
Fix Committed |
Invalid |
|
2017-09-06 11:12:14 |
Christian Brauner |
lxc (Ubuntu): status |
Fix Committed |
Fix Released |
|