[lxc-users] Share IPC Namespaces

Justin justinfb at gmail.com
Tue Jun 6 17:53:12 UTC 2017


I am attempting to have multiple containers share the same IPC namespace
for communication between containers. I start container A followed by
attempting to start container B in the following manner:

lxc-start -n B --share-ipc A

This fails with the following:

      lxc-start 20170605184035.303 ERROR    lxc_start -
start.c:attach_ns:191 - Invalid argument - failed to set namespace 'ipc'
      lxc-start 20170605184035.304 ERROR    lxc_start -
start.c:__lxc_start:1329 - failed to spawn 'B'
      lxc-start 20170605184040.311 ERROR    lxc_start_ui -
lxc_start.c:main:344 - The container failed to start.
      lxc-start 20170605184040.311 ERROR    lxc_start_ui -
lxc_start.c:main:346 - To get more details, run the container in foreground
mode.
      lxc-start 20170605184040.312 ERROR    lxc_start_ui -
lxc_start.c:main:348 - Additional information can be obtained by setting
the --logfile and --logpriority options.
      lxc-start 20170605184107.581 INFO     lxc_start_ui -
lxc_start.c:main:264 - using rcfile /var/lib/lxc/B/config
      lxc-start 20170605184107.582 WARN     lxc_confile -
confile.c:config_pivotdir:1877 - lxc.pivotdir is ignored.  It will soon
become an error.
      lxc-start 20170605184107.582 INFO     lxc_confile -
confile.c:config_idmap:1498 - read uid map: type u nsid 0 hostid 100000
range 65536
      lxc-start 20170605184107.583 INFO     lxc_confile -
confile.c:config_idmap:1498 - read uid map: type g nsid 0 hostid 100000
range 65536
      lxc-start 20170605184107.584 WARN     lxc_confile -
confile.c:config_pivotdir:1877 - lxc.pivotdir is ignored.  It will soon
become an error.
      lxc-start 20170605184107.584 INFO     lxc_confile -
confile.c:config_idmap:1498 - read uid map: type u nsid 0 hostid 100000
range 65536
      lxc-start 20170605184107.584 INFO     lxc_confile -
confile.c:config_idmap:1498 - read uid map: type g nsid 0 hostid 100000
range 65536
      lxc-start 20170605184107.592 INFO     lxc_start -
start.c:lxc_check_inherited:251 - closed inherited fd 4
      lxc-start 20170605184107.593 INFO     lxc_start -
start.c:lxc_check_inherited:251 - closed inherited fd 5
      lxc-start 20170605184107.607 INFO     lxc_container -
lxccontainer.c:do_lxcapi_start:797 - Attempting to set B title to [lxc
monitor] /var/lib/lxc B
      lxc-start 20170605184107.612 INFO     lxc_start -
start.c:lxc_check_inherited:251 - closed inherited fd 4
      lxc-start 20170605184107.615 DEBUG    lxc_start -
start.c:setup_signal_fd:289 - sigchild handler set
      lxc-start 20170605184107.619 INFO     lxc_start -
start.c:lxc_check_inherited:251 - closed inherited fd 4
      lxc-start 20170605184107.620 INFO     lxc_start -
start.c:lxc_check_inherited:251 - closed inherited fd 5
      lxc-start 20170605184107.620 DEBUG    lxc_console -
console.c:lxc_console_peer_default:473 - no console peer
      lxc-start 20170605184107.620 INFO     lxc_start -
start.c:lxc_init:488 - 'B' is initialized
      lxc-start 20170605184107.624 DEBUG    lxc_start -
start.c:__lxc_start:1302 - Not dropping cap_sys_boot or watching utmp
      lxc-start 20170605184107.624 INFO     lxc_start -
start.c:resolve_clone_flags:999 - Cloning a new user namespace
      lxc-start 20170605184107.625 INFO     lxc_cgroup -
cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for B
      lxc-start 20170605184107.632 INFO     lxc_monitor -
monitor.c:lxc_monitor_sock_name:178 - using monitor sock name
lxc/ad055575fe28ddd5//var/lib/lxc
      lxc-start 20170605184107.632 ERROR    lxc_start -
start.c:attach_ns:191 - Invalid argument - failed to set namespace 'ipc'
      lxc-start 20170605184107.633 ERROR    lxc_start -
start.c:__lxc_start:1329 - failed to spawn 'B'
      lxc-start 20170605184107.633 WARN     lxc_commands -
commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive
response
      lxc-start 20170605184112.639 ERROR    lxc_start_ui -
lxc_start.c:main:344 - The container failed to start.
      lxc-start 20170605184112.639 ERROR    lxc_start_ui -
lxc_start.c:main:346 - To get more details, run the container in foreground
mode.
      lxc-start 20170605184112.639 ERROR    lxc_start_ui -
lxc_start.c:main:348 - Additional information can be obtained by setting
the --logfile and --logpriority options.

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170606/f44767c6/attachment.html>


More information about the lxc-users mailing list