[lxc-devel] [PATCH v2] lxc_wait should start monitord
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Apr 25 17:18:49 UTC 2013
Quoting Dwight Engen (dwight.engen at oracle.com):
> If lxc_wait is called before the container has started the socket will not
> yet have been created and lxc_wait's connect to it will fail. Starting the
> daemon will create the socket for lxc_wait to connect to.
>
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> src/lxc/state.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/lxc/state.c b/src/lxc/state.c
> index 4ab131a..68ec00b 100644
> --- a/src/lxc/state.c
> +++ b/src/lxc/state.c
> @@ -207,6 +207,9 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const
> if (fillwaitedstates(states, s))
> return -1;
>
> + if (lxc_monitord_spawn(lxcpath))
> + return -1;
> +
> fd = lxc_monitor_open(lxcpath);
> if (fd < 0)
> return -1;
> --
> 1.8.1.4
>
More information about the lxc-devel
mailing list