1. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  2. 12 3月, 2013 1 次提交
  3. 08 3月, 2013 3 次提交
    • D
      Add support for disks backed by plain files in LXC · eaf7d4dd
      Daniel P. Berrange 提交于
      By using a loopback device, disks backed by plain files can
      be made available to LXC containers. We make no attempt to
      auto-detect format if <driver type="raw"/> is not set,
      instead we unconditionally treat that as meaning raw. This
      is to avoid the security issues inherent with format
      auto-detection
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eaf7d4dd
    • D
      Refactor loop device setup code in LXC · f0bfb630
      Daniel P. Berrange 提交于
      Minor re-factoring of code for setting up loop devices in
      the LXC controller
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f0bfb630
    • D
      Improve LXC startup error reporting · 09f5e012
      Daniel P. Berrange 提交于
      Currently we rely on a VIR_ERROR message being logged by the
      virRaiseError function to report LXC startup errors. This gives
      the right message, but is rather ugly and can be truncated
      if lots of log messages are written. Change the LXC controller
      to explicitly print any virErrorPtr message to stderr. Then
      change the driver to skip over anything that looks like a log
      message.
      
      The result is that this
      
      error: Failed to start domain busy
      error: internal error guest failed to start: 2013-03-04 19:46:42.846+0000: 1734: info : libvirt version: 1.0.2
      2013-03-04 19:46:42.846+0000: 1734: error : virFileLoopDeviceAssociate:600 : Unable to open /root/disk.raw: No such file or directory
      
      changes to
      
      error: Failed to start domain busy
      error: internal error guest failed to start: Unable to open /root/disk.raw: No such file or directory
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      09f5e012
  4. 11 2月, 2013 1 次提交
  5. 08 2月, 2013 1 次提交
  6. 14 1月, 2013 3 次提交
  7. 09 1月, 2013 1 次提交
  8. 08 1月, 2013 2 次提交
  9. 21 12月, 2012 6 次提交
  10. 19 12月, 2012 1 次提交
  11. 28 11月, 2012 1 次提交
    • G
      add fuse support for libvirt lxc · 2a596dac
      Gao feng 提交于
      this patch addes fuse support for libvirt lxc.
      we can use fuse filesystem to generate sysinfo dynamically,
      So we can isolate /proc/meminfo,cpuinfo and so on through
      fuse filesystem.
      
      we mount fuse filesystem for every container.
      the mount name is libvirt,mount point is
      localstatedir/run/libvirt/lxc/containername.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      2a596dac
  12. 26 11月, 2012 2 次提交
  13. 23 11月, 2012 1 次提交
    • D
      Fix exiting of libvirt_lxc program on container quit · 37db3f5d
      Daniel P. Berrange 提交于
      The virLXCControllerClientCloseHook method was mistakenly
      assuming that the private data associated with the network
      client was the virLXCControllerPtr. In fact it was just a
      dummy int, so we were derefencing a bogus struct. The
      frequent result of this was that we would never quit, because
      we tried to arm a non-existant timer.
      
      Fix the code by removing the dummy private data and just
      using the virLXCControllerPtr instance as private data
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      37db3f5d
  14. 22 11月, 2012 2 次提交
    • D
      Log an audit message with the LXC init pid · a6158336
      Daniel P. Berrange 提交于
      Currently the LXC driver logs audit messages when a container
      is started or stopped. These audit messages, however, contain
      the PID of the libvirt_lxc supervisor process. To enable
      sysadmins to correlate with audit messages generated by
      processes /inside/ the container, we need to include the
      container init process PID.
      
      We can't do this in the main 'start' audit message, since
      the init PID is not available at that point. Instead we output
      a completely new audit record, that lists both PIDs.
      
      type=VIRT_CONTROL msg=audit(1353433750.071:363): pid=20180 uid=0 auid=501 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='virt=lxc op=init vm="busy" uuid=dda7b947-0846-1759-2873-0f375df7d7eb vm-pid=20371 init-pid=20372 exe="/home/berrange/src/virt/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/6 res=success'
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a6158336
    • D
      Use virNetServerRun instead of custom main loop · f33e43c2
      Daniel P. Berrange 提交于
      The LXC controller code currently directly invokes the
      libvirt main loop code. The problem is that this misses
      the cleanup of virNetServerClient connections that
      virNetServerRun takes care of.
      
      The result is that when libvirtd is stopped, the
      libvirt_lxc controller process gets stuck in a I/O loop.
      When libvirtd is then started again, it fails to connect
      to the controller and thus kills off the entire domain.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f33e43c2
  15. 15 11月, 2012 1 次提交
  16. 14 11月, 2012 1 次提交
  17. 16 10月, 2012 1 次提交
  18. 27 9月, 2012 1 次提交
  19. 26 9月, 2012 2 次提交
  20. 21 9月, 2012 1 次提交
  21. 18 9月, 2012 3 次提交
  22. 21 8月, 2012 1 次提交
  23. 15 8月, 2012 1 次提交
    • D
      Refactor RPC client private data setup · 39b5e4d4
      Daniel P. Berrange 提交于
      Currently there is a hook function that is invoked when a
      new client connection comes in, which allows an app to
      setup private data. This setup will make it difficult to
      serialize client state during process re-exec(). Change to
      a model where the app registers a callback when creating
      the virNetServerPtr instance, which is used to allocate
      the client private data immediately during virNetClientPtr
      construction.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      39b5e4d4
  24. 07 8月, 2012 1 次提交
  25. 06 8月, 2012 1 次提交
    • E
      virrandom: make virRandomInitialize an automatic one-shot · 87de27b7
      Eric Blake 提交于
      All callers used the same initialization seed (well, the new
      viratomictest forgot to look at getpid()); so we might as well
      make this value automatic.  And while it may feel like we are
      giving up functionality, I documented how to get it back in the
      unlikely case that you actually need to debug with a fixed
      pseudo-random sequence.  I left that crippled by default, so
      that a stray environment variable doesn't cause a lack of
      randomness to become a security issue.
      
      * src/util/virrandom.c (virRandomInitialize): Rename...
      (virRandomOnceInit): ...and make static, with one-shot call.
      Document how to do fixed-seed debugging.
      * src/util/virrandom.h (virRandomInitialize): Drop prototype.
      * src/libvirt_private.syms (virrandom.h): Don't export it.
      * src/libvirt.c (virInitialize): Adjust caller.
      * src/lxc/lxc_controller.c (main): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/util/iohelper.c (main): Likewise.
      * tests/seclabeltest.c (main): Likewise.
      * tests/testutils.c (virtTestMain): Likewise.
      * tests/viratomictest.c (mymain): Likewise.
      87de27b7