1. 05 1月, 2013 14 次提交
    • P
      snapshot: qemu: Fix segfault and vanishing snapshots when redefining · 709b0f37
      Peter Krempa 提交于
      When the disk alignment check done while redefining an existing snapshot
      failed, the qemu driver attempted to free the existing snapshot. As in
      the cleanup path the definition of the snapshot wasn't assigned, the
      cleanup code dereferenced a NULL pointer.
      
      This patch changes the behavior on error paths while redefining snapshot
      in two ways:
      
      1) On failure, modifications done on the snapshot definition object are
      rolled back.
      
      2) The previous definition of the data isn't freed until it's certain it
      won't be needed any more.
      
      This change avoids the segfault and additionally the snapshot doesn't
      vanish if redefinition fails for some reason.
      709b0f37
    • P
      snapshot: qemu: Separate logic blocks with newlines · 4494b11f
      Peter Krempa 提交于
      4494b11f
    • P
      snapshot: conf: Make virDomainSnapshotIsExternal more reusable · 51b12b8c
      Peter Krempa 提交于
      Allow to use definition objects with this predicate function.
      51b12b8c
    • J
      qemu: Implement virDomainOpenChannel API · 346e43ec
      John Eckersberg 提交于
      346e43ec
    • J
      conf: Add unix socket support to virChrdevOpen · 66a06649
      John Eckersberg 提交于
      This also changes the function signature to take a
      virDomainChrSourceDefPtr instead of just a path, since it needs to
      differentiate behavior based on source->type.
      66a06649
    • J
      conf: Rename console-specific identifiers to be more generic · 3c971c67
      John Eckersberg 提交于
      The functionality provided in virchrdev.c (previously virconsole.c) is
      applicable to other types of character devices besides consoles, such
      as channels.  This patch is just code motion, renaming things such as
      "console" or "pty", instead using more general terms such as
      "character device" or "device path".
      3c971c67
    • J
      conf: Rename virconsole.* to virchrdev.* · 4c85421c
      John Eckersberg 提交于
      This is just code motion, in preparation to rename identifiers to be
      less console-specific.
      4c85421c
    • J
      api: Add API to tunnel a guest channel via stream · d52add46
      John Eckersberg 提交于
      This patch adds a new API, virDomainOpenChannel, that uses streams to
      connect to a virtio channel on a guest.  This creates a secure
      communication channel between a guest and a libvirt client.
      
      This behaves the same as virDomainOpenConsole, except on channels
      instead of console/serial/parallel devices.
      d52add46
    • E
      build: fix mingw rpm build · 54df702e
      Eric Blake 提交于
      Commit d13155c2 changed which files get installed for the
      libvirt-guests service, but did not touch up the mingw spec
      file.  As a result, rpmbuild complained:
      
      RPM build errors:
          Installed (but unpackaged) file(s) found:
         /usr/i686-w64-mingw32/sys-root/mingw/libexec/libvirt-guests.sh
         /usr/x86_64-w64-mingw32/sys-root/mingw/libexec/libvirt-guests.sh
      
      which in turn breaks ./autobuild.sh when cross-compilers are present.
      
      * mingw-libvirt.spec.in: Remove files not relevant to mingw.
      54df702e
    • E
      network: fix check for ambiguous lookup · f5b654e3
      Eric Blake 提交于
      gcc -O2 complained:
      ../../src/conf/network_conf.c: In function 'virNetworkDefUpdateDNSSrv':
      ../../src/conf/network_conf.c:3232: error: 'foundIdx' may be used uninitialized in this function [-Wuninitialized]
      
      It turned out to be a spurious warning (we didn't use foundIdx
      unless foundCt was non-zero).  But in investigating that, I noticed
      a worse problem: we were using 'if (foundCt > 1)', but since foundCt
      was bool, it could never be > 1.
      
      * src/conf/network_conf.c (virNetworkDefUpdateDNSHost): Use
      correct type.
      (virNetworkDefUpdateDNSSrv): Likewise, and silence compiler
      warning.
      f5b654e3
    • J
      Check and handle select() errors from waitsocket(). · b6671250
      John Ferlan 提交于
      b6671250
    • J
      tests: check and handle error for virAsprintf() calls · 7ac12d84
      John Ferlan 提交于
      7ac12d84
    • J
      Check return on mkdir for LOCKSPACE_DIR · 0c6e95fe
      John Ferlan 提交于
      0c6e95fe
    • J
      vmware: silence Coverity warning · 0527d6bd
      John Ferlan 提交于
      Ignore the return status check for vmwareUpdateVMStatus in convenience
      routine vmwareDomainObjListUpdateDomain
      0527d6bd
  2. 04 1月, 2013 6 次提交
  3. 03 1月, 2013 3 次提交
    • M
      qemu: Don't parse log output when starting up a domain · b3f2b4ca
      Michal Privoznik 提交于
      Despite our great effort we still parsed qemu log output.
      We wouldn't notice unless upcoming qemu 1.4 changed the
      format of the logs slightly. Anyway, now we should gather
      all interesting knobs like pty paths from monitor. Moreover,
      since for historical reasons the first console can be just
      an alias to the first serial port, we need to check this and
      copy the pty path if that's the case to the first console.
      b3f2b4ca
    • E
      build: use autobuild module to make build logs nicer · 83aca30f
      Eric Blake 提交于
      A recent build failure made me realize that we could usefully add
      a bit more information to configure output, for aid in analysis of
      failed builds.  Pulling in the autobuild module merely adds these
      four lines to configure output:
      
      configure: autobuild project... libvirt
      configure: autobuild revision... v1.0.1-113-g7a74eeaf
      configure: autobuild hostname... myhost
      configure: autobuild timestamp... 20130102T233543Z
      
      which can be useful even if not using the Autobuild project to parse
      build logs.
      
      * bootstrap.conf (gnulib_modules): Add autobuild.
      * configure.ac: Favor git version over release version, when available.
      83aca30f
    • E
      maint: update to latest gnulib · 7a74eeaf
      Eric Blake 提交于
      'make syntax-check' warned that gnulib's copyright is now out of date.
      
      * .gnulib: Update to latest, for copyright year bump.
      * gnulib/local/m4/ssize_t.m4.diff: Regenerate.
      * bootstrap: Synchronize from upstream.
      7a74eeaf
  4. 02 1月, 2013 3 次提交
  5. 30 12月, 2012 1 次提交
    • M
      qemu: Adapt to new log format · 28224c4d
      Michal Privoznik 提交于
      Since 586502189edf9fd0f89a83de96717a2ea826fdb0 qemu commit, the log
      lines reporting chardev's path has changed from:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device redirected to /dev/pts/5
      char device redirected to /dev/pts/6
      char device redirected to /dev/pts/7
      
      to:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device compat_monitor0 redirected to /dev/pts/5
      char device serial0 redirected to /dev/pts/6
      char device serial1 redirected to /dev/pts/7
      
      However, with current code we are not prepared for such change, which
      results in us being unable to start any domain.
      28224c4d
  6. 28 12月, 2012 2 次提交
    • M
      sanlock: Chown lease files as well · ce753ec5
      Michal Privoznik 提交于
      Since sanlock doesn't run under root:root, we have chown()'ed the
      __LIBVIRT__DISKS__ lease file to the user:group defined in the
      sanlock config. However, when writing the patch I've forgot about
      lease files for each disk (this is the
      /var/lib/libvirt/sanlock/<md5>) file.
      ce753ec5
    • M
      python: Adapt to virevent rename · e2d7e7c6
      Michal Privoznik 提交于
      With our recent renames under src/util/* we forgot to adapt
      python wrapper code generator. This results in some methods being
      not exposed:
      
      $ python examples/domain-events/events-python/event-test.py
      Using uri:qemu:///system
      Traceback (most recent call last):
        File "examples/domain-events/events-python/event-test.py", line 585, in <module>
          main()
        File "examples/domain-events/events-python/event-test.py", line 543, in main
          virEventLoopPureStart()
        File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
          virEventLoopPureRegister()
        File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
          libvirt.virEventRegisterImpl(virEventAddHandleImpl,
      AttributeError: 'module' object has no attribute 'virEventRegisterImpl'
      e2d7e7c6
  7. 24 12月, 2012 2 次提交
  8. 22 12月, 2012 3 次提交
    • V
      S390: Re-enable capability probing for virtio devices. · fec9822e
      Viktor Mihajlovski 提交于
      Since we switched to QMP probing, the object types are spelled out
      explicitly, i.e. virtio-net-pci. This has effectively disabled
      the capability detection of s390 virtio devices. The trivial fix
      is to add the s390 virtio types explicitly to qemuCapsObjectProps.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      fec9822e
    • L
      util: fix botched check for new netlink request filters · 7c366506
      Laine Stump 提交于
      This is an adjustment to the fix for
      
        https://bugzilla.redhat.com/show_bug.cgi?id=889319
      
      to account for two bonehead mistakes I made.
      
      commit ac2797cf attempted to fix a
      problem with netlink in newer kernels requiring an extra attribute
      with a filter flag set in order to receive an IFLA_VFINFO_LIST from
      netlink. Unfortunately, the #ifdef that protected against compiling it
      in on systems without the new flag went a bit too far, assuring that
      the new code would *never* be compiled, and even if it had, the code
      was incorrect.
      
      The first problem was that, while some IFLA_* enum values are also
      their existence at compile time, IFLA_EXT_MASK *isn't* #defined, so
      checking to see if it's #defined is not a valid method of determining
      whether or not to add the attribute. Fortunately, the flag that is
      being set (RTEXT_FILTER_VF) *is* #defined, and it is never present if
      IFLA_EXT_MASK isn't, so it's sufficient to just check for that flag.
      
      And to top it off, due to the code not actually compiling when I
      thought it did, I didn't realize that I'd been given the wrong arglist
      to nla_put() - you can't just send a const value to nla_put, you have
      to send it a pointer to memory containing what you want to add to the
      message, along with the length of that memory.
      
      This time I've actually sent the patch over to the other machine
      that's experiencing the problem, applied it to the branch being used
      (0.10.2) and verified that it works properly, i.e. it does fix the
      problem it's supposed to fix. :-/
      7c366506
    • E
      blockjob: fix memleak that prevented block pivot · 08230dbd
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=888426
      
      The code for doing a block-copy was supposed to track the destination
      file in drive->mirror, but was set up to do all mallocs prior to
      starting the copy so that OOM wouldn't leave things partially started.
      However, the wrong variable was being written; later in the code we
      silently did 'disk->mirror = mirror' which was still NULL, and thus
      leaking memory and leaving libvirt to think that the mirror job was
      never started, which prevented a pivot operation after a copy.
      Problem introduced in commit 35c7701c.
      
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Initialize correct
      variable.
      08230dbd
  9. 21 12月, 2012 6 次提交