1. 09 4月, 2014 3 次提交
  2. 08 4月, 2014 18 次提交
  3. 07 4月, 2014 9 次提交
    • W
      bhyve: connectCompareCPU support · 627d1439
      Wojciech Macek 提交于
      Implement support for connectCompareCPU.
      627d1439
    • W
      bhyve: create capabilities submodule · b15a2bbd
      Wojciech Macek 提交于
      - Move all capabilities functions to separate file
      - Add initCPU
      b15a2bbd
    • W
      bhyve: support for connectBaselineCPU · 36cf8174
      Wojciech Macek 提交于
      Implement bhyveConnectBaselineCPU to support OpenStack/Nova
      36cf8174
    • L
      interface: dump inactive xml when interface isn't active · 7284c499
      Laine Stump 提交于
      Other drivers in libvirt (e.g. network, qemu) will automatically
      return the "inactive" (persistent configuration) XML of an object when
      that object is inactive. The netcf backend of the interface driver
      would always try to return the live status XML of the interface, even
      when it was down. Although netcf does return valid XML in that case,
      for bond interfaces it is missing almost all of its content, including
      the <bond> subelement itself, leading to this error message from
      "virsh iface-dumpxml" of a bond interface that is inactive:
      
        error: XML error: bond interface misses the bond element
      
      (this is because libvirt's validation of the XML returned by netcf
      always requires a <bond> element be present).
      
      This patch modifies the interface driver netcf backend to check if the
      interface is inactive, and in that case always return the inactive XML
      (which will always have a <bond> element, thus eliminating the error
      message, as well as making operation more in line with other drivers.
      
      This fixes the following bug:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=878394
      7284c499
    • E
      hash: add common utility functions · 09567144
      Eric Blake 提交于
      I almost wrote a hash value free function that just called
      VIR_FREE, then realized I couldn't be the first person to
      do that.  Sure enough, it was worth factoring into a common
      helper routine.
      
      * src/util/virhash.h (virHashValueFree): New function.
      * src/util/virhash.c (virHashValueFree): Implement it.
      * src/util/virobject.h (virObjectFreeHashData): New function.
      * src/libvirt_private.syms (virhash.h, virobject.h): Export them.
      * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit): Use
      common function.
      * src/qemu/qemu_capabilities.c (virQEMUCapsCacheNew): Likewise.
      * src/qemu/qemu_command.c (qemuDomainCCWAddressSetCreate):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorGetBlockInfo): Likewise.
      * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
      * src/util/virclosecallbacks.c (virCloseCallbacksNew): Likewise.
      * src/util/virkeyfile.c (virKeyFileParseGroup): Likewise.
      * tests/qemumonitorjsontest.c
      (testQemuMonitorJSONqemuMonitorJSONGetBlockInfo): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      09567144
    • J
      tests: build viridentitytest only WITH_ATTR. · cdc5f3f1
      Jincheng Miao 提交于
      Commit d7c4e003 assumed all SELinux tests depended upon
      securityselinuxhelper need xattr support, but forgot to
      move viridentitytest under WITH_ATTR.
      Reported-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      Signed-off-by: NJincheng Miao <jmiao@redhat.com>
      cdc5f3f1
    • P
      maint: Correctly detect wether "gluster" cli tool is accessible · 56746d8a
      Peter Krempa 提交于
      The configure definition previously always defined the GLUSTER_CLI macro
      and thus the code needing it wasn't compiled out if the tool wasn't
      accessible.
      56746d8a
    • G
      libvirt-guests: avoid bashism · 5a058657
      Guido Günther 提交于
      At least Debian uses dash to run the init scripts
      5a058657
    • A
      QoS: make tc filters match all traffic · d9de1443
      Antoni S. Puimedon 提交于
      Up until now the traffic control filters for the vNIC QoS were
      matching only ip traffic. For egress traffic that was unnoticed
      because the unmatched traffic would just go to the default htb class
      and be shaped anyway. For ingress, though, since the policing of the
      rate is done by the filter itself.
      
      The problem is solved by changing protocol to all and making anything
      match the filter.
      
      Bug-Url: https://bugzilla.redhat.com/1084444Signed-off-by: NAntoni S. Puimedon <asegurap@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d9de1443
  4. 05 4月, 2014 6 次提交
    • R
      bhyve: add xml2argv tests for console · 4463e438
      Roman Bogorodskiy 提交于
      4463e438
    • R
      bhyve: add console support through nmdm device · 6c91134d
      Roman Bogorodskiy 提交于
      nmdm is a FreeBSD driver which allows to create a pair of tty
      devices one of which is passed to the guest and second is used
      by the client.
      
      This patch adds new 'nmdm' character device type. Its definition
      looks this way:
      
      <serial type='nmdm'>
        <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
      </serial>
      
      Master is passed to the hypervisior and slave is used for client
      connection.
      
      Also implement domainOpenConsole() for bhyve driver based on that.
      6c91134d
    • D
      bhyve: domain autostart support · 6318a801
      David Shane Holden 提交于
      Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      6318a801
    • E
      conf: track when storage type is still undetermined · 9673418c
      Eric Blake 提交于
      Right now, virStorageFileMetadata tracks bool backingStoreIsFile
      for whether the backing string specified in metadata can be
      resolved as a file (covering both block and regular file
      resources) or is treated as a network protocol.  But when
      merging this struct with virStorageSource, it will be easier
      to just actually track which type of resource it is, as well
      as have a reserved value for the case where the resource type
      is unknown (or had an error during probing).
      
      * src/util/virstoragefile.h (virStorageType): Add a placeholder
      value, swap order to match similar public enum.
      * src/util/virstoragefile.c (virStorage): Update string mapping.
      * src/conf/domain_conf.c (virDomainDiskSourceParse)
      (virDomainDiskDefParseXML, virDomainDiskDefFormat)
      (virDomainDiskSourceFormat): Adjust clients.
      * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML):
      Likewise.
      * src/qemu/qemu_driver.c
      (qemuDomainSnapshotPrepareDiskExternalBackingInactive)
      (qemuDomainSnapshotPrepareDiskExternalOverlayActive)
      (qemuDomainSnapshotPrepareDiskExternalOverlayInactive)
      (qemuDomainSnapshotPrepareDiskInternal)
      (qemuDomainSnapshotCreateSingleDiskActive): Likewise.
      * src/qemu/qemu_command.c (qemuGetDriveSourceString): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9673418c
    • E
      tests: refactor virstoragetest for less stack space · d1a1d841
      Eric Blake 提交于
      I'm about to add fields to virStorageFileMetadata, which means
      also adding fields to the testFileData struct in virstoragetest.
      Alas, adding even one pointer on an x86_64 machine gave me a
      dreaded compiler error:
      
      virstoragetest.c:712:1: error: the frame size of 4208 bytes is larger than 4096 bytes [-Werror=frame-larger-than=]
      
      After some experimentation, I realized that each test was creating
      yet another testChainData (which contains testFileData) on the stack;
      forcing the reuse of one of these structures instead of creating a
      fresh one each time drastically reduces the size requirements.  While
      at it, I also got rid of a lot of intermediate structs, with some
      macro magic that lets me directly build up the destination chains
      inline.
      
      For a bit more insight into what this patch does:
      The old code uses an intermediate variable as a fixed-size array
      of structs:
      testFileData chain[] = { a, b };
      data.files = chain;
      
      In the new code, the use of VIR_FLATTEN_* allows the TEST_CHAIN()
      macro to still take a single argument for each chain, but now of
      the form '(a, b)', where it is turned into the var-args 'a, b'
      multiple arguments understood by TEST_ONE_CHAIN().  Thus, the
      new code avoids an intermediate variable, and directly provides
      the list of pointers to be assigned into array elements:
      data.files = { &a, &b };
      
      * tests/virstoragetest.c (mymain): Rewrite TEST_ONE_CHAIN to
      reuse the same struct for each test, and to take the data
      inline rather than via intermediate variables.
      (testChainData): Use bounded array of pointers instead of
      unlimited array of struct.
      (testStorageChain): Reflect struct change.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d1a1d841
    • E
      tests: use C99 initialization for storage test · 7da61b30
      Eric Blake 提交于
      Writing this test with C99 initializers will make it easier to test
      additions and deletions to struct members as I refactor the code.
      
      * tests/virstoragetest.c (mymain): Rewrite initializers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7da61b30
  5. 04 4月, 2014 3 次提交
    • J
      NFS storage pool: Fix libvirtd crash due to refactor edit · 30283b86
      John Ferlan 提交于
      Commit id '18642d10' refactored the call to virCommandRunRegex()
      inside a new function virStorageBackendFileSystemNetFindNFSPoolSources(),
      but the cut-n-paste didn't remove the "&state".  Now that state is passed
      by reference, it results in a libvirtd core with a messages entry:
      
      "...internal error: unknown storage pool type Unknow"
      30283b86
    • O
      Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for all uses · 82d858ce
      Olivia Yin 提交于
      For example, the file /proc/cpuinfo for 24 cores PowerPC platform is larger than
      the previous maximum size 2KB.
      It will fail to start libvirtd with the error message as below:
      virFileReadAll: Failed to read file '/proc/cpuinfo': Value too large for defined
      data type
      virSysinfoRead: internal error Failed to open /proc/cpuinfo
      
      This patch defines CPUINFO_FILE_LEN as 10KB which is enough for most architectures.
      Signed-off-by: NOlivia Yin <Hong-Hua.Yin@freescale.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      82d858ce
    • N
      Fix Memory Leak in daemon/libvirtd.c · 34542473
      Nehal J Wani 提交于
      Fixes leak introduced by e562e82f
      
      ==4937== 64 bytes in 1 blocks are definitely lost in loss record 270 of 405
      ==4937==    at 0x4A06BE0: realloc (vg_replace_malloc.c:662)
      ==4937==    by 0x6FA41C4: __vasprintf_chk (vasprintf_chk.c:90)
      ==4937==    by 0x50C8D29: virVasprintfInternal (stdio2.h:199)
      ==4937==    by 0x50C8E3A: virAsprintfInternal (virstring.c:362)
      ==4937==    by 0x11D01A: main (libvirtd.c:1170)
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      34542473
  6. 03 4月, 2014 1 次提交
    • S
      libxl: Set disk format for empty cdrom device · 7a1452f5
      Stefan Bader 提交于
      The XML config for a CDROM device can be without a source path,
      indicating that there is no media present. Without this change
      the libxl driver fails to start a guest in that case because
      the libxl library checks for the LIBXL_DISK_FORMAT_EMPTY format
      type and tries to stat the NULL pointer that gets passed on.
      
      > libxl: error: libxl_device.c:265:libxl__device_disk_set_backend:
      > Disk vdev=hdc failed to stat: (null): Bad address
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      7a1452f5