[lxc-devel] [lxc/lxc] cd90db: fix logic for execute log file

GitHub noreply at github.com
Fri May 4 10:35:25 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: cd90db2c0ec7948a9a52dfc83d3a2b92ed522511
      https://github.com/lxc/lxc/commit/cd90db2c0ec7948a9a52dfc83d3a2b92ed522511
  Author: Tycho Andersen <tycho at tycho.ws>
  Date:   2018-05-03 (Thu, 03 May 2018)

  Changed paths:
    M src/lxc/execute.c

  Log Message:
  -----------
  fix logic for execute log file

The problem here is that lxc-init runs *inside* the container. So if a
person has the log file set to /home/$USER/foo, lxc-init ends up making a
directory /home/$USER/foo inside the container to put the log file in. What
we really want are the logs to be propagated from inside the container to
the outside. We accomplish this by passing an fd without O_CLOEXEC, and
telling lxc-init to log to that file.

Signed-off-by: Tycho Andersen <tycho at tycho.ws>


  Commit: aa769a272f24d34d9190e04b7c6e93a6b8418376
      https://github.com/lxc/lxc/commit/aa769a272f24d34d9190e04b7c6e93a6b8418376
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2018-05-04 (Fri, 04 May 2018)

  Changed paths:
    M src/lxc/utils.h

  Log Message:
  -----------
  utils: add LXC_PROC_PID_FD_LEN

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 321614a5da167f20bbafaaa1d2b3e8e365da953d
      https://github.com/lxc/lxc/commit/321614a5da167f20bbafaaa1d2b3e8e365da953d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2018-05-04 (Fri, 04 May 2018)

  Changed paths:
    M src/lxc/execute.c

  Log Message:
  -----------
  execute: use static buffer

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 7101cb035b2ce1e1dc870083e7fb1adbdc30f7e6
      https://github.com/lxc/lxc/commit/7101cb035b2ce1e1dc870083e7fb1adbdc30f7e6
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2018-05-04 (Fri, 04 May 2018)

  Changed paths:
    M src/lxc/execute.c
    M src/lxc/utils.h

  Log Message:
  -----------
  Merge pull request #2305 from brauner/2018-05-04/fix_execute_logging

fix logic for execute log file


Compare: https://github.com/lxc/lxc/compare/cef701ede302...7101cb035b2c
      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the lxc-devel mailing list