1. 24 4月, 2014 14 次提交
  2. 23 4月, 2014 4 次提交
  3. 22 4月, 2014 5 次提交
  4. 20 4月, 2014 1 次提交
  5. 18 4月, 2014 4 次提交
    • L
      docs: document that vfio is default for hostdev networks too · 668bf07f
      Laine Stump 提交于
      When the default was changed from kvm to vfio, the documentation for
      hostdev and interface was changed, but the documentation in <network>
      was forgotten.
      
      Also document when the default was changed from "always kvm" to "vfio
      if available, else kvm" (1.0.5).
      668bf07f
    • J
      Remove QEMU_CAPS_MACHINE_USB_OPT from ComputeCmdFlags · 062074c4
      Ján Tomko 提交于
      The version check is for >=1.3.0, but ComputeCmdFlags
      is only called for QEMU <1.2.0.
      062074c4
    • J
      Only set QEMU_CAPS_NO_HPET on x86 · c3725db8
      Ján Tomko 提交于
      QEMU only supports it on x86, but we've been assuming it for
      all QEMUs when doing QMP capability detection.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1066145
      c3725db8
    • N
      Fix Memory Leak in virStorageFileGetMetadataRecurse() · ab07a7b3
      Nehal J Wani 提交于
      While running virstoragetest, valgrind pointed out the following
      memory leak:
      
      ==8142== 2 bytes in 1 blocks are definitely lost in loss record 1 of 92
      ==8142==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
      ==8142==    by 0x4E7B53E: mdir_name (dirname-lgpl.c:78)
      ==8142==    by 0x4CBE2B0: virStorageFileGetMetadataInternal (virstoragefile.c:595)
      ==8142==    by 0x4CBE651: virStorageFileGetMetadataFromFDInternal (virstoragefile.c:1086)
      ==8142==    by 0x4CBEEB4: virStorageFileGetMetadataRecurse (virstoragefile.c:1175)
      ==8142==    by 0x4CBF1DE: virStorageFileGetMetadata (virstoragefile.c:1270)
      ==8142==    by 0x4028AD: testStorageChain (virstoragetest.c:275)
      ==8142==    by 0x407B91: virtTestRun (testutils.c:201)
      ==8142==    by 0x4039D7: mymain (virstoragetest.c:534)
      ==8142==    by 0x40830D: virtTestMain (testutils.c:789)
      ==8142==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
      
      ...62 times
      ab07a7b3
  6. 17 4月, 2014 1 次提交
  7. 16 4月, 2014 4 次提交
    • J
      storage: netfs: Handle backend errors · 4090e153
      John Ferlan 提交于
      Commit id '18642d10' caused a virt-test regression for NFS backend
      storage error path checks when running the command:
      
          'virsh find-storage-pool-sources-as netfs Unknown  '
      
      when the host did not have Gluster installed. Prior to the commit,
      the test would fail with the error:
      
          error: internal error: Child process (/usr/sbin/showmount --no-headers
          --exports Unknown) unexpected exit status 1: clnt_create: RPC: Unknown host
      
      After the commit, the error would be ignored, the call would succeed,
      and an empty list of pool sources returned. This was tucked into the
      commit message as an expected outcome.
      
      When the target host does not have a GLUSTER_CLI this is a regression
      over the previous release. Furthermore, even if Gluster CLI was present,
      but had a failure to get devices, the API would return a failure even if
      the NFS backend had found devices.
      
      Modify the logic to return failure when the NFS backend check fails and
      there's no GLUSTER_CLI or when both backend checks fail.
      
      If either returns success and GLUSTER_CLI is defined, then fetch and return
      a list of source devices even if it's empty
      4090e153
    • E
      conf: fix omission of <driver> in domain dumpxml · 8fb44675
      Eric Blake 提交于
      I noticed that depending on the <driver> attributes the user passed
      in, the output may omit the <driver> element altogether.  For example,
      the rerror_policy has had this problem since commit 4bb4109f in Oct
      2011.  But in adding testsuite coverage to expose it, I found another
      problem: the C code is just fine without a driver name, but the
      XML validator required either a name or a cache mode.
      
      * src/conf/domain_conf.c (virDomainDiskDefFormat): Update
      conditional.
      * docs/schemas/domaincommon.rng (diskDriver): Simplify.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.args:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Enhance test.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      Likewise.
      * tests/qemuxml2argvtest.c (mymain): New test.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      8fb44675
    • E
      conf: split <disk> schema into more pieces · fec1a939
      Eric Blake 提交于
      To make <disk> schema more maintainable and to allow for moving the
      pieces to a common file in the future. It relies on the ability to
      override definitions as part of an include, set up in the previous
      patch.
      
      The diff is a bit hard to read, because it mixes reindentation
      with refactoring; 'git diff -b --patience' may help.
      
      * docs/schemas/domaincommon.rng (disk): Refactor into pieces.
      (diskSource, diskSourceFile, diskSourceBlock, diskSourceDir)
      (diskSourceVolume: New defines.
      (diskSourceNetwork): Revise scope.
      * docs/schemas/domainsnapshot.rng (disksnapshot): Adjust.
      * tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml,
      tests/domainsnapshotxml2xmlin/disk-network-seclabel-invalid.xml: New
      tests to check seclabel is forbidden in domain snapshot by schema.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      fec1a939
    • E
      conf: set up for per-grammar overrides in schemas · 369cdfa8
      Eric Blake 提交于
      This patch is my first experience playing with nested grammars,
      as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR.
      I plan on doing more overrides in order to make the RelaxNG
      grammar mirror the C code refactoring into a common
      virStorageSource, but where different clients of that source do
      not support the same subset of functionality.  By starting with
      something fairly easy to validate, I can make sure my later
      patches will be possible.
      
      This patch adds a use of the no-op <ref
      name='sourceStartupPolicy'/> to the disksnapshot definition, so
      that the snapshot version of a type='file' <source> more closely
      resembles the version in domaincommon.  A future patch will merge
      the two files into using a common define, but this patch is
      sufficient for testing that adding <source
      startupPolicy='optional'/> in any of the
      tests/domainsnapshotxml2xmlin/*.xml files still gets rejected
      unless it occurs within the <domain> subelement, because the
      definition of startupPolicy is empty outside of domain.rng.
      
      * docs/schemas/storagecommon.rng (storageStartupPolicy)
      (storageSourceExtra): Create no-op defaults.
      * docs/schemas/domainsnapshot.rng (domain): Use nested grammar
      to avoid restricting <domain>.
      (storageSourceExtra): Create new override.
      (disksnapshot): Access overrides through common names.
      * docs/schemas/domaincommon.rng (disk): Access overrides through
      common names.
      * docs/schemas/domain.rng (storageStartupPolicy)
      (storageSourceExtra): Create new overrides.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      369cdfa8
  8. 15 4月, 2014 5 次提交
    • E
      conf: restrict external snapshots to backing store formats · db7d7c0e
      Eric Blake 提交于
      Domain snapshots should only permit an external snapshot into
      a storage format that permits a backing chain, since the new
      snapshot file necessarily must be backed by the existing file.
      The C code for the qemu driver is a little bit stricter in
      currently enforcing only qcow2 or qed, but at the XML parser
      level, including virt-xml-validate, it is fairly easy to
      enforce that a user can't request a 'raw' external snapshot.
      
      * docs/schemas/storagecommon.rng (storageFormat): Split out...
      (storageFormatBacking): ...new sublist.
      * docs/schemas/domainsnapshot.rng (disksnapshotdriver): Use new
      type.
      * src/util/virstoragefile.h (virStorageFileFormat): Rearrange for
      easier code management.
      * src/util/virstoragefile.c (virStorageFileFormat, fileTypeInfo):
      Likewise.
      * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML): Use
      new marker to limit selection of formats.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      db7d7c0e
    • E
      conf: move storage formats to common RNG file · 4f596a07
      Eric Blake 提交于
      We had incomplete RelaxNG support for storage formats listed
      in virstoragefile.h: commit 027bf2ea added 'vdi' but forgot
      to update the <volume> and <domain> xml lists; the <volume>
      list was also missing 'fat' and 'vhd'.  Maintaining two lists
      is a recipe for them getting out of sync, so make the list
      common so that both contexts benefit the next time we add a
      format in a single location.
      
      * docs/schemas/domaincommon.rng (storageFormat): Move...
      * docs/schemas/storagecommon.rng: ...here, and add vdi.
      * docs/schemas/storagevol.rng (formatfile): Use common list.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4f596a07
    • E
      conf: better <disk> interleaving in schema · a9efe2d7
      Eric Blake 提交于
      In general, we try to make virt-xml-validate tolerant of input
      elements in any order when possible.  However, as written, the
      RNG grammar did not permit <source> unless there was an explicit
      type= attribute (even though the C code manages just fine by
      defaulting to type='file').  After making the attribute optional
      on the 'file' branch, I noticed that the use of diskspec was now
      redundant with the branch when no <source> was supplied.
      
      View this patch with 'git diff -b' for a better picture of the
      schema change.
      
      * docs/schemas/domaincommon.rng (disk): Hoist 'diskspec' out of
      choice, make type='file' default, and still preserve interleave.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-source-pool.xml:
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Reorder XML.
      * tests/qemuxml2xmltest.c (mymain): Cover new files.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9efe2d7
    • J
      Fix virsystemdtest without SYSTEMD_DAEMON · 6077be46
      Ján Tomko 提交于
      Commit 48976981 fixed the build without dbus by only building
      the virSystemdPMSupportTarget with SYSTEMD_DAEMON.
      
      Introduce a virDBusMessageUnref wrapper for dbus_message_unref
      to let virsystemd.c build without dbus, while still allowing
      virsystemdtest to run without SYSTEM_DAEMON.
      6077be46
    • M
      build: Don't use code with dbus_message_unref when built without dbus · 48976981
      Martin Kletzander 提交于
      In order to do that, virNodeSuspendSupportsTargetPMUtils() and
      virSystemdPMSupportTarget() are created even when pm-utils and dbus
      are compiled out, respectively, but in that case returning -2 meaning
      "unavailable" (this return code was already used for unavailability
      before).  Error is reported in virNodeSuspendSupportsTarget() only if
      both functions returned -2, otherwise the error (or success) is properly
      propagated up the stack.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      48976981
  9. 14 4月, 2014 2 次提交