1. 08 6月, 2011 5 次提交
  2. 07 6月, 2011 7 次提交
    • C
      util: Implement virRun as a wrapper around virCommand · 3c269b51
      Cole Robinson 提交于
      v2:
          Simplify command building
          Handle command building failure
      
      v3:
          Remove unneeded NULL check
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      3c269b51
    • C
      util: Remove unused virExec wrapper · d886ed95
      Cole Robinson 提交于
      v3:
          Remove obsolete comment
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      d886ed95
    • C
      qemu: Convert virExec usage to virCommand · 1ba75cf9
      Cole Robinson 提交于
      v2:
          Have virCommand cleanup intermediate process for us
      
      v3:
          Preserve original FD closing behavior
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      1ba75cf9
    • M
      esx: Remove duplicated invalid-argument checks · 0068b58c
      Matthias Bolte 提交于
      Those checks are already performed at the public API level.
      0068b58c
    • O
      docs: Add doc for video element · 99c8a5c8
      Osier Yang 提交于
      For backwards compatibility, if no <video> is set but there is a
      <graphics> tag, then we add a default <video> according to the
      guest type. Add docs to tell the user about this to not make
      them confused. Especially if they remove the video (such as via
      "virsh edit"), it will be surprised for them to see the video
      element is still in domain XML.
      99c8a5c8
    • O
      Use VIR_USE_CPU instead of new wheel · ebf6b11a
      Osier Yang 提交于
      ebf6b11a
    • M
      Avoid virGetVersion failure on specific driver support configurations · b10bca09
      Matthias Bolte 提交于
      virGetVersion itself doesn't take a virConnectPtr, but in order to obtain
      the hypervisor version against which libvirt was compiled it is used in
      combination with virConnectGetType like this:
      
      hvType = virConnectGetType(conn)
      virGetVersion(&libVer, hvType, &typeVer)
      
      When virConnectGetType is called on a remote connection then the remote
      driver returns the type of the underlying driver on the server side, for
      example QEMU. Then virGetVersion compares hvType to a set of strings that
      depend on configure options and returns LIBVIR_VERSION_NUMBER in most
      cases. Now this fails in case libvirt on the client side is just compiled
      with the remote driver enabled only and the server side has the actual
      driver such as the QEMU driver. It just happens to work when the actual
      driver is enabled on client and server side. But that's not always true.
      I noticed this on FreeBSD:
      
      freebsd# virsh -c qemu+tcp://192.168.178.22/system version
      Compiled against library: libvir 0.9.2
      error: failed to get the library version
      error: this function is not supported by the connection driver: virGetVersion
      
      This is not FreeBSD specific, happens on Windows as well due to the
      similar driver support configuration. The problem is that virConnectGetType
      returns QEMU, but virGetVersion on the client side only accepts Remote
      as hvType due to all other drivers being disabled on the client side.
      
      Daniel P. Berrange suggested to get rid of all the conditional code in
      virGetVersion, ignoring the hvType and always setting typeVer to
      LIBVIR_VERSION_NUMBER. virConnectGetVersion is supposed to be used to
      obtain the hypervisor version.
      b10bca09
  3. 06 6月, 2011 4 次提交
  4. 05 6月, 2011 1 次提交
  5. 04 6月, 2011 7 次提交
    • D
      Don't raise an error if the migration cookie is NULL · a50f5f6f
      Daniel P. Berrange 提交于
      The v2 migration protocol doesn't use cookies, so we should not
      be raising an error if the cookie parameters are NULL.
      
      * src/qemu/qemu_migration.c: Don't raise error if cookie is NULL
      a50f5f6f
    • D
      Fix check of virKillProcess return status · a018c0b9
      Daniel P. Berrange 提交于
      The error code for virKillProcess is returned in the errno variable
      not the return value. THis mistake caused the logs to be filled with
      errors when shutting down QEMU processes
      
      * src/qemu/qemu_process.c: Fix process kill check.
      a018c0b9
    • M
      vbox: Fix version extraction on Windows for newer VirtualBox versions · eb2664cb
      Matthias Bolte 提交于
      VirtualBox 4.0.8 changed the registry key layout. Before the version
      number was in a Version key. Now the Version key contains %VER% and
      the actual version number is in VersionExt now.
      
      Move value lookup code into its own function: vboxLookupRegistryValue.
      eb2664cb
    • E
      API: consolidate common unreleased enums · 33d90baf
      Eric Blake 提交于
      This commit is safe precisely because there has been no release
      for any of the enum values being deleted (they were added post-0.9.1).
      
      After the 0.9.2 release, we can then take advantage of
      virDomainModificationImpact in more places.
      
      * include/libvirt/libvirt.h.in (virDomainModificationImpact): New
      enum.
      (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since
      these were never released, and the new enum works fine here.
      * src/libvirt.c	(virDomainGetMemoryParameters)
      (virDomainSetMemoryParameters)
      (virDomainGetSchedulerParametersFlags)
      (virDomainSetSchedulerParametersFlags): Update documentation.
      * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters)
      (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags)
      (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags)
      (qemuGetSchedulerParameters): Adjust clients.
      * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise.
      Based on ideas by Daniel Veillard and Hu Tao.
      33d90baf
    • J
      qemu: Avoid use after free in qemuCaps parsing · aeed51f7
      Jiri Denemark 提交于
      aeed51f7
    • J
      virsh: Document nodeinfo output · 4e3a1c30
      Jiri Denemark 提交于
      4e3a1c30
    • L
      security driver: ignore EINVAL when chowning an image file · 62ed801c
      Laine Stump 提交于
      This fixes:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=702044
        https://bugzilla.redhat.com/show_bug.cgi?id=709454
      
      Both of these complain of a failure to use an image file that resides
      on a read-only NFS volume. The function in the DAC security driver
      that chowns image files to the qemu user:group before using them
      already has special cases to ignore failure of chown on read-only file
      systems, and in a few other cases, but it hadn't been checking for
      EINVAL, which is what is returned if the qemu user doesn't even exist
      on the NFS server.
      
      Since the explanation of EINVAL in the chown man page almost exactly
      matches the log message already present for the case of EOPNOTSUPP,
      I've just added EINVAL to that same conditional.
      62ed801c
  6. 03 6月, 2011 16 次提交
    • M
      Make dlopen usage in lock manager conditional · 6b5c589d
      Matthias Bolte 提交于
      This fixes a build failure on MinGW, due to MinGW not supporting dlopen.
      6b5c589d
    • N
      Correct 'cputune' documentation example. · 5b8d2e6d
      Neil Wilson 提交于
      Signed-off-by: NNeil Wilson <neil@aldur.co.uk>
      5b8d2e6d
    • E
      build: silence coverity false positive · 32ce66f5
      Eric Blake 提交于
      Coverity couldn't see that priv is NULL on failure.  But on failure,
      we might as well guarantee that callers don't try to free uninitialized
      memory.
      
      * src/remote/remote_driver.c (remoteGenericOpen): Even on failure,
      pass priv back to caller.
      32ce66f5
    • E
      build: silence coverity false positive · 89e651fa
      Eric Blake 提交于
      Coverity complained that infd could be -1 at the point where it is
      passed to write, when in reality, this code can only be reached if
      infd is non-negative.
      
      * src/util/command.c (virCommandProcessIO): Help out coverity.
      89e651fa
    • E
      migrate: detect xml incompatibility · d391661a
      Eric Blake 提交于
      Detected by Coverity.  Bug introduced in 08106e20 (unreleased).
      
      * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability):
      Use correct sizeof operand.
      d391661a
    • E
      event: avoid memory leak on cleanup · 278a050a
      Eric Blake 提交于
      Detected by Coverity.  Introduced in commit aaf2b70b, and turned into
      a regression in the next few commits through 4e6e6672 (unreleased).
      
      * src/conf/domain_event.c (virDomainEventStateFree): Free object,
      per documentation.
      278a050a
    • E
      qemu: avoid memory leak on vcpupin · 2834d571
      Eric Blake 提交于
      Detected by Coverity.  This leaked a cpumap on every iteration
      of the loop.  Leak introduced in commit 1cc4d025 (v0.9.0).
      
      * src/qemu/qemu_process.c (qemuProcessSetVcpuAffinites): Plug
      leak, and hoist allocation outside loop.
      2834d571
    • E
      remote: avoid leak on failure · c0e65ae5
      Eric Blake 提交于
      Detected by Coverity.  Only possible in OOM situations.
      
      * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.
      c0e65ae5
    • E
      lock: avoid leak on failure · 0a41733c
      Eric Blake 提交于
      Detected by Coverity.  Only possible on OOM situations.
      
      * src/locking/lock_manager.c (virLockManagerPluginNew): Plug leak.
      0a41733c
    • E
      storage: avoid memory leak on stat failure · f515bab7
      Eric Blake 提交于
      Spotted by coverity.  Triggers on failed stat, although I'm not sure
      how easy that condition is, so I'm not sure if this is a runtime
      memory hog.  Regression introduced in commit 8077d64f (unreleased).
      
      * src/util/storage_file.c (virStorageFileGetMetadataFromFD):
      Reduce need for malloc, avoiding a leak.
      f515bab7
    • E
      storage: avoid memory leak · 9892f7bc
      Eric Blake 提交于
      Coverity detected that options was being set by strdup but never
      freed.  But why even bother with an options variable?  The options
      parameter never changes!  Leak present since commit 44948f5b (0.7.0).
      
      This function could probably be rewritten to take better advantage
      of virCommand, but that is more invasive.
      
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemMount): Avoid wasted strdup, and
      guarantee proper cleanup on all paths.
      9892f7bc
    • E
      libvirtd: avoid leak on failure · ef21beda
      Eric Blake 提交于
      Spotted by Coverity.  Only possible on an OOM condition, so
      unlikely to bite in the wild.
      
      * daemon/libvirtd.c (qemudSetLogging): Don't leak memory.
      ef21beda
    • E
      command: avoid leak on failure · bb889529
      Eric Blake 提交于
      Detected by Coverity.  While it is possible on OOM condition, as
      well as with bad code that passes binary == NULL, it is unlikely
      to be encountered in the wild.
      
      * src/util/command.c (virCommandNewArgList): Don't leak memory.
      bb889529
    • D
      Explicitly set VM state to paused after migration completes · 6d68e0df
      Daniel P. Berrange 提交于
      In v3 migration, once migration is completed, the VM needs
      to be left in a paused state until after Finish3 has been
      executed on the target. Only then will the VM be killed
      off. When using non-JSON QEMU monitor though, we don't
      receive any 'STOP' event from QEMU, so we need to manually
      set our state offline & thus release lock manager leases.
      It doesn't hurt to run this on the JSON case too, just in
      case the event gets lost somehow
      
      * src/qemu/qemu_migration.c: Explicitly set VM state to
        paused when migration completes
      6d68e0df
    • D
      Fix regressions BlockStats/Info APIs in QEMU driver · 2027e184
      Daniel P. Berrange 提交于
      The change 18c2a592 caused
      some regressions in behaviour of virDomainBlockStats
      and virDomainBlockInfo in the QEMU driver.
      
      The virDomainBlockInfo API stopped working for inactive
      guests if querying a block device.
      
      The virDomainBlockStats API did not promptly report
      an error if the guest was not running in some cases.
      
      * src/qemu/qemu_driver.c: Fix inactive guest handling
        in BlockStats/Info APIs
      2027e184
    • J
      Fix minor issues in libxenlight managed save · 9a76e737
      Jim Fehlig 提交于
      There were a few minor issues in commit 5b6c961e
      - leak managed save path
      - leak managed save fd
      - functions that open an fd should also close it
      9a76e737