1. 16 4月, 2013 1 次提交
  2. 08 4月, 2013 1 次提交
  3. 05 4月, 2013 1 次提交
  4. 04 4月, 2013 1 次提交
  5. 23 3月, 2013 1 次提交
    • D
      Fix thread safety in LXC callback handling · d50cb2b1
      Daniel P. Berrange 提交于
      Some of the LXC callbacks did not lock the virDomainObjPtr
      instance. This caused transient errors like
      
      error: Failed to start domain busy-mount
      error: cannot rename file '/var/run/libvirt/lxc/busy-mount.xml.new' as '/var/run/libvirt/lxc/busy-mount.xml': No such file or directory
      
      as 2 threads tried to update the status file concurrently
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d50cb2b1
  6. 14 3月, 2013 2 次提交
  7. 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
  8. 09 3月, 2013 1 次提交
    • G
      lxc: include sys/stat.h · c8871d8f
      Guido Günther 提交于
      This fixes the build on Debian Wheezy which otherwise fails with:
      
        CC     libvirt_driver_lxc_impl_la-lxc_process.lo
        lxc/lxc_process.c: In function 'virLXCProcessGetNsInode':
        lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration]
        lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs]
        cc1: all warnings being treated as errors
      c8871d8f
  9. 08 3月, 2013 2 次提交
    • D
      Include pid namespace inode in LXC audit messages · ab1ef3bc
      Daniel P. Berrange 提交于
      To allow the efficient correlation of container audit messages
      with host hosts, include the pid namespace inode in audit
      messages.
      ab1ef3bc
    • 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
  10. 05 2月, 2013 2 次提交
  11. 23 1月, 2013 1 次提交
  12. 16 1月, 2013 1 次提交
  13. 21 12月, 2012 5 次提交
  14. 18 12月, 2012 2 次提交
  15. 12 12月, 2012 1 次提交
    • M
      bandwidth: Create hierarchical shaping classes · 67159f1c
      Michal Privoznik 提交于
      These classes can borrow unused bandwidth. Basically,
      only egress qdsics can have classes, therefore we can
      do this kind of traffic shaping only on host's outgoing,
      that is domain's incoming traffic.
      67159f1c
  16. 04 12月, 2012 1 次提交
  17. 28 11月, 2012 7 次提交
  18. 22 11月, 2012 1 次提交
    • 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
  19. 27 9月, 2012 1 次提交
    • D
      Fix deadlock in handling EOF in LXC monitor · 36c1fc18
      Daniel P. Berrange 提交于
      Depending on the scenario in which LXC containers exit, it is
      possible for the EOF callback of the LXC monitor to deadlock
      the driver.
      
        #0  0x00000038a0a0de4d in __lll_lock_wait () from /lib64/libpthread.so.0
        #1  0x00000038a0a09ca6 in _L_lock_840 () from /lib64/libpthread.so.0
        #2  0x00000038a0a09ba8 in pthread_mutex_lock () from /lib64/libpthread.so.0
        #3  0x00007f4bd9579d55 in virMutexLock (m=<optimized out>) at util/threads-pthread.c:85
        #4  0x00007f4bcacc7597 in lxcDriverLock (driver=0x7f4bc40c8290) at lxc/lxc_conf.h:81
        #5  virLXCProcessMonitorEOFNotify (mon=<optimized out>, vm=0x7f4bb4000b00) at lxc/lxc_process.c:581
        #6  0x00007f4bd9645c91 in virNetClientCloseLocked (client=client@entry=0x7f4bb4009e60)
            at rpc/virnetclient.c:554
        #7  0x00007f4bd96460f8 in virNetClientIOEventLoopPassTheBuck (thiscall=0x0, client=0x7f4bb4009e60)
            at rpc/virnetclient.c:1306
        #8  virNetClientIOEventLoopPassTheBuck (client=0x7f4bb4009e60, thiscall=0x0)
            at rpc/virnetclient.c:1287
        #9  0x00007f4bd96467a2 in virNetClientCloseInternal (reason=3, client=0x7f4bb4009e60)
            at rpc/virnetclient.c:589
        #10 virNetClientCloseInternal (client=0x7f4bb4009e60, reason=3) at rpc/virnetclient.c:561
        #11 0x00007f4bcacc4a82 in virLXCMonitorClose (mon=0x7f4bb4000a00) at lxc/lxc_monitor.c:201
        #12 0x00007f4bcacc55ac in virLXCProcessCleanup (reason=<optimized out>, vm=0x7f4bb4000b00,
            driver=0x7f4bc40c8290) at lxc/lxc_process.c:240
        #13 virLXCProcessStop (driver=0x7f4bc40c8290, vm=vm@entry=0x7f4bb4000b00,
            reason=reason@entry=VIR_DOMAIN_SHUTOFF_DESTROYED) at lxc/lxc_process.c:735
        #14 0x00007f4bcacc5bd2 in virLXCProcessAutoDestroyDom (payload=<optimized out>,
            name=0x7f4bb4003c80, opaque=0x7fff41af2df0) at lxc/lxc_process.c:94
        #15 0x00007f4bd9586649 in virHashForEach (table=0x7f4bc409b270,
            iter=iter@entry=0x7f4bcacc5ab0 <virLXCProcessAutoDestroyDom>, data=data@entry=0x7fff41af2df0)
            at util/virhash.c:514
        #16 0x00007f4bcacc52d7 in virLXCProcessAutoDestroyRun (driver=driver@entry=0x7f4bc40c8290,
            conn=conn@entry=0x7f4bb8000ab0) at lxc/lxc_process.c:120
        #17 0x00007f4bcacca628 in lxcClose (conn=0x7f4bb8000ab0) at lxc/lxc_driver.c:128
        #18 0x00007f4bd95e67ab in virReleaseConnect (conn=conn@entry=0x7f4bb8000ab0) at datatypes.c:114
      
      When the driver calls virLXCMonitorClose, there is really no
      need for the EOF callback to be invoked in this case, since
      the caller can easily handle events itself. In changing this,
      the monitor needs to take a deep copy of the callback list,
      not merely a reference.
      
      Also adds debug statements in various places to aid
      troubleshooting
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      36c1fc18
  20. 26 9月, 2012 2 次提交
  21. 21 9月, 2012 1 次提交
  22. 30 8月, 2012 1 次提交
    • L
      network: get vlan info for Open vSwitch interfaces from proper source · b3bd5d6c
      Laine Stump 提交于
      This bug was revealed by the crash described in
      
        https://bugzilla.redhat.com/show_bug.cgi?id=852383
      
      The vlan info pointer sent to virNetDevOpenvswitchAddPort should never
      be non-NULL unless there is at least one tag. The factthat such a vlan
      info pointer was receveid pointed out that a caller was passing the
      wrong pointer. Instead of sending &net->vlan, the result of
      virDomainNetGetActualVlan(net) should be sent - that function will
      look for vlan info in net->data.network.actual->vlan, and in cany case
      return NULL instead of a pointer if the vlan info it finds has no
      tags.
      
      Aside from causing the crash, sending a hardcoded &net->vlan has the
      effect of ignoring vlan info from a <network> or <portgroup> config.
      b3bd5d6c
  23. 21 8月, 2012 1 次提交
  24. 17 8月, 2012 1 次提交
  25. 07 8月, 2012 1 次提交