[Lxc-users] reboot fail on natty container on natty host

Daniel Lezcano daniel.lezcano at free.fr
Wed Jun 1 15:00:00 UTC 2011


On 06/01/2011 12:33 PM, KATOH Yasufumi wrote:
> Hi,
> Can you reboot on console by lxc-console in a container?
>    HostOS: Ubuntu natty
>    lxc version: 0.7.4-0ubuntu7.1
>

Good catch, thanks for reporting !

Fixed with this patch.

Index: lxc/src/lxc/commands.c
===================================================================
--- lxc.orig/src/lxc/commands.c    2011-06-01 16:56:16.911017001 +0200
+++ lxc/src/lxc/commands.c    2011-06-01 16:57:37.661017001 +0200
@@ -236,6 +236,11 @@ static int incoming_command_handler(int
          return -1;
      }

+    if (fcntl(connection, F_SETFD, FD_CLOEXEC)) {
+        SYSERROR("failed to set close-on-exec on incoming connection");
+        goto out_close;
+    }
+
      if (setsockopt(connection, SOL_SOCKET,
                 SO_PASSCRED, &opt, sizeof(opt))) {
          SYSERROR("failed to enable credential on socket");


I will commit in a few hours.




More information about the lxc-users mailing list