PS: I have done the necessary setup for uid-mapping. here i will provide the relevant parts of container startup of a successful and an unsuccessful one. Extension “log” is not permitted as attachements, so I cannot provide the complete logs if the startup process.
success (container name ‘success’):
lxc 20180507072828.428 TRACE lxc_conf - conf.c:make_anonymous_mount_file:2256 - Created anonymous mount file
lxc 20180507072828.435 DEBUG lxc_conf - conf.c:mount_entry:1863 - Remounting “/var/lib/lxd/devlxd” on “/usr/lib/lxc/rootfs/dev/lxd” to respect bind or remount options
lxc 20180507072828.436 DEBUG lxc_conf - conf.c:mount_entry:1884 - Flags for “/var/lib/lxd/devlxd” were 4128, required extra flags are 0
lxc 20180507072828.436 DEBUG lxc_conf - conf.c:mount_entry:1894 - Mountflags already were 4096, skipping remount
lxc 20180507072828.437 DEBUG lxc_conf - conf.c:mount_entry:1921 - Mounted “/var/lib/lxd/devlxd” on “/usr/lib/lxc/rootfs/dev/lxd” with filesystem type "none"
lxc 20180507072828.441 DEBUG lxc_conf - conf.c:mount_entry:1863 - Remounting “/var/lib/lxd/shmounts/success” on “/usr/lib/lxc/rootfs/dev/.lxd-mounts” to respect bind or remount options
lxc 20180507072828.441 DEBUG lxc_conf - conf.c:mount_entry:1884 - Flags for “/var/lib/lxd/shmounts/success” were 4128, required extra flags are 0
lxc 20180507072828.442 DEBUG lxc_conf - conf.c:mount_entry:1894 - Mountflags already were 4096, skipping remount
lxc 20180507072828.442 DEBUG lxc_conf - conf.c:mount_entry:1921 - Mounted “/var/lib/lxd/shmounts/success” on “/usr/lib/lxc/rootfs/dev/.lxd-mounts” with filesystem type "none"
lxc 20180507072828.442 INFO lxc_conf - conf.c:mount_file_entries:2212 - Set up mount entries
lxc 20180507072828.444 INFO lxc_conf - conf.c:lxc_fill_autodev:1224 - Populating "/dev"
lxc 20180507072828.444 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/null"
lxc 20180507072828.445 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/zero"
lxc 20180507072828.446 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/full"
lxc 20180507072828.446 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/urandom"
lxc 20180507072828.447 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/random"
lxc 20180507072828.448 DEBUG lxc_conf - conf.c:lxc_fill_autodev:1270 - Created device node "/usr/lib/lxc/rootfs/dev/tty"
lxc 20180507072828.448 INFO lxc_conf - conf.c:lxc_fill_autodev:1275 - Populated "/dev"
lxc 20180507072828.451 DEBUG lxc_conf - conf.c:lxc_setup_dev_console:1603 - mounted pts device “/dev/pts/1” onto "/usr/lib/lxc/rootfs/dev/console"
lxc 20180507072828.455 INFO lxc_utils - utils.c:lxc_mount_proc_if_needed:1758 - I am 1, /proc/self points to "1"
lxc 20180507072828.800 DEBUG lxc_conf - conf.c:setup_rootfs_pivot_root:1127 - pivot_root syscall to ‘/usr/lib/lxc/rootfs’ successful
lxc 20180507072828.800 DEBUG lxc_conf - conf.c:setup_pivot_root:1436 - finished pivot root
lxc 20180507072828.813 DEBUG lxc_conf - conf.c:lxc_setup_devpts:1481 - mount new devpts instance with options "newinstance,ptmxmode=0666,mode=0620,gid=5,max=1024"
lxc 20180507072828.814 DEBUG lxc_conf - conf.c:lxc_setup_devpts:1501 - created dummy “/dev/ptmx” file as bind mount target
lxc 20180507072828.815 DEBUG lxc_conf - conf.c:lxc_setup_devpts:1506 - bind mounted “/dev/pts/ptmx” to "/dev/ptmx"
lxc 20180507072828.815 INFO lxc_conf - conf.c:lxc_setup_ttys:930 - Finished setting up 0 /dev/tty device(s)
lxc 20180507072828.816 INFO lxc_conf - conf.c:setup_personality:1542 - set personality to '0x8’
lxc 20180507072828.817 DEBUG lxc_conf - conf.c:setup_caps:2368 - drop capability ‘sys_time’ (25)
lxc 20180507072828.817 DEBUG lxc_conf - conf.c:setup_caps:2368 - drop capability ‘sys_module’ (16)
lxc 20180507072828.818 DEBUG lxc_conf - conf.c:setup_caps:2368 - drop capability ‘sys_rawio’ (17)
lxc 20180507072828.818 DEBUG lxc_conf - conf.c:setup_caps:2368 - drop capability ‘mac_admin’ (33)
lxc 20180507072828.818 DEBUG lxc_conf - conf.c:setup_caps:2368 - drop capability ‘mac_override’ (32)
lxc 20180507072828.820 DEBUG lxc_conf - conf.c:setup_caps:2377 - capabilities have been setup
lxc 20180507072828.821 NOTICE lxc_conf - conf.c:lxc_setup:3277 - Container “success” is set up
lxc 20180507072828.823 TRACE lxc_start - start.c:lxc_spawn:1348 - Set up cgroup device limits
lxc 20180507072828.824 NOTICE lxc_start - start.c:start:1532 - Exec’ing “/sbin/init”.
failed (container name ‘test-container’):
lxc 20180507073338.160 DEBUG lxc_conf - conf.c:idmaptool_on_path_and_privileged:2595 - The binary “/usr/bin/newuidmap” does have the setuid bit set.
lxc 20180507073338.160 DEBUG lxc_conf - conf.c:idmaptool_on_path_and_privileged:2595 - The binary “/usr/bin/newgidmap” does have the setuid bit set.
lxc 20180507073338.160 DEBUG lxc_conf - conf.c:lxc_map_ids:2683 - Functional newuidmap and newgidmap binary found.
lxc 20180507073338.165 TRACE lxc_conf - conf.c:lxc_map_ids:2739 - newuidmap wrote mapping "newuidmap 30637 0 1000000 1000000000 1000000000 0 1"
lxc 20180507073338.171 TRACE lxc_conf - conf.c:lxc_map_ids:2739 - newgidmap wrote mapping "newgidmap 30637 0 1000000 1000000000 1000000000 0 1"
lxc 20180507073338.172 TRACE lxc_conf - conf.c:run_userns_fn:3576 - calling function "chown_cgroup_wrapper"
lxc 20180507073338.210 DEBUG lxc_network - network.c:lxc_network_move_created_netdev_priv:2445 - Moved network device “vethCKFHN2”/“eth0” to network namespace of 30626
lxc 20180507073338.210 NOTICE lxc_utils - utils.c:lxc_switch_uid_gid:2073 - Switched to gid 0.
lxc 20180507073338.210 NOTICE lxc_utils - utils.c:lxc_switch_uid_gid:2079 - Switched to uid 0.
lxc 20180507073338.210 NOTICE lxc_utils - utils.c:lxc_setgroups:2091 - Dropped additional groups.
lxc 20180507073338.211 INFO lxc_start - start.c:do_start:925 - Unshared CLONE_NEWCGROUP.
lxc 20180507073338.211 DEBUG storage - storage/storage.c:get_storage_by_name:231 - Detected rootfs type "dir"
lxc 20180507073338.211 TRACE dir - storage/dir.c:dir_mount:184 - Mounted “/var/lib/lxd/containers/failed-test-container/rootfs” on "/usr/lib/lxc/rootfs"
lxc 20180507073338.211 DEBUG lxc_conf - conf.c:lxc_setup_rootfs:1319 - Mounted rootfs “dir:/var/lib/lxd/containers/failed-test-container/rootfs” onto “/usr/lib/lxc/rootfs” with options “(null)”.
lxc 20180507073338.211 INFO lxc_conf - conf.c:setup_utsname:768 - ‘failed-test-container’ hostname has been setup
lxc 20180507073338.250 DEBUG lxc_network - network.c:setup_hw_addr:2711 - Mac address “00:16:3e:b0:ea:92” on “eth0” has been setup
lxc 20180507073338.252 DEBUG lxc_network - network.c:lxc_setup_netdev_in_child_namespaces:2969 - Network device “eth0” has been setup
lxc 20180507073338.252 INFO lxc_network - network.c:lxc_setup_network_in_child_namespaces:2997 - network has been setup
lxc 20180507073338.252 TRACE lxc_network - network.c:lxc_network_send_name_and_ifindex_to_parent:3078 - Sent network device names and ifindeces to parent
lxc 20180507073338.252 INFO lxc_conf - conf.c:mount_autodev:1149 - Preparing "/dev"
lxc 20180507073338.254 INFO lxc_conf - conf.c:mount_autodev:1171 - Mounted tmpfs on "/usr/lib/lxc/rootfs/dev"
lxc 20180507073338.275 INFO lxc_conf - conf.c:mount_autodev:1188 - Prepared "/dev"
lxc 20180507073338.276 ERROR lxc_utils - utils.c:safe_mount:1707 - Operation not permitted - Failed to mount proc onto /usr/lib/lxc/rootfs/proc
lxc 20180507073338.276 ERROR lxc_conf - conf.c:lxc_mount_auto_mounts:712 - Operation not permitted - error mounting proc on /usr/lib/lxc/rootfs/proc flags 14
lxc 20180507073338.276 ERROR lxc_conf - conf.c:lxc_setup:3178 - failed to setup the automatic mounts for 'failed-test-container’
lxc 20180507073338.276 ERROR lxc_start - start.c:do_start:944 - Failed to setup container “failed-test-container”.
lxc 20180507073338.276 ERROR lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 5)
lxc 20180507073338.276 INFO lxc_network - network.c:lxc_delete_network_priv:2529 - Interface “eth0” with index 102 already deleted or existing in different network namespace
lxc 20180507073338.276 INFO lxc_network - network.c:lxc_delete_network_priv:2539 - Removed interface “eth0” with index 102
lxc 20180507073338.410 INFO lxc_network - network.c:lxc_delete_network_priv:2560 - Removed interface “vethJTUYH6” from "lxdbr0"
lxc 20180507073338.410 DEBUG lxc_network - network.c:lxc_delete_network:3124 - Deleted network devices