1. 11 3月, 2015 5 次提交
    • M
      parallels: cpumask support · a4e0f234
      Maxim Nestratov 提交于
      Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
      a4e0f234
    • M
      domain_conf: fix crash in virDomainObjListFindByUUIDInternal · 616003d6
      Michael Chapman 提交于
      If a domain object is being removed and looked up concurrently we must
      ensure we unlock the object before unreferencing it, since the latter
      might free the object.
      
      The flaw was introduced in commit feb1a4d7.
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      616003d6
    • M
      {domain, network}_conf: disable autostart when deleting config · a6ec4f47
      Michael Chapman 提交于
      Undefining a running, autostarted domain removes the autostart link, but
      dom->autostart is not cleared. If the domain is subsequently redefined,
      libvirt thinks it is already autostarted and will not create the link
      even if requested:
      
        # virsh dominfo example | grep Autostart
        Autostart:      enable
      
        # ls /etc/libvirt/qemu/autostart/example.xml
        /etc/libvirt/qemu/autostart/example.xml
      
        # virsh undefine example
        Domain example has been undefined
      
        # virsh define example.xml
        Domain example defined from example.xml
      
        # virsh dominfo example | grep Autostart
        Autostart:      enable
      
        # virsh autostart example
        Domain example marked as autostarted
      
        # ls /etc/libvirt/qemu/autostart/example.xml
        ls: cannot access /etc/libvirt/qemu/autostart/example.xml: No such file or directory
      
      This commit ensures dom->autostart is cleared whenever the config and
      autostart link (if present) are removed.
      
      The bridge network driver cleared this flag itself in networkUndefine.
      This commit moves this into virNetworkDeleteConfig for symmetry with
      virDomainDeleteConfig, and to ensure it is not missed in future network
      drivers.
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      a6ec4f47
    • L
      qemu: Remove unnecessary virReportError on networkGetNetworkAddress return · 64595431
      Luyao Huang 提交于
      Error messages are already set in all code paths returning -1 from
      networkGetNetworkAddress, so we don't want to overwrite them.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      64595431
    • M
      virQEMUCapsInitQMP: Don't dispose locked @vm · 954427c3
      Michal Privoznik 提交于
      When creating qemu capabilities, a dummy virDomainObj is created just
      because our monitor code expects that. However, the object is created
      locked already. Then, under cleanup label, we simply unref the object
      which results in whole domain object to be disposed. The object lock
      is destroyed subsequently, but hey - it's still locked:
      
      ==24845== Thread #14's call to pthread_mutex_destroy failed
      ==24845==    with error code 16 (EBUSY: Device or resource busy)
      ==24845==    at 0x4C3024E: pthread_mutex_destroy (in /usr/lib64/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==24845==    by 0x531F72E: virMutexDestroy (virthread.c:83)
      ==24845==    by 0x5302977: virObjectLockableDispose (virobject.c:237)
      ==24845==    by 0x5302A89: virObjectUnref (virobject.c:265)
      ==24845==    by 0x1DD37866: virQEMUCapsInitQMP (qemu_capabilities.c:3397)
      ==24845==    by 0x1DD37CC6: virQEMUCapsNewForBinary (qemu_capabilities.c:3481)
      ==24845==    by 0x1DD381E2: virQEMUCapsCacheLookup (qemu_capabilities.c:3609)
      ==24845==    by 0x1DD30F8A: virQEMUCapsInitGuest (qemu_capabilities.c:744)
      ==24845==    by 0x1DD31889: virQEMUCapsInit (qemu_capabilities.c:1020)
      ==24845==    by 0x1DD7DD36: virQEMUDriverCreateCapabilities (qemu_conf.c:888)
      ==24845==    by 0x1DDC57C0: qemuStateInitialize (qemu_driver.c:803)
      ==24845==    by 0x53DC743: virStateInitialize (libvirt.c:777)
      ==24845==
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      954427c3
  2. 10 3月, 2015 6 次提交
  3. 09 3月, 2015 23 次提交
  4. 06 3月, 2015 6 次提交
    • M
      domain_conf: Format <pvpanic/> without address correctly · b39b1397
      Michal Privoznik 提交于
      We have something like pvpanic device. However, in some cases it does
      not have any address assigned, in which case we produce this ugly XML
      (still valid though):
      
        <devices>
          <emulator>/usr/bin/qemu</emulator>
          ...
          <panic>
          </panic>
        </devices>
      
      Lets format "<panic/>" instead.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b39b1397
    • D
      Refresh translations from Zanata · d196444c
      Daniel P. Berrange 提交于
      Delete .po files which contain zero translated strings. Refresh
      the .pot file and pull down latest translations from Zanata.
      
      When refreshing the libvirt.pot, it can be pushed to zanata
      and .po files resynchonized using
      
       # cd po
       # rm libvirt.pot
       # make libvirt.pot
       # zanata-cli push
       # zanata-cli pull
      
      Note there is no need for 'make update-po', as long as you do
      a zanata push, immediately followed by zanata pull, as the
      Zanata server will ensure the .po files downloaded match the
      just pushed .pot file.
      
      Note at time of writing, it is strongly recommended to only
      use the zanata Java client binary (zanata-cli), and not the
      python client binary (zanata). This is because the moderately
      large size of the libvirt pot file is causing errors when the
      python client tries to push, which have been known to result
      in the loss of all translations on the server, as well as also
      preventing uploading of .po files themselves :-(
      d196444c
    • J
      virsh: Add 'iothreadsinfo' command · f41a5b84
      John Ferlan 提交于
      Add the 'iothreadsinfo' command to display IOThread Info data. Allow for
      [--live] or [--config] options in order to display live or config data
      for an active domain.
      
      $ virsh iothreadsinfo --help
        NAME
          iothreadsinfo - view domain IOThreads
      
        SYNOPSIS
          iothreadsinfo <domain> [--config] [--live] [--current]
      
        DESCRIPTION
          Returns basic information about the domain IOThreads.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      An active domain may return:
      
      $ virsh iothreads $dom
       IOThread ID     CPU Affinity
      ---------------------------------------------------
        1               2
        2               3
        3               0
      
      $ echo $?
      0
      
      For domains which don't have IOThreads the following is returned:
      
      $ virsh iothreads $dom
      No IOThreads found for the domain
      
      $ echo $?
      0
      
      For domains which are not running the following is returned:
      
      $ virsh iothreads $dom --live
      error: Unable to get domain IOThreads information
      error: Requested operation is not valid: domain is not running
      
      $ echo $?
      1
      
      Editing a domains configuration and modifying the iothreadpin data for
      thread 3 from nothing provided to setting a cpuset of '0-1' and then
      displaying using --config would display:
      
      $ virsh iothreads f18iothr --config
       IOThread ID     CPU Affinity
       ----------------------------
        1               2
        2               3
        3               0-1
      
      $
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f41a5b84
    • J
      qemu: Implement the qemu driver fetch for IOThreads · 82649eb7
      John Ferlan 提交于
      Depending on the flags passed, either attempt to return the active/live
      IOThread data for the domain or the config data.
      
      The active/live path will call into the Monitor in order to get the
      IOThread data and then correlate the thread_id's returned from the
      monitor to the currently running system/threads in order to ascertain
      the affinity for each iothread_id.
      
      The config path will map each of the configured IOThreads and return
      any configured iothreadspin data
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      82649eb7
    • J
      remote: Implement the remote plumbing for virDomainGetIOThreadsInfo · 1e5a8ddc
      John Ferlan 提交于
      Implement the remote plumbing for virDomainGetIOThreadsInfo
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      1e5a8ddc
    • J
      Implement public API for virDomainGetIOThreadsInfo · 11a5a095
      John Ferlan 提交于
      Add virDomainGetIOThreadInfo in order to return a list of
      virDomainIOThreadInfoPtr structures which list the IOThread ID
      and the CPU Affinity map for each IOThread for the domain.
      
      For an active domain, the live data will be returned, while for
      an inactive domain, the config data will be returned.
      
      The API supports either the --live or --config flag, but not both.
      
      Also added virDomainIOThreadsInfoFree in order to free the cpumap
      and the IOThreadInfo structure.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      11a5a095