1. 05 2月, 2016 1 次提交
  2. 04 2月, 2016 2 次提交
  3. 27 1月, 2016 1 次提交
    • D
      lxc: don't try to hide parent cgroups inside container · dc576025
      Daniel P. Berrange 提交于
      On the host when we start a container, it will be
      placed in a cgroup path of
      
         /machine.slice/machine-lxc\x2ddemo.scope
      
      under /sys/fs/cgroup/*
      
      Inside the containers' namespace we need to setup
      /sys/fs/cgroup mounts, and currently will bind
      mount /machine.slice/machine-lxc\x2ddemo.scope on
      the host to appear as / in the container.
      
      While this may sound nice, it confuses applications
      dealing with cgroups, because /proc/$PID/cgroup
      now does not match the directory in /sys/fs/cgroup
      
      This particularly causes problems for systems and
      will make it create repeated path components in
      the cgroup for apps run in the container eg
      
        /machine.slice/machine-lxc\x2ddemo.scope/machine.slice/machine-lxc\x2ddemo.scope/user.slice/user-0.slice/session-61.scope
      
      This also causes any systemd service that uses
      sd-notify to fail to start, because when systemd
      receives the notification it won't be able to
      identify the corresponding unit it came from.
      In particular this break rabbitmq-server startup
      
      Future kernels will provide proper cgroup namespacing
      which will handle this problem, but until that time
      we should not try to play games with hiding parent
      cgroups.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      dc576025
  4. 26 1月, 2016 1 次提交
  5. 22 1月, 2016 4 次提交
  6. 15 1月, 2016 2 次提交
  7. 12 1月, 2016 1 次提交
  8. 11 1月, 2016 1 次提交
  9. 18 12月, 2015 1 次提交
    • J
      lxc_cgroup: Add check for NULL cgroup before AddTask call · ae09988e
      John Ferlan 提交于
      Commit id '71ce4759' altered the cgroup processing with respect to the
      call to virCgroupAddTask being moved out from lower layers into the calling
      layers especially for qemu processing of emulator and vcpu threads. The
      movement affected lxc insomuch as it is possible for a code path to
      return a NULL cgroup *and* a 0 return status via virCgroupNewPartition
      failure when virCgroupNewIgnoreError succeeded when virCgroupNewMachineManual
      returns. Coverity pointed out that would cause virCgroupAddTask to core.
      
      This patch will check for a NULL cgroup as well as the negative return
      and just return the NULL cgroup to the caller (as it would have previously)
      ae09988e
  10. 15 12月, 2015 1 次提交
  11. 11 12月, 2015 2 次提交
  12. 09 12月, 2015 4 次提交
  13. 18 11月, 2015 2 次提交
    • R
      lxc: Bind mount container TTYs · 370707a7
      Richard Weinberger 提交于
      Instead of creating symlinks, bind mount the devices to
      /dev/pts/XY.
      Using bind mounts it is no longer needed to add pts devices
      to files like /etc/securetty.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      370707a7
    • R
      lxc: Don't make container's TTY a controlling TTY · ea542455
      Richard Weinberger 提交于
      Userspace does not expect that the initial console
      is a controlling TTY. systemd can deal with that, others not.
      On sysv init distros getty will fail to spawn a controlling on
      /dev/console or /dev/tty1. Which will cause to whole container
      to reboot upon ctrl-c.
      
      This patch changes the behavior of libvirt to match the kernel
      behavior where the initial TTY is also not controlling.
      
      The only user visible change should be that a container with
      bash as PID 1 would complain. But this matches exactly the kernel
      be behavior with init=/bin/bash.
      To get a controlling TTY for bash just run "setsid /bin/bash".
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      ea542455
  14. 21 10月, 2015 1 次提交
  15. 07 10月, 2015 1 次提交
  16. 24 9月, 2015 2 次提交
  17. 22 9月, 2015 1 次提交
  18. 15 9月, 2015 1 次提交
  19. 05 9月, 2015 1 次提交
    • J
      lxc: Avoid Coverity SIZEOF_MISMATCH · 11822fff
      John Ferlan 提交于
      Commit id '692e9fac' used virProcessSetNamespaces instead of inlining
      the similar functionality; however, Coverity notes that the function
      prototype expects a size_t value and not an enum and complains. So,
      just typecast the enum as a size_t to avoid the noise.
      11822fff
  20. 02 9月, 2015 1 次提交
    • J
      qemu: add udp interface support · 5c668a78
      Jonathan Toppins 提交于
      Adds a new interface type using UDP sockets, this seems only applicable
      to QEMU but have edited tree-wide to support the new interface type.
      
      The interface type required the addition of a "localaddr" (local
      address), this then maps into the following xml and qemu call.
      
      <interface type='udp'>
        <mac address='52:54:00:5c:67:56'/>
        <source address='127.0.0.1' port='11112'>
          <local address='127.0.0.1' port='22222'/>
        </source>
        <model type='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      </interface>
      
      QEMU call:
      	-net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222
      
      Notice the xml "local" entry becomes the "localaddr" for the qemu call.
      
      reference:
      http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      5c668a78
  21. 28 8月, 2015 1 次提交
  22. 27 8月, 2015 4 次提交
  23. 26 8月, 2015 2 次提交
    • D
      lxc: ensure setns() syscall is defined · eff95ac8
      Daniel P. Berrange 提交于
      Older versions of glibc don't provide the setns() syscall
      function wrapper, so we must define it ourselves to prevent
      build failure on old distros.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eff95ac8
    • I
      lxc: Inherit namespace feature · c27553b6
      ik.nitk 提交于
      This patch adds feature for lxc containers to inherit namespaces.
      This is very similar to what lxc-tools or docker provides.  Look
      for "man lxc-start" and you will find that you can pass command
      args as [ --share-[net|ipc|uts] name|pid ]. Or check out docker
      networking option in which you can give --net=container:NAME_or_ID
      as an option for sharing +namespace.
      
      >From this patch you can add extra libvirt option to share
      namespace in following way.
      
       <lxc:namespace>
         <lxc:sharenet type='netns' value='red'/>
         <lxc:shareipc type='pid' value='12345'/>
         <lxc:shareuts type='name' value='container1'/>
       </lxc:namespace>
      
      The netns option is specific to sharenet. It can be used to
      inherit from existing network namespace.
      
      Co-authored: Daniel P. Berrange <berrange@redhat.com>
      c27553b6
  24. 19 8月, 2015 1 次提交
  25. 13 8月, 2015 1 次提交