1. 14 12月, 2017 14 次提交
    • P
      util: storage: Add helpers to parse and format relPath into privateData · cd317093
      Peter Krempa 提交于
      This will be the first private piece of data that will need to be stored
      in the XML for some drivers. Add helpers which will do it.
      cd317093
    • P
      conf: Add infrastructure for disk source private data XML · aed3d038
      Peter Krempa 提交于
      VM drivers may need to store additional private data to the status XML
      so that it can be restored after libvirtd restart. Since not everything
      is needed add a callback infrastructure, where VM drivers can add only
      stuff they need.
      
      Note that the private data is formatted as a <privateData> sub-element
      of the <disk> or <backingStore> <source> sub-element. This is done since
      storing it out of band (in the VM private data) would require a complex
      matching process to allow to put the data into correct place.
      aed3d038
    • J
      docs: Fix news.xml syntax · 7db25159
      John Ferlan 提交于
      Commit id '1241e487' used <code>&lt;interface&gt;</code> which
      is not valid syntax for a <summary>.
      7db25159
    • J
      news: mention multiple IP addresses support for Xen · 1241e487
      Jim Fehlig 提交于
      1241e487
    • J
      util: Report error if vhost-scsi device file cannot be found · 21141549
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1523564
      
      If the vhost-scsi device file cannot be found, the generic error
      
          "error: An error occurred, but the cause is unknown"
      
      is returned.  Let's add a real error message to make it clear
      why the failure occurred.
      21141549
    • J
      util: Fix error path in virSCSIVHostOpenVhostSCSI · 9e030093
      John Ferlan 提交于
      We cannot be sure someone initialized the passed *vhostfd and we
      certainly don't want or need to be calling VIR_FORCE_CLOSE on what
      probably is -1. So let's just return -1 immediately.
      9e030093
    • J
      qemu: Need to assign PCI address to vhost-scsi · 10c73bf1
      John Ferlan 提交于
      Commit id '70249927' neglected to cover this case because the test
      had taken the "shortcut" to already add the <address>; however, when
      the PCI address assignment code was adjusted by commit id '70249927'
      the vhost-scsi (VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) wasn't
      covered thus returning a 0 for pciFlags. So I altered the tests too
      to make sure it doesn't happen again.
      
      Previously the qemuxml2xmloutdata was a softlink to the source
      qemuxml2argvdata, so I unlinked and recreated the output file to
      force generation of the adddress. Without the test changes, an
      address generation returns:
      
          libvirt: Domain Config error : internal error: Cannot automatically
          add a new PCI bus for a device with connect flags 00
      
      if an address was supplied in the test, a restart of libvirtd or
      edit of a guest would display the following opaque message:
      
          warning : qemuDomainCollectPCIAddress:1237 :
          qemuDomainDeviceCalculatePCIConnectFlags() thinks that the device
           with PCI address 0000:00:09.0 should not have a PCI address
      
      where the address is related to the guest PCI address provided.
      10c73bf1
    • M
      xenconfig: fix issue found by coverity in multiple IP support · 9f8778df
      Marek Marczykowski-Górecki 提交于
      virStringSplit may return NULL, so we must handle that.
      
      Cc: John Ferlan <jferlan@redhat.com>
      Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      9f8778df
    • M
      xenconfig: Remove unnecessary variable clear in xenMakeIPList · a6093893
      Marek Marczykowski-Górecki 提交于
      Remove the unnecessary clearing of address_array as VIR_ALLOC_N
      initialized the array already.
      
      Cc: John Ferlan <jferlan@redhat.com>
      Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      a6093893
    • J
      qemu: Tolerate storage source private data being NULL for hotplug SCSI hostdev · 6050affb
      John Ferlan 提交于
      Commit id 'c5c96545' neglected to validate that the srcPriv was
      non-NULL before dereferencing. Similar problem to what was fixed
      by commit id '8056721c' but missed during multiple rebases and
      code reworks.
      6050affb
    • J
      storage: Reduce need for using storageDriverLock · 052ecaee
      John Ferlan 提交于
      Now that the storage pools are self locking, we can reduce the number
      of places that need to take the big hammer storage driver lock
      052ecaee
    • J
      storage: Convert virStoragePoolObjList to use virObjectRWLockable · 4b2e0ed6
      John Ferlan 提交于
      Now that we have a private storage pool list, we can take the next
      step and convert to using objects. In this case, we're going to use
      RWLockable objects (just like every other driver) with two hash
      tables for lookup by UUID or Name.
      
      Along the way the ForEach and Search API's will be adjusted to use
      the related Hash API's and the various FindBy functions altered and
      augmented to allow for HashLookup w/ and w/o the pool lock already
      taken.
      
      After virStoragePoolObjRemove we will need to virObjectUnref(obj)
      after to indicate the caller is "done" with it's reference. The
      Unlock occurs during the Remove.
      
      The NumOf, GetNames, and Export functions all have their own callback
      functions to return the required data and the FindDuplicate code
      can use the HashSearch function callbacks.
      4b2e0ed6
    • J
      storage: Privatize virStoragePoolObjListPtr · 90e65353
      John Ferlan 提交于
      Move the structure into virstorageobj.c.
      
      Use the virStoragePoolObjListNew allocator to fill in the @pools for
      the storage driver and test driver.
      90e65353
    • J
      storage: Fix path check in storagePoolLookupByTargetPath · d4f80d43
      John Ferlan 提交于
      Commit id '5ab746b8' introduced the function as perhaps a copy
      of storageVolLookupByPath; however, it did not use the @cleanpath
      variable even though it used the virFileSanitizePath. So in essance
      the only "check" being done for failure is whether it was possible
      to strdup the path.
      
      Looking at the virStoragePoolDefParseXML one will note that the
      target.path is stored using the result of virFileSanitizePath.
      Therefore, this function should sanitize and use the input @path
      for the argument to storagePoolLookupByTargetPathCallback which
      is comparing against stored target.path values.
      
      Additionally, if there was an error we should use the proper error
      of VIR_ERR_NO_STORAGE_POOL (instead of VIR_ERR_NO_STORAGE_VOL).
      d4f80d43
  2. 13 12月, 2017 3 次提交
  3. 12 12月, 2017 4 次提交
    • M
      fillQemuCaps: Don't leak machine string · fb8c0ea8
      Michal Privoznik 提交于
      ==25251== 5 bytes in 1 blocks are definitely lost in loss record 7 of 81
      ==25251==    at 0x4C2BEDF: malloc (vg_replace_malloc.c:299)
      ==25251==    by 0x967E379: strdup (in /lib64/libc-2.25.so)
      ==25251==    by 0x5366F9F: virStrdup (virstring.c:941)
      ==25251==    by 0x538BF1D: virDomainCapsNew (domain_capabilities.c:121)
      ==25251==    by 0x10EACE: test_virDomainCapsFormat (domaincapstest.c:295)
      ==25251==    by 0x10FBD2: virTestRun (testutils.c:180)
      ==25251==    by 0x10F192: mymain (domaincapstest.c:457)
      ==25251==    by 0x111C7F: virTestMain (testutils.c:1119)
      ==25251==    by 0x10FA3C: main (domaincapstest.c:528)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fb8c0ea8
    • M
      xenMakeIPList: Don't leak @address_array · 34fb67ef
      Michal Privoznik 提交于
      ==32171== 32 bytes in 1 blocks are definitely lost in loss record 44 of 107
      ==32171==    at 0x4C2DEF6: calloc (vg_replace_malloc.c:711)
      ==32171==    by 0x55744A9: virAllocN (viralloc.c:191)
      ==32171==    by 0x12CED2: xenMakeIPList (xen_common.c:1186)
      ==32171==    by 0x12D0BE: xenFormatNet (xen_common.c:1221)
      ==32171==    by 0x12F0D2: xenFormatVif (xen_common.c:1889)
      ==32171==    by 0x12F2B4: xenFormatConfigCommon (xen_common.c:1944)
      ==32171==    by 0x13BA32: xenFormatXL (xen_xl.c:1971)
      ==32171==    by 0x1186CA: testCompareParseXML (xlconfigtest.c:105)
      ==32171==    by 0x118A64: testCompareHelper (xlconfigtest.c:205)
      ==32171==    by 0x119E36: virTestRun (testutils.c:180)
      ==32171==    by 0x11970E: mymain (xlconfigtest.c:301)
      ==32171==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      34fb67ef
    • M
      xenParseXLVnuma: Don't leak @tmp and @token · 747faf11
      Michal Privoznik 提交于
      ==30399== 180 (144 direct, 36 indirect) bytes in 3 blocks are definitely lost in loss record 91 of 111
      ==30399==    at 0x4C2E0FF: realloc (vg_replace_malloc.c:785)
      ==30399==    by 0x5574572: virReallocN (viralloc.c:245)
      ==30399==    by 0x5574668: virExpandN (viralloc.c:294)
      ==30399==    by 0x55747AB: virResizeN (viralloc.c:352)
      ==30399==    by 0x560074D: virStringSplitCount (virstring.c:115)
      ==30399==    by 0x137A59: xenParseXLVnuma (xen_xl.c:442)
      ==30399==    by 0x13952B: xenParseXL (xen_xl.c:1064)
      ==30399==    by 0x11884D: testCompareFormatXML (xlconfigtest.c:152)
      ==30399==    by 0x118A87: testCompareHelper (xlconfigtest.c:207)
      ==30399==    by 0x119E36: virTestRun (testutils.c:180)
      ==30399==    by 0x119186: mymain (xlconfigtest.c:274)
      ==30399==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      747faf11
    • Y
      Fix minor typos · ca18914e
      Yuri Chornoivan 提交于
      ca18914e
  4. 11 12月, 2017 2 次提交
  5. 10 12月, 2017 4 次提交
    • L
      qemu: Introduce qemuDomainDeviceDefValidateControllerIDE · 07adbd4b
      Lin Ma 提交于
      Move the IDE controller check from command line building to
      controller def validation. Also explicitly include the avoidance
      check for the implicit IDE controller from qemuBuildSkipController.
      
      Cause the IDE case for command line building to generate a
      failure if called to add an IDE since that shouldn't happen
      if the Validate code did the right thing.
      07adbd4b
    • J
      qemu: Move CCW S390 Address check to controller def validate · 29d8c17b
      John Ferlan 提交于
      Move the call to qemuDomainCheckCCWS390AddressSupport from
      qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController.
      
      This means we will get the qemuCaps from the driver opaque
      variable passed to qemuDomainDeviceDefValidate.
      29d8c17b
    • J
      qemu: Introduce qemuDomainDeviceDefValidateController · 3ba92186
      John Ferlan 提交于
      Introduce the bare bones helper to validate whether the controller
      definition is valid.
      3ba92186
    • J
      qemu: Introduce qemuBuildSkipController · ac0fb44a
      John Ferlan 提交于
      Move the non USB implicit controller checks into their own
      helper to reduce the cruft in qemuBuildControllerDevCommandLine.
      ac0fb44a
  6. 09 12月, 2017 3 次提交
  7. 08 12月, 2017 4 次提交
  8. 07 12月, 2017 6 次提交