[lxc-devel] [lxc/lxc] 05f9e7: lxc-debian: Don't eat the argument after -c

GitHub noreply at github.com
Fri Mar 21 21:15:12 UTC 2014


  Branch: refs/heads/stable-1.0
  Home:   https://github.com/lxc/lxc
  Commit: 05f9e74300c2a6ff3a9762ba235c84cb564ff879
      https://github.com/lxc/lxc/commit/05f9e74300c2a6ff3a9762ba235c84cb564ff879
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M templates/lxc-debian.in

  Log Message:
  -----------
  lxc-debian: Don't eat the argument after -c

Reported-by: Robie Basak <robie.basak at canonical.com>
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 66f47a86edbb71d0b850f7bdb475b6f9f6595bcb
      https://github.com/lxc/lxc/commit/66f47a86edbb71d0b850f7bdb475b6f9f6595bcb
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M doc/lxc-create.sgml.in

  Log Message:
  -----------
  lxc-create manpage: specify -B best option

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 5358f08c013c91788889906e82dc463d68956d63
      https://github.com/lxc/lxc/commit/5358f08c013c91788889906e82dc463d68956d63
  Author: Holger Amann <holger at sauspiel.de>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M templates/lxc-debian.in

  Log Message:
  -----------
  debian: Symlink /etc/mtab

/etc/mtab doesn’t exist after bootstrapping a debian container, and will
be created as regular file after first start.

That leads to at least two errors:
- output of `mount` is wrong and get messed up the more often you
  start/stop the container
- /dev/pts/ptmx has wrong permissions

Signed-off-by: Holger Amann <holger at sauspiel.de>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: c59e3beec20ae2d8e4006a65078fbedb25d0a89f
      https://github.com/lxc/lxc/commit/c59e3beec20ae2d8e4006a65078fbedb25d0a89f
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  mutex cgmanager access

It looks like either libdbus or libnih is showing some corruption with
threaded access to the cgmanager-client library.  Until we can
straighten that out, mutex access to the cgmanager.

The worst part of this is having to take and drop the mutex at every
fork.  This also means that we can't keep a connection open for the
duration of container startup, since that would deadlock forks.

If we were going to keep it like this, then we could get rid of some
code in start.c.  However we take a performance hit here which I
really hope we can rectify soon.

The other approach we could take would be to keep a global count of
references to cgroup_manager.  Mutex the open, close, and each use
of the cgroup_manager proxy (and the inc/dec of the refcount).  This
way we could in fact keep the connection open for the duration of
container start.  The atfork handler child_fn would have to close
the connection if open.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 58de1a468065e14a73c1598936c6bd2f579baa07
      https://github.com/lxc/lxc/commit/58de1a468065e14a73c1598936c6bd2f579baa07
  Author: KATOH Yasufumi <karma at jazz.email.ne.jp>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M doc/ja/lxc-create.sgml.in

  Log Message:
  -----------
  Update Japanese lxc-create(1) for 'best' option

Update for commit a526a632e007c0d666dbe953cf7b39fbf26b63db

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 6d37caf094313e8485fd19fb78e0112e49c087bc
      https://github.com/lxc/lxc/commit/6d37caf094313e8485fd19fb78e0112e49c087bc
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M src/lxc/console.c
    M src/lxc/console.h
    M src/lxc/lxc_console.c
    M src/lxc/lxc_start.c
    M src/lxc/start.c

  Log Message:
  -----------
  fix console stdin,stdout,stderr fds

The fds for stdin,stdout,stderr that we were leaving open for /sbin/init
in the container were those from /dev/tty or lxc.console (if given), which
wasn't right. Inside the container it should only have access to the pty
that lxc creates representing the console.

This was noticed because busybox's init was resetting the termio on its
stdin which was effecting the actual users terminal instead of the pty.
This meant it was setting icanon so were were not passing keystrokes
immediately to the pty, and hence command line history/editing wasn't
working.

Fix by dup'ing the console pty to stdin,stdout,stderr just before
exec()ing /sbin/init. Fix fd leak in error handling that I noticed while
going through this code.

Also tested with lxc.console = none, lxc.console = /dev/tty7 and no
lxc.console specified.

V2: The first version was getting EBADF sometimes on dup2() because
lxc_console_set_stdfds() was being called after lxc_check_inherited()
had already closed the fds for the pty. Fix by calling
lxc_check_inherited() as late as possible which also extends coverage
of open fd checked code.

V3: Don't move lxc_check_inherited() since it needs to be called while
the tmp proc mount is still mounted. Move call to lxc_console_set_stdfds()
just before it.

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/da5afb8a29c1...6d37caf09431


More information about the lxc-devel mailing list