You need to sign in or sign up before continuing.
  1. 24 4月, 2013 1 次提交
  2. 16 4月, 2013 1 次提交
  3. 15 4月, 2013 1 次提交
  4. 09 4月, 2013 1 次提交
  5. 05 4月, 2013 2 次提交
    • P
      rpc: Fix connection close callback race condition and memory corruption/crash · 8ad126e6
      Peter Krempa 提交于
      The last Viktor's effort to fix the race and memory corruption unfortunately
      wasn't complete in the case the close callback was not registered in an
      connection. At that time, the trail of event's that I'll describe later could
      still happen and corrupt the memory or cause a crash of the client (including
      the daemon in case of a p2p migration).
      
      Consider the following prerequisities and trail of events:
      Let's have a remote connection to a hypervisor that doesn't have a close
      callback registered and the client is using the event loop. The crash happens in
      cooperation of 2 threads. Thread E is the event loop and thread W is the worker
      that does some stuff. R denotes the remote client.
      
      1.) W - The client finishes everything and sheds the last reference on the client
      2.) W - The virObject stuff invokes virConnectDispose that invokes doRemoteClose
      3.) W - the remote close method invokes the REMOTE_PROC_CLOSE RPC method.
      4.) W - The thread is preempted at this point.
      5.) R - The remote side receives the close and closes the socket.
      6.) E - poll() wakes up due to the closed socket and invokes the close callback
      7.) E - The event loop is preempted right before remoteClientCloseFunc is called
      8.) W - The worker now finishes, and frees the conn object.
      9.) E - The remoteClientCloseFunc accesses the now-freed conn object in the
              attempt to retrieve pointer for the real close callback.
      10.) Kaboom, corrupted memory/segfault.
      
      This patch tries to fix this by introducing a new object that survives the
      freeing of the connection object. We can't increase the reference count on the
      connection object itself or the connection would never be closed, as the
      connection is closed only when the reference count reaches zero.
      
      The new object - virConnectCloseCallbackData - is a lockable object that keeps
      the pointers to the real user registered callback and ensures that the
      connection callback is either not called if the connection was already freed or
      that the connection isn't freed while this is being called.
      8ad126e6
    • V
      libvirt: Increase connection reference count for callbacks · 03a43efa
      Viktor Mihajlovski 提交于
      By adjusting the reference count of the connection object we
      prevent races between callback function and virConnectClose.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      03a43efa
  6. 26 3月, 2013 1 次提交
    • M
      Fix virConnectOpen.*() name requirements · d8ed386c
      Martin Kletzander 提交于
      virConnectOpenAuth didn't require 'name' to be specified (VIR_DEBUG
      used NULLSTR() for the output) and by default, if name == NULL, the
      default connection uri is used.  This was not indicated in the
      documentation and wasn't checked for in other API's VIR_DEBUG outputs.
      d8ed386c
  7. 25 3月, 2013 1 次提交
  8. 05 3月, 2013 1 次提交
    • J
      libvirt: Update headers for doc · f7e74294
      John Ferlan 提交于
      Update the function prototypes to include a message about the client needing
      to free() returned name fields.  Fix the all domains example flags values.
      f7e74294
  9. 27 2月, 2013 2 次提交
  10. 26 2月, 2013 1 次提交
  11. 23 2月, 2013 2 次提交
  12. 12 2月, 2013 1 次提交
    • O
      Introduce API virNodeDeviceLookupSCSIHostByWWN · efed366e
      Osier Yang 提交于
      Since the name (like scsi_host10) is not stable for vHBA, (it can
      be changed either after recreating or system rebooting), current
      API virNodeDeviceLookupByName is not nice to use for management app
      in this case. (E.g. one wants to destroy the vHBA whose name has
      been changed after system rebooting, he has to find out current
      name first).
      
      Later patches will support the persistent vHBA via storage pool,
      with which one can identify the vHBA stably by the wwnn && wwpn
      pair.
      
      So this new API comes.
      efed366e
  13. 25 1月, 2013 1 次提交
    • J
      python: Fix bindings for virDomainSnapshotGet{Domain,Connect} · 7b35fd71
      Jiri Denemark 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=895882
      
      virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect()
      wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed
      to be ever implemented. The class should contain proper domain() and
      connect() accessors that fetch python objects stored internally within
      the class. While domain() was already provided, connect() was missing.
      
      This patch adds connect() method to virDomainSnapshot class and
      reimplements getDomain() and getConnect() methods as aliases to domain()
      and connect() for backward compatibility.
      7b35fd71
  14. 17 1月, 2013 1 次提交
  15. 14 1月, 2013 2 次提交
  16. 09 1月, 2013 1 次提交
  17. 08 1月, 2013 1 次提交
  18. 05 1月, 2013 1 次提交
    • 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
  19. 21 12月, 2012 7 次提交
  20. 11 12月, 2012 1 次提交
    • L
      Add support for offline migration · 8b9bf787
      liguang 提交于
      Offline migration transfers inactive definition of a domain (which may
      or may not be active). After successful completion, the domain remains
      in its current state on source host and is defined but inactive on
      destination host. It's a bit more clever than virDomainGetXMLDesc() on
      source host followed by virDomainDefineXML() on destination host, as
      offline migration will run pre-migration hook to update the domain XML
      on destination host. Currently, copying non-shared storage is not
      supported during offline migration.
      
      Offline migration can be requested with a new migration flag called
      VIR_MIGRATE_OFFLINE (which has to be combined with
      VIR_MIGRATE_PERSIST_DEST flag).
      8b9bf787
  21. 07 12月, 2012 1 次提交
    • J
      storage: allow metadata preallocation when creating qcow2 images · 1c9a2fb1
      Ján Tomko 提交于
      Add VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA flag to virStorageVolCreateXML
      and virStorageVolCreateXMLFrom. This flag requests metadata
      preallocation when creating/cloning qcow2 images, resulting in creating
      a sparse file with qcow2 metadata. It has only slightly larger disk usage
      compared to new image with no allocation, but offers higher performance.
      1c9a2fb1
  22. 04 12月, 2012 1 次提交
  23. 03 12月, 2012 1 次提交
  24. 01 12月, 2012 4 次提交
  25. 30 11月, 2012 2 次提交
  26. 29 11月, 2012 1 次提交
    • D
      Add virDomainSendProcessSignal API · 46c329bc
      Daniel P. Berrange 提交于
      Add an API for sending signals to arbitrary processes in the
      guest OS. This is primarily useful for container based virt,
      but can be used for machine virt too, if there is a suitable
      guest agent,
      
      * include/libvirt/libvirt.h.in: Add virDomainSendProcessSignal
        and virDomainProcessSignal enum
      * src/driver.h: Driver entry point
      * src/libvirt.c, src/libvirt_public.syms: Impl for new API
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      46c329bc