1. 12 11月, 2013 1 次提交
    • D
      Fix busy wait loop in LXC container I/O handling · 5087a5a0
      Daniel P. Berrange 提交于
      If the host side of an LXC container console disconnected
      and the guest side continued to write data, until the PTY
      buffer filled up, the LXC controller would busy wait. It
      would repeatedly see POLLHUP from poll() and not disable
      the watch.
      
      This was due to some bogus logic detecting blocking
      conditions. Upon seeing a POLLHUP we must disable all
      reading & writing from the PTY, and setup the epoll to
      wake us up again when the connection comes back.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5087a5a0
  2. 21 10月, 2013 1 次提交
  3. 16 10月, 2013 2 次提交
  4. 14 10月, 2013 3 次提交
    • D
      Initialize threading & error layer in LXC controller · 97973ebb
      Daniel P. Berrange 提交于
      In Fedora 20, libvirt_lxc crashes immediately at startup with a
      trace
      
       #0  0x00007f0cddb653ec in free () from /lib64/libc.so.6
       #1  0x00007f0ce0e16f4a in virFree (ptrptr=ptrptr@entry=0x7f0ce1830058) at util/viralloc.c:580
       #2  0x00007f0ce0e2764b in virResetError (err=0x7f0ce1830030) at util/virerror.c:354
       #3  0x00007f0ce0e27a5a in virResetLastError () at util/virerror.c:387
       #4  0x00007f0ce0e28858 in virEventRegisterDefaultImpl () at util/virevent.c:233
       #5  0x00007f0ce0db47c6 in main (argc=11, argv=0x7fff4596c328) at lxc/lxc_controller.c:2352
      
      Normally virInitialize calls virErrorInitialize and
      virThreadInitialize, but we don't link to libvirt.so
      in libvirt_lxc, and nor did we ever call the error
      or thread initializers.
      
      I have absolutely no idea how this has ever worked, let alone
      what caused it to stop working in Fedora 20.
      
      In addition not all code paths from virLogSetFromEnv will
      ensure virLogInitialize is called correctly, which is another
      possible crash scenario.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      97973ebb
    • D
      Fix exit status of lxc controller · 13c011c3
      Daniel P. Berrange 提交于
      The LXC controller main() method initialized 'rc' to 1
      rather than '-1'. In the cleanup path it will print any
      error to stderr, if-and-only-if rc < 0. Hence the incorrect
      initialization caused errors to be lost.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      13c011c3
    • D
      Make LXC controller use a private dbus connection & close it · ae9a0485
      Daniel P. Berrange 提交于
      The LXC controller uses dbus to talk to systemd to create
      cgroups. This means that each LXC controller instance has
      a dbus connection. The DBus daemon is limited to 256
      connections by default and we want to be able to run many
      1000 of containers.
      
      While the dbus limit could be raised in the config files,
      it is simpler to make libvirt LXC controller close its
      dbus connection once everything is configured.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ae9a0485
  5. 27 9月, 2013 2 次提交
  6. 05 8月, 2013 1 次提交
    • M
      Introduce max_queued_clients · 1199edb1
      Michal Privoznik 提交于
      This configuration knob lets user to set the length of queue of
      connection requests waiting to be accept()-ed by the daemon. IOW, it
      just controls the @backlog passed to listen:
      
        int listen(int sockfd, int backlog);
      1199edb1
  7. 25 7月, 2013 1 次提交
  8. 24 7月, 2013 1 次提交
    • D
      Create + setup cgroups atomically for LXC process · da704c87
      Daniel P. Berrange 提交于
      Currently the LXC driver creates the VM's cgroup prior to
      forking, and then libvirt_lxc moves the child process
      into the cgroup. This won't work with systemd whose APIs
      do the creation of cgroups + attachment of processes atomically.
      
      Fortunately we simply move the entire cgroups setup into
      the libvirt_lxc child process. We make it take place before
      fork'ing into the background, so by the time virCommandRun
      returns in the LXC driver, the cgroup is guaranteed to be
      present.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      da704c87
  9. 22 7月, 2013 2 次提交
  10. 18 7月, 2013 2 次提交
  11. 16 7月, 2013 5 次提交
  12. 11 7月, 2013 1 次提交
  13. 10 7月, 2013 1 次提交
  14. 09 7月, 2013 1 次提交
  15. 02 7月, 2013 7 次提交
  16. 06 6月, 2013 1 次提交
  17. 21 5月, 2013 4 次提交
  18. 13 5月, 2013 2 次提交
  19. 09 5月, 2013 1 次提交
  20. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88