1. 21 5月, 2010 6 次提交
  2. 20 5月, 2010 5 次提交
  3. 19 5月, 2010 5 次提交
    • J
      initialize "meta" in virStorageFileGetMetadata, not in each caller · dcf30d9c
      Jim Meyering 提交于
      Do not require each caller of virStorageFileGetMetadata and
      virStorageFileGetMetadataFromFD to first clear the storage of the
      "meta" buffer.  Instead, initialize that storage in
      virStorageFileGetMetadataFromFD.
      * src/util/storage_file.c (virStorageFileGetMetadataFromFD): Clear
      "meta" here, not before each of the following callers.
      * src/qemu/qemu_driver.c (qemuSetupDiskCgroup): Don't clear "meta" here.
      (qemuTeardownDiskCgroup): Likewise.
      * src/qemu/qemu_security_dac.c (qemuSecurityDACSetSecurityImageLabel):
      Likewise.
      * src/security/security_selinux.c (SELinuxSetSecurityImageLabel):
      Likewise.
      * src/security/virt-aa-helper.c (get_files): Likewise.
      dcf30d9c
    • J
      (qemu*DiskCgroup): avoid dead code · e638a246
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemuTeardownDiskCgroup): Remove
      bogus empty-body while-loop.
      (qemuSetupDiskCgroup): Likewise.
      e638a246
    • J
      maint: don't mark VIR_WARN or VIR_WARN0 diagnostics for translation · c5a2fe24
      Jim Meyering 提交于
      Approximately 60 messages were marked.  Since these diagnostics are
      intended solely for developers and maintainers, encouraging translation
      is deemed to be counterproductive:
      http://thread.gmane.org/gmane.comp.emulators.libvirt/25050/focus=25052
      
      Run this command:
        git grep -l VIR_WARN|xargs perl -pi -e \
          's/(VIR_WARN0?)\s*\(_\((".*?")\)/$1($2/'
      c5a2fe24
    • J
      do not ignore qemuMonitorAddDrive failure; make uses identical · 49ed0a2e
      Jim Meyering 提交于
      There were three very similar uses of qemuMonitorAddDrive.
      This change makes the three 17-line sequences identical.
      * src/qemu/qemu_driver.c (qemudDomainAttachPciDiskDevice): Detect
      failure.  Add VIR_WARN and braces.
      (qemudDomainAttachSCSIDisk): Add VIR_WARN and braces.
      (qemudDomainAttachUsbMassstorageDevice): Likewise.
      49ed0a2e
    • J
      qemudDomainRestore: handle a case of virDomainSaveStatus failure · 11eeabd7
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainRestore): Don't ignore
      virDomainSaveStatus failure.
      11eeabd7
  4. 18 5月, 2010 3 次提交
    • D
      Fix multiple potential NULL pointer references in monitor usage · c4b2a939
      Daniel P. Berrange 提交于
      Any method which intends to invoke a monitor command must have
      a check for virDomainObjIsActive() before using the monitor to
      ensure that priv->mon != NULL.
      
      There is one subtle edge case in this though. If a method invokes
      multiple monitor commands, and calls qemuDomainObjExitMonitor()
      in between two of these commands then there is no guarentee that
      priv->mon != NULL anymore. This is because the QEMU process may
      exit or die at any time, and because qemuDomainObjEnterMonitor()
      releases the lock on virDomainObj, it is possible for the background
      thread to close the monitor handle and thus qemuDomainObjExitMonitor
      will release the last reference allowing priv->mon to become NULL.
      
      This affects several methods, most notably migration but also some
      hotplug methods. This patch takes a variety of approaches to solve
      the problem, depending on the particular usage scenario. Generally
      though it suffices to add an extra virDomainObjIsActive() check
      if qemuDomainObjExitMonitor() was called during the method.
      
      * src/qemu/qemu_driver.c: Fix multiple potential NULL pointer flaws
        in usage of the monitor
      c4b2a939
    • J
      qemudDomainSetVcpus: avoid NULL-deref on failed uuid look-up · 20701b17
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainSetVcpus): Upon look-up failure,
      i.e., vm==NULL, goto cleanup, rather than to "endjob", superficially
      since the latter would dereference vm, but more fundamentally because
      we certainly don't want to call qemuDomainObjEndJob before we've
      even attempted qemuDomainObjBeginJob.
      20701b17
    • C
      qemu: Clarify a couple error messages · 07c621d0
      Cole Robinson 提交于
      A fedora translator filed:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=580816
      
      Pointing out these two error messages as unclear: "write save" sounds
      like a typo without context, and lack of a colon made the second message
      difficult to parse.
      07c621d0
  5. 17 5月, 2010 4 次提交
  6. 15 5月, 2010 3 次提交
  7. 14 5月, 2010 3 次提交
    • D
      Don't reset user/group/security label on shared filesystems during migrate · 02ddaddf
      Daniel P. Berrange 提交于
      When QEMU runs with its disk on NFS, and as a non-root user, the
      disk is chownd to that non-root user. When migration completes
      the last step is shutting down the QEMU on the source host. THis
      normally resets user/group/security label. This is bad when the
      VM was just migrated because the file is still in use on the dest
      host. It is thus neccessary to skip the reset step for any files
      found to be on a shared filesystem
      
      * src/libvirt_private.syms: Export virStorageFileIsSharedFS
      * src/util/storage_file.c, src/util/storage_file.h: Add a new
        method virStorageFileIsSharedFS() to determine if a file is
        on a shared filesystem (NFS, GFS, OCFS2, etc)
      * src/qemu/qemu_driver.c: Tell security driver not to reset
        disk labels on migration completion
      * src/qemu/qemu_security_dac.c, src/qemu/qemu_security_stacked.c,
        src/security/security_selinux.c, src/security/security_driver.h,
        src/security/security_apparmor.c: Add ability to skip disk
        restore step for files on shared filesystems.
      02ddaddf
    • D
      Fix handling of disk backing stores with cgroups · 117d04fb
      Daniel P. Berrange 提交于
      The cgroups ACL code was only allowing the primary disk image.
      It is possible to chain images together, so we need to search
      for backing stores and add them to the ACL too. Since the ACL
      only handles block devices, we ignore the EINVAL we get from
      plain files. In addition it was missing code to teardown the
      cgroup when hot-unplugging a disk
      
      * src/qemu/qemu_driver.c: Allow backing stores in cgroup ACLs
        and add missing teardown code in unplug path
      117d04fb
    • D
      Add support for NIC hotplug using netdev_add in QEMU · ff45b4c2
      Daniel P. Berrange 提交于
      QEMU is gaining a new monitor command netdev_add for hotplugging
      NICs using the netdev backend code. We already support this on
      the command this, though it is disabled. This adds support for
      hotplug too, also to remain disabled until 0.13 QEMU is released
      
      * src/qemu/qemu_driver.c: Support netdev hotplug for NICs
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
        src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
        support for netdev_add and netdev_remove commands
      ff45b4c2
  8. 07 5月, 2010 5 次提交
  9. 05 5月, 2010 1 次提交
    • K
      qemu: live migration with non-shared storage for kvm · b0a3f8b6
      Kenneth Nagin 提交于
      Support for live migration between hosts that do not share storage was
      added to qemu-kvm release 0.12.1.
      It supports two flags:
      -b migration without shared storage with full disk copy
      -i migration without shared storage with incremental copy (same base image
      shared between source and destination).
      
      I tested the live migration without shared storage (both flags) for native
      and p2p with and without tunnelling.  I also verified that the fix doesn't
      affect normal migration with shared storage.
      b0a3f8b6
  10. 04 5月, 2010 1 次提交
    • E
      build: prefer WIN32 over __MINGW32__ checks · 9f87b631
      Eric Blake 提交于
      WIN32 is always defined when __MINGW32__ is defined, but the
      converse is not true.  WIN32 is more generic, if someone were
      to ever attempt porting to a microsoft compiler.  This does
      not affect Cygwin, which intentionally does not define WIN32.
      
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Use more
      generic flag macro.
      * src/storage/storage_backend.c
      (virStorageBackendUpdateVolTargetInfoFD)
      (virStorageBackendRunProgRegex): Likewise.
      * tools/console.h (vshRunConsole): Likewise.
      9f87b631
  11. 30 4月, 2010 4 次提交
    • D
      Add support for another explicit IO error event · 34dcbbb4
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
      
      This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
      event, but also includes a string describing the cause of
      the event.
      
      Thus there is a new callback definition for this event type
      
      typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
                                                                 virDomainPtr dom,
                                                                 const char *srcPath,
                                                                 const char *devAlias,
                                                                 int action,
                                                                 const char *reason,
                                                                 void *opaque);
      
      This is currently wired up to the QEMU block IO error events
      
      * daemon/remote.c: Dispatch IO error events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        IO error events
      * include/libvirt/libvirt.h.in: Define new IO error event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle IO error events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block IO errors and emit a libvirt IO error event
      * src/remote/remote_driver.c: Receive and dispatch IO error
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        IO error events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
        from QEMU monitor
      34dcbbb4
    • J
      qemudDomainSaveFlag: remove dead store · 5b0aed68
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Remove dead store to "rc".
      5b0aed68
    • D
      Fix detection of disk in IO events · 0eecdd68
      Daniel P. Berrange 提交于
      When using -device syntax, the IO event will have a different
      prefix, 'drive-' that needs to be skipped over before matching
      against the libvirt disk alias
      
      * src/qemu/qemu_driver.c: Skip QEMU_DRIVE_HOST_PREFIX in IO event
      0eecdd68
    • D
      Implement virDomainGetBlockInfo in QEMU driver · db57a7be
      Daniel P. Berrange 提交于
      * src/qemu/qemu_driver.c: Implementation of virDomainGetBlockInfo
      * src/util/storage_file.h: Add DEV_BSIZE
      * src/storage/storage_backend.c: Remove DEV_BSIZE
      db57a7be