1. 15 11月, 2014 1 次提交
  2. 07 11月, 2014 1 次提交
  3. 03 11月, 2014 1 次提交
    • M
      qemu: avoid rare race when undefining domain · b629c64e
      Martin Kletzander 提交于
      When one domain is being undefined and at the same time started, for
      example, there is a possibility of a rare problem occuring.
      
       - Thread 1 does virDomainUndefine(), has the lock, checks that the
         domain is active and because it's not, calls
         virDomainObjListRemove().
      
       - Thread 2 does virDomainCreate() and tries to lock the domain.
      
       - Thread 1 needs to lock domain list in order to remove the domain from
         it, but must unlock domain first (proper order is to lock domain list
         first and the domain itself second).
      
       - Thread 2 grabs the lock, starts the domain and releases the lock.
      
       - Thread 1 grabs the lock and removes the domain from list.
      
      With this patch:
      
       - qemuDomainRemoveInactive() creates a QEMU_JOB_MODIFY if that's
         possible, but since it must remove the domain from list either way,
         it continues even when starting the job failed.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1150505Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b629c64e
  4. 26 9月, 2014 1 次提交
    • P
      qemu: Always re-detect backing chain · fe7ef7b1
      Peter Krempa 提交于
      Since 363e9a68 we track backing chain metadata when creating snapshots
      the right way even for the inactive configuration. As we did not yet
      update other code paths that modify the backing chain (blockpull) the
      newDef backing chain gets out of sync.
      
      After stopping of a VM the new definition gets copied to the next start
      one. The new VM then has incorrect backing chain info. This patch
      switches the backing chain detector to always purge the existing backing
      chain and forces re-detection to avoid this issue until we'll have full
      backing chain tracking support.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1144922
      fe7ef7b1
  5. 24 9月, 2014 3 次提交
    • P
      qemu: Report better errors from broken backing chains · 639a0098
      Peter Krempa 提交于
      Request erroring out from the backing chain traveller and drop qemu's
      internal backing chain integrity tester.
      
      The backing chain traveller reports errors by itself with possibly more
      detail than qemuDiskChainCheckBroken ever could.
      
      We also need to make sure that we reconnect to existing qemu instances
      even at the cost of losing the backing chain info (this really should be
      stored in the XML rather than reloaded from disk, but that needs some
      work).
      639a0098
    • P
      qemu: Sanitize argument names and empty disk check in qemuDomainDetermineDiskChain · 172ca0e7
      Peter Krempa 提交于
      Reuse virStorageSourceIsEmpty and rename "force" argument to
      "force_probe".
      172ca0e7
    • P
      util: storage: Allow metadata crawler to report useful errors · b8549877
      Peter Krempa 提交于
      Add a new parameter to virStorageFileGetMetadata that will break the
      backing chain detection process and report useful error message rather
      than having to use virStorageFileChainGetBroken.
      
      This patch just introduces the option, usage will be provided
      separately.
      b8549877
  6. 23 9月, 2014 1 次提交
  7. 19 9月, 2014 2 次提交
  8. 18 9月, 2014 2 次提交
  9. 16 9月, 2014 1 次提交
  10. 10 9月, 2014 4 次提交
  11. 08 9月, 2014 1 次提交
  12. 14 8月, 2014 1 次提交
  13. 08 7月, 2014 2 次提交
  14. 02 7月, 2014 1 次提交
  15. 26 6月, 2014 2 次提交
  16. 25 6月, 2014 1 次提交
    • J
      qemu: enum cleanups in "src/qemu/*" · aa990efe
      Julio Faracco 提交于
      As we are doing with the enum structures, a cleanup in "src/qemu/"
      directory was done now. All the enums that were defined in the
      header files were converted to typedefs in this directory. This
      patch includes all the adjustments to remove conflicts when you do
      this kind of change. "Enum-to-typedef"'s conversions were made in
      "src/qemu/qemu_{capabilities, domain, migration, hotplug}.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      aa990efe
  17. 21 6月, 2014 1 次提交
  18. 20 6月, 2014 1 次提交
  19. 12 6月, 2014 1 次提交
  20. 06 6月, 2014 2 次提交
    • E
      conf: store mirroring information in virStorageSource · 7b7bf001
      Eric Blake 提交于
      The current implementation of 'virsh blockcopy' (virDomainBlockRebase)
      is limited to copying to a local file name.  But future patches want
      to extend it to also copy to network disks.  This patch converts over
      to a virStorageSourcePtr, although it should have no semantic change
      visible to the user, in anticipation of those future patches being
      able to use more fields for non-file destinations.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Change type of
      mirror information.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML): Localize
      mirror parsing into new object.
      (virDomainDiskDefFormat): Adjust clients.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainBlockPivot)
      (qemuDomainBlockJobImpl, qemuDomainBlockCopy): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7b7bf001
    • E
      conf: store disk source as pointer, for easier manipulation · c123ef71
      Eric Blake 提交于
      As part of the work on backing chains, I'm finding that it would
      be easier to directly manipulate chains of pointers (adding a
      snapshot merely adjusts pointers to form the correct list) rather
      than copy data from one struct to another.  This patch converts
      domain disk source to be a pointer.
      
      In this patch, the pointer is ALWAYS allocated (thanks in part to
      the previous patch forwarding all disk def allocation through a
      common point), and all other changse are just mechanical fallout of
      the new type; there should be no functional change.  It is possible
      that we may want to leave the pointer NULL for a cdrom with no
      medium in a later patch, but as that requires a closer audit of the
      source to ensure we don't fault on a null dereference, I didn't do
      it here.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Change type of src.
      * src/conf/domain_conf.c: Adjust all clients.
      * src/security/security_selinux.c: Likewise.
      * src/qemu/qemu_domain.c: Likewise.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_process.c: Likewise.
      * src/qemu/qemu_migration.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/lxc/lxc_controller.c: Likewise.
      * tests/securityselinuxlabeltest.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c123ef71
  21. 03 6月, 2014 4 次提交
    • P
      storage: Traverse backing chains of network disks · 1423ae29
      Peter Krempa 提交于
      Now we don't need to skip backing chain detection for remote disks.
      1423ae29
    • P
      storage: Move virStorageFileGetMetadata to the storage driver · 713cc3b0
      Peter Krempa 提交于
      My future work will modify the metadata crawler function to use the
      storage driver file APIs to access the files instead of accessing them
      directly so that we will be able to request the metadata for remote
      files too. To avoid linking the storage driver to every helper file
      using the utils code, the backing chain traversal function needs to be
      moved to the storage driver source.
      
      Additionally the virt-aa-helper and virstoragetest programs need to be
      linked with the storage driver as a result of this change.
      713cc3b0
    • J
      conf: more enum cleanups in "src/conf/domain_conf.h" · 5a2bd4c9
      Julio Faracco 提交于
      In "src/conf/domain_conf.h" there are many enum declarations. The
      cleanup in this header filer was started, but it wasn't enough and
      there are many other files that has enum variables declared. So, the
      commit was starting to be big. This commit finish the cleanup in this
      header file and in other files that has enum variables, parameters,
      or functions declared.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5a2bd4c9
    • J
      conf: enum cleanups in "src/conf/domain_conf.h" · d4dad162
      Julio Faracco 提交于
      In "src/conf/domain_conf.h" there are many enumerations (enum)
      declarations to be converted as a typedef too. As mentioned before,
      it's better to use a typedef for variable types, function types and
      other usages. I think this file has most of those enum declarations
      at "src/conf/". So, me and Eric Blake plan to keep the cleanups all
      over the source code. This time, most of the files changed in this
      commit are related to part of one file: "src/conf/domain_conf.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      d4dad162
  22. 15 5月, 2014 1 次提交
  23. 14 5月, 2014 4 次提交
    • J
      qemu: Ignore temporary job errors when checking migration status · cc4882f4
      Jiri Denemark 提交于
      When qemu driver is polling for migration to finish (in
      qemuMigrationWaitForCompletion), it may happen that another job allowed
      during migration is running and if it does not finish within 30 seconds,
      migration would be cancelled because of that. However, we can just
      ignore the timeout and let the waiting loop try again later.
      
      If an event fired at the end of migration is ever implemented in QEMU,
      we can just wait for the event instead of polling for migration status
      and libvirt will behave consistently, i.e., migration won't be cancelled
      in case another job started during migration takes long time to finish.
      
      For bug https://bugzilla.redhat.com/show_bug.cgi?id=1083238Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      cc4882f4
    • J
      qemuDomainObjBeginNestedJob: Return -2 for temporary failures · dca377db
      Jiri Denemark 提交于
      If job queue is full or waiting for a job times out, the function
      returns -2 so that it can be handled in a different way by callers.
      
      The change is safe since all existing callers of
      qemuDomainObjBeginNestedJob check the return value to be less than zero.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      dca377db
    • J
      qemu: Make qemuDomainObjBeginNestedJob static · 1643b158
      Jiri Denemark 提交于
      It's only used within qemu_domain.c.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1643b158
    • R
      qemu: extract common PCI handling functions · 353cf370
      Roman Bogorodskiy 提交于
      Move sharable PCI handling functions to domain_addr.[ch], and
      change theirs prefix from 'qemu' to 'vir':
      
       - virDomainPCIAddressAsString;
       - virDomainPCIAddressBusSetModel;
       - virDomainPCIAddressEnsureAddr;
       - virDomainPCIAddressFlagsCompatible;
       - virDomainPCIAddressGetNextSlot;
       - virDomainPCIAddressReleaseSlot;
       - virDomainPCIAddressReserveAddr;
       - virDomainPCIAddressReserveNextSlot;
       - virDomainPCIAddressReserveSlot;
       - virDomainPCIAddressSetFree;
       - virDomainPCIAddressSetGrow;
       - virDomainPCIAddressSlotInUse;
       - virDomainPCIAddressValidate;
      
      The only change here is function names, the implementation itself
      stays untouched.
      
      Extract common allocation code from DomainPCIAddressSetCreate
      into virDomainPCIAddressSetAlloc.
      353cf370
  24. 07 5月, 2014 1 次提交