[lxc-devel] [GIT] lxc branch, master, updated. 56655134e462ceaf86b51838e4e825c2f3964922

Daniel Lezcano git at users.sourceforge.net
Fri Dec 14 08:43:58 UTC 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lxc".

The branch, master has been updated
       via  56655134e462ceaf86b51838e4e825c2f3964922 (commit)
       via  2a061f55f9496d2c5d315f99fb0c7805fc83f064 (commit)
       via  d2e30e99b48084375071315336cd80a52b69a122 (commit)
      from  d984bb4e751121f1a7c0029ee7df4acf62f2eea4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 56655134e462ceaf86b51838e4e825c2f3964922
Author: Daniel Lezcano <daniel.lezcano at free.fr>
Date:   Fri Dec 14 09:42:55 2012 +0100

    Version 0.9.0.alpha2

commit 2a061f55f9496d2c5d315f99fb0c7805fc83f064
Merge: d984bb4 d2e30e9
Author: Daniel Lezcano <daniel.lezcano at free.fr>
Date:   Fri Dec 14 09:42:21 2012 +0100

    Merge git://github.com/lxc/lxc

commit d2e30e99b48084375071315336cd80a52b69a122
Author: Dwight Engen <dwight.engen at oracle.com>
Date:   Tue Dec 11 17:05:11 2012 -0500

    Fix race/corruption with multiple lxc-start, lxc-execute
    
    If you start more than one lxc-start/lxc-execute with the same name at the
    same time, or just do an lxc-start/lxc-execute with the name of a container
    that is already running, lxc doesn't figure out that the container with this
    name is already running until fairly late in the initialization process: ie
    when __lxc_start() -> lxc_poll() -> lxc_command_mainloop_add() attempts to
    create the same abstract socket name.
    
    By this point a fair amount of initialization has been done that actually
    messes up the running container. For example __lxc_start() -> lxc_spawn() ->
    lxc_cgroup_create() -> lxc_one_cgroup_create() -> try_to_move_cgname() moves
    the running container's cgroup to a name of deadXXXXXX.
    
    The solution in this patch is to use the atomic existence of the abstract
    socket name as the indicator that the container is already running.  To do
    so, I just refactored lxc_command_mainloop_add() into an lxc_command_init()
    routine that attempts to bind the socket, and ensure this is called earlier
    before much initialization has been done.
    
    In testing, I verified that maincmd_fd was still open at the time of lxc_fini,
    so the entire lifetime of the container's run should be covered. The only
    explicit close of this fd was in the reboot case of lxcapi_start(), which is
    now moved to lxc_fini(), which I think is more appropriate.
    
    Even though it is not checked any more, set maincmd_fd to -1 instead of 0 to
    indicate its not open since 0 could be a valid fd.
    
    Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
    Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

-----------------------------------------------------------------------

Summary of changes:
 configure.ac           |    2 +-
 src/lxc/commands.c     |   17 ++++++++++++-----
 src/lxc/commands.h     |    1 +
 src/lxc/conf.c         |    1 +
 src/lxc/lxccontainer.c |    3 ---
 src/lxc/start.c        |   10 +++++++++-
 6 files changed, 24 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
lxc




More information about the lxc-devel mailing list