1. 27 2月, 2013 14 次提交
    • P
      docs: Fix attribute name for virtio-rng backend · 4db199fc
      Peter Krempa 提交于
      4db199fc
    • J
      tests: fix leaks in storagevolxml2argvtest · ecc17eb4
      Ján Tomko 提交于
      Reported by John Ferlan.
      ecc17eb4
    • M
      libvirt.c: Make VIR_MIGRATE_NON_SHARED_{INC,DISK} mutually exclusive · c69331b5
      Michal Privoznik 提交于
      These two flags in fact are mutually exclusive. Requesting them both
      doesn't make any sense regardless of hypervisor driver. Hence, we have
      to make it within libvirt.c file instead of fixing it in each driver.
      c69331b5
    • P
      doc: document new storage volume/pool types · c47884a1
      Philipp Hahn 提交于
      Add qed for dirfs pool.
      Add ocfs2 for disk pool.
      Add lvm2 for disk and logical pool.
      Add cifs and glusterfs for netfs pool.
      
      Note: POOL_DISK_LVM2 can not be created by "parted mklabel", but is only
      returned from auto-detection on disk pools.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      c47884a1
    • E
      build: don't use gcrypt.h without gnutls support · 76f35269
      Eric Blake 提交于
      Eugene Marcotte reported that if gcrypt-devel (a prereq of
      gnutls-devel) is not present, then compilation fails due to
      an unconditional use of <gcrypt.h>.
      
      * src/libvirt.c (includes): Properly guard use of gcrypt.h.
      76f35269
    • E
      Revert "S390: domain_conf support for CCW" · d76f3e06
      Eric Blake 提交于
      This reverts commit 0bbbd42c.
      
      The design for this feature is not complete, and may change the
      name of the 'schid' attribute.  Revert requested by Viktor Mihajlovski.
      d76f3e06
    • E
      Revert "S390: Documentation for CCW address type" · 035b0db8
      Eric Blake 提交于
      This reverts commit 24aa7f8d.
      
      The implementation to match the documentation is not complete yet,
      and the final design might change the name of the 'schid' attribute.
      035b0db8
    • P
      schema: Restrict mode to octal · 141deb9f
      Philipp Hahn 提交于
      virStrToLong(..., 8, ...) already requires the mode to be octal.
      Change the relax-ng schema to check for octal as well.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      141deb9f
    • E
      tests: skip virstoragetest on RHEL 5 · 9194679e
      Eric Blake 提交于
      virstoragetest was failing on RHEL 5, but with no good error message:
      
      TEST: virstoragetest
                                              0   FAIL
      
      It turns out that qemu-img was so old, that it lacked support for
      -o backing_file.  It didn't help that the test was also using
      qemu-img from PATH, even after first probing for kvm-img.
      
      * tests/virstoragetest.c (testPrepImages): Consistently use
      discovered binary.  Skip instead of fail if qemu-img fails during
      setup.
      9194679e
    • D
      interface: udev backend coverity NULL deref · 01207bb7
      Doug Goldstein 提交于
      This fixes a potential NULL deref identified by John Ferlan
      <jferlan@redhat.com> if scandir() didn't return an expected value.
      01207bb7
    • D
      Remove some C99 variable decls in parallels driver · 464c92c0
      Daniel P. Berrange 提交于
      The parallels storage driver declared some loop variables
      inside the for(;;). This is not allowed by libvirt coding
      standards
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      464c92c0
    • D
      Fix crash changing CDROM media · 02b90972
      Daniel P. Berrange 提交于
      This change tried to fix a crash with changing CDROM media but
      failed to actually do so
      
        commit d0172d2b
        Author: Osier Yang <jyang@redhat.com>
        Date:   Tue Feb 19 20:27:45 2013 +0800
      
          qemu: Remove the shared disk entry if the operation is ejecting or updating
      
      It was still accessing disk->src, when the entire 'disk' object
      has been free'd already. Even if it weren't free'd, accessing
      the 'src' value of virDomainDiskDef is not allowed without
      first validating disk->type is file or block. Just remove the
      broken code entirely.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      02b90972
    • E
      tests: old automake lacks abs_builddir · b6176e52
      Eric Blake 提交于
      On RHEL 5, 'make check' included failures such as:
      
      TEST: virstoragetest
      unable to create directory /virstoragedata/sub
      unable to return to correct directory, refusing to clean up /virstoragedata
      
      It turns out that with automake 1.9.x, $(abs_builddir) is not
      automatically provided.  We have previously worked around this
      by using `pwd` before, but because we did not do it everywhere,
      we had a number of broken tests.
      
      This patch brings RHEL 5 from 8 failed tests down to 5 (the
      remaining failures may be due to bugs in the older libxml2 and
      RNG schema validation available in RHEL 5, so I'm not sure if
      they can be fixed in libvirt, but I'm still investigating).
      
      * tests/Makefile.am (AM_CFLAGS): Reliably set abs_builddir.
      (*_la_CFLAGS): Factor out common settings; delete when nothing
      remains to be added.
      b6176e52
    • E
      tests: consistent skip messages · eb41338e
      Eric Blake 提交于
      On RHEL 5, I noticed this test failure message:
      
      TEST: qemumonitorjsontest
      libvirt not compiled with yajl, skippingSKIP: qemumonitorjsontest
      
      * tests/virstoragetest.c (testPrepImages): Use simpler fputs.
      * tests/qemumonitorjsontest.c (mymain): Ensure trailing newline.
      eb41338e
  2. 26 2月, 2013 10 次提交
    • J
      libvirt: fix error message when connection can't be opened · 633d859b
      Ján Tomko 提交于
      VIR_ERR_NO_CONNECT already contains "no connection driver available".
      
      This patch changes:
      no connection driver available for No connection for URI hello
      to:
      no connection driver available for hello
      
      Bug: https://bugzilla.redhat.com/show_bug.cgi?id=851413
      633d859b
    • P
      qemu: do not set unpriv_sgio if neither supported nor requested · 45dc3f17
      Paolo Bonzini 提交于
      Currently we call virSetDeviceUnprivSGIO with val == 0 if a block device
      has an sgio attribute.  But for sgio='filtered', we know that a
      kernel with no unpriv_sgio support will always behave as the user
      wanted.  In this case, there is no need to call the function and
      report a (bogus) error.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      45dc3f17
    • E
      tests: uniformly report test failures · dce95297
      Eric Blake 提交于
      testutils.c likes to print summaries after a test completes,
      including if it failed.  But if the test outright exit()s,
      this summary is skipped.  Enforce that we return instead of exit.
      
      * cfg.mk (sc_prohibit_exit_in_tests): New syntax check.
      * tests/commandhelper.c (main): Fix offenders.
      * tests/qemumonitorjsontest.c (mymain): Likewise.
      * tests/seclabeltest.c (main): Likewise.
      * tests/securityselinuxlabeltest.c (mymain): Likewise.
      * tests/securityselinuxtest.c (mymain): Likewise.
      * tests/testutils.h (VIRT_TEST_MAIN_PRELOAD): Likewise.
      * tests/testutils.c (virtTestMain): Likewise.
      (virtTestCaptureProgramOutput): Use symbolic name.
      dce95297
    • E
      tests: don't test json when not compiled in · f20b0476
      Eric Blake 提交于
      Now that the segfault is solved, we can skip instead of fail
      the test when yajl is not present.
      
      * tests/qemumonitorjsontest.c (mymain): Skip if no yajl.
      f20b0476
    • E
      tests: avoid segfault if json monitor not present · 848a3b1d
      Eric Blake 提交于
      On a machine without yajl headers, I was seeing random segfaults
      from qemumonitorjsontest (about 90% of the runs on my particular
      machine).  The segfault was inside virClassIsDerivedFrom, which
      points to a case of a race leading to unreferencing a stale
      pointer to an object that had already been freed.  I also noticed
      that if I got the segfault, I was seeing messages such as:
      
      2013-02-22 16:12:37.504+0000: 19833: error : virNetSocketWriteWire:1361 : Cannot write data: Bad file descriptor
      
      which is also evidence of deferencing a stale pointer.  I traced it
      to a race where qemuMonitorTestIO could execute late, after the
      main thread had already called qemuMonitorTestFree and called
      virNetSocketClose(test->client) but not clearing it out to NULL.
      Sure enough, after test->client has been closed, fd is -1, which
      causes an attempt to write to the socket to fail, which in turn
      triggers the error code of qemuMonitorTestIO that tries to re-close
      test->client.
      
      * tests/qemumonitortestutils.c (qemuMonitorTestIO): Don't attempt
      to free client again if test already quit.
      848a3b1d
    • E
      qemu: minor monitor lock cleanups · 6abd5ea1
      Eric Blake 提交于
      If virCondInit fails (okay, so that's unlikely), then we end up
      attempting a virObjectUnlock() on the cleanup path, even though
      we don't hold a lock.  This is not guaranteed to be safe.  While
      at it, I noticed a couple places where we were referencing mon->fd
      outside locks.
      
      * src/qemu/qemu_monitor.c (qemuMonitorOpenInternal): Minimize lock
      duration.  mon->watch doesn't need clean up on error.
      (qemuMonitorGetBlockExtent, qemuMonitorBlockResize): Don't
      dereference fd outside of lock.
      6abd5ea1
    • E
      qemu: don't override earlier json error · 29424d1a
      Eric Blake 提交于
      I built without yajl support, and noticed a strange failure message
      in qemumonitorjsontest:
      
      2013-02-22 16:12:37.503+0000: 19812: error : virJSONValueToString:1119 : internal error No JSON parser implementation is available
      2013-02-22 16:12:37.503+0000: 19812: error : qemuMonitorJSONCommandWithFd:253 : out of memory
      
      While a later patch will fix the test to skip when json is not present,
      this patch avoids overriding the more useful error message from
      virJSONValueToString returning NULL.
      
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONCommandWithFd):
      Don't override message.
      (qemuMonitorJSONCheckError): Don't print NULL.
      * src/qemu/qemu_agent.c (qemuAgentCommand): Don't override message.
      (qemuAgentCheckError): Don't print NULL.
      (qemuAgentArbitraryCommand): Properly fail on OOM.
      29424d1a
    • P
      conf: Avoid leaking of RNG device definition · 34f1a618
      Peter Krempa 提交于
      34f1a618
    • P
      qemu: Refactor qemuDomainSetMemoryParameters · 19c6ad9a
      Peter Krempa 提交于
      The new TypedParam helper APIs allow to simplify this function
      significantly.
      
      This patch integrates the fix in 75e5bec9
      by correctly ordering the setting functions instead of reordering the
      parameters.
      19c6ad9a
    • D
      interface: Fix udev backend bridge device display · 65bb1b97
      Doug Goldstein 提交于
      The bridge device was showing the vnet devices created for the domains
      as connected to the bridge. libvirt should only show host devices when
      trying to get the interface definition rather than the domain devices as
      well.
      65bb1b97
  3. 25 2月, 2013 16 次提交