1. 25 Nov, 2014 19 commits
  2. 24 Sep, 2014 4 commits
  3. 23 Sep, 2014 3 commits
  4. 22 Sep, 2014 7 commits
  5. 20 Sep, 2014 7 commits
    • log: fix quiet mode · 70d371fe
      William Dauchy authored
      quiet mode was overriden by the double call of lxc_log_init
      see lxc_container_new
      
      use lxc_log_options_no_override in order to fix this
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Signed-off-by: 's avatarWilliam Dauchy <william@gandi.net>
    • support use of 'all' containers when cgmanager supports it · 69a8b71b
      Serge Hallyn authored
      Introduce a new list of controllers just containing "all".
      
      Make the lists of controllers null-terminated.
      
      If the cgmanager api version is high enough, use the 'all' controller
      rather than walking all controllers, which should greatly reduce the
      amount of dbus overhead.  This will be especially important for
      those going through a cgproxy.
      
      Also remove the call to cleanup cgroups when a cgroup existed.  That
      usually fails (and failure is ignored) since the to-be-cleaned-up
      cgroup is busy, but we shouldn't even be trying.  Note this can
      create for extra un-cleanedup cgroups, however it's better than us
      accidentally removing a cgroup that someone else had created and was
      about to use.
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • lxc-gentoo: keep original uid/gid of files/dirs when installing · 6d0bd793
      TAMUKI Shoichi authored
      Call tar with --numeric-owner option to use numbers for user/group
      names because the whole uid/gid in rootfs should be consistently
      unchanged as in original stage3 tarball and private portage.
      Signed-off-by: 's avatarTAMUKI Shoichi <tamuki@linet.gr.jp>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • lxc-plamo: keep original uid/gid of files/dirs when installing · 634d8bb6
      TAMUKI Shoichi authored
      Regardless of whether "installpkg" command exists or not, install the
      command temporarily with static linked tar command into the lxc cache
      directory to keep the original uid/gid of files/directories.  Also,
      use sed command instead of ed command for simplicity.
      Signed-off-by: 's avatarTAMUKI Shoichi <tamuki@linet.gr.jp>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • Report container exit status to monitord · 3195a44f
      Jean-Tiare LE BIGOT authored
      When managing containers, I need to take action based on container
      exit status. For instance, if it exited abnormally (status!=0), I
      sometime want to respawn it automatically. Or, when invoking
      `lxc-stop` I want to know if it terminated gracefully (ie on `SIGTERM`)
      or on `SIGKILL` after a timeout.
      
      This patch adds a new message type `lxc_msg_exit_code,` to preserve
      ABI. It sends the raw status code as returned by `waitpid` so that
      listening application may want to apply `WEXITSTATUS` before. This is
      what `lxc-monitor` does.
      Signed-off-by: 's avatarJean-Tiare LE BIGOT <jean-tiare.le-bigot@ovh.net>
    • lxc-cgm: fix issue with nested chowning · b464fc80
      Serge Hallyn authored
      To ask cgmanager to chown files as an unpriv user, we must send the
      request from the container's namespace (with our own userid also
      mapped in).  However when we create a new namespace then we must
      open a new dbus connection, so that our credential and the credential
      on the dbus socket match.  Otherwise the proxy will refuse the request.
      
      Because we were warning about this failure but not exiting, the failure
      was not noticed until the unprivileged container went on to try to
      administer its cgroups, i.e. creating a container inside itself.
      
      Fix this by having the do_chown_cgroup create a new cgmanager connection.
      In order to reduce the number of connections, since the list of subsystems
      is global anyway, don't call do_chown_cgroup once for each controller,
      just call it once and have it run over all controllers.
      
      (This patch does not change the fact that we don't fail if the
      chown failed.  I think we should change that, but let's do it in a
      later patch)
      Reported-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • handle hashed command socket names (v2) · b656b42a
      S.Çağlar Onur authored
      With the new hashed command socket names (e8589841), it's possible to
      have something like below;
      
      [caglar@qop:~/go/src/github.com/lxc/go-lxc(master)] cat /proc/net/unix | grep lxc
      0000000000000000: 00000002 00000000 00010000 0001 01 53465 @lxc/d086e835c86f4b8d/command
      [...]
      
      list_active_containers reads /proc/net/unix to find all running
      containers but this new format no longer includes the container name or
      its lxcpath.
      
      This patch introduces two new commands (LXC_CMD_GET_NAME and
      LXC_CMD_GET_LXCPATH) and starts to use those in list_active_containers
      call.
      
      changes since v1:
       - added sanity check proposed by Serge
      Signed-off-by: 's avatarS.Çağlar Onur <caglar@10ur.org>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>