]> git.proxmox.com Git - mirror_lxc.git/commitdiff
If a container is already running, say so in error msgs.
authorSerge Hallyn <serge@hallyn.com>
Wed, 22 Feb 2012 17:40:16 +0000 (11:40 -0600)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 26 Feb 2012 09:44:41 +0000 (10:44 +0100)
Otherwise there is no clear indication to the user why the container
startup failed.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/commands.c

index f323943192f8cd50bb798be515e790cdfec746fe..1d488aed25106fba7269c953b65c6b77d00cdc13 100644 (file)
@@ -271,7 +271,12 @@ extern int lxc_command_mainloop_add(const char *name,
 
        fd = lxc_af_unix_open(path, SOCK_STREAM, 0);
        if (fd < 0) {
-               ERROR("failed to create the command service point");
+               ERROR("failed (%d) to create the command service point %s", errno, offset);
+               if (errno == EADDRINUSE) {
+                       ERROR("##");
+                       ERROR("# The container appears to be already running!");
+                       ERROR("##");
+               }
                return -1;
        }