1. 14 10月, 2011 18 次提交
  2. 13 10月, 2011 17 次提交
    • S
      Fix typo in lxc_controller · d60299c3
      Serge E. Hallyn 提交于
      s/Mouting/Mounting.
      Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com>
      d60299c3
    • E
      spec: mingw cleanups · df92bab4
      Eric Blake 提交于
      * libvirt.spec.in (%configure): Drop unused %{one} macro.
      * mingw32-libvirt.spec.in (%{rhel}): Compile ESX but not HyperV on
      mingw build for RHEL.
      (%build): Make configure honor spec conditionals.  Reorder to
      match libvirt.spec.
      * autobuild.sh (mingw): Update list to match.
      Suggested by Daniel P. Berrange.
      df92bab4
    • E
      build: update to latest gnulib · f65eda36
      Eric Blake 提交于
      358 changes; most probably have no impact on libvirt, but we
      might as well stay current.
      
      * .gnulib: Update to latest.
      f65eda36
    • M
      qemu: Check for domain being active on successful job acquire · 9bc9999b
      Michal Privoznik 提交于
      As this is needed. Although some functions check for domain
      being active before obtaining job, we need to check it after,
      because obtaining job unlocks domain object, during which
      a state of domain can be changed.
      9bc9999b
    • M
      events: Propose a separate lock for event queue · d81eee40
      Michal Privoznik 提交于
      Currently, push & pop from event queue (both server & client side)
      rely on lock from higher levels, e.g. on driver lock (qemu),
      private_data (remote), ...; This alone is not sufficient as not
      every function that interacts with this queue can/does lock,
      esp. in client where we have a different approach, "passing
      the buck".
      
      Therefore we need a separate lock just to protect event queue.
      
      For more info see:
      https://bugzilla.redhat.com/show_bug.cgi?id=743817
      d81eee40
    • M
      qemu: Implement VIR_DUMP_RESET · 2050b61d
      Michal Privoznik 提交于
      This patch extends qemudDomainCoreDump so it supports new VIR_DUMP_RESET
      flag. If this flag is set, domain is reset on successful dump. However,
      this is needed to be done after we start CPUs.
      2050b61d
    • M
      virDomainCoreDump: Introduce VIR_DUMP_RESET flag · 4dadfe59
      Michal Privoznik 提交于
      This flag is intended to allow user to do so called system reset
      after dump, instead of sending ACPI reboot event.
      4dadfe59
    • P
      example: Support debug output and loop switch · f319b553
      Philipp Hahn 提交于
      Add support for enabling debug output via command line option.
      Allow to toggle the loop implementation between pure-Python and
      native-C.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      f319b553
    • P
      example: Redirect --help output to stdout/stderr · 78adf509
      Philipp Hahn 提交于
      When --help is requested, print usage() to stdout.
      When an illegal option is passed, print usage to stderr.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      78adf509
    • P
      example: Fix argument handling · 08d56e24
      Philipp Hahn 提交于
      sys.argv contains the original command line arguments, while args only
      contains the arguments not handled by getopt(). Currently this is no
      problem since --help is the only command line option passable, which
      terminates the process, so the code is never reached. Any option added
      in the future will reveal the bug.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      08d56e24
    • E
      snapshot: implement LIST_LEAVES flag in qemu · 5cf56c4b
      Eric Blake 提交于
      With the recent refactoring of qemu snapshot relationships, it
      is now trivial to filter on leaves.
      
      * src/conf/domain_conf.c (virDomainSnapshotObjListCount)
      (virDomainSnapshotObjListCopyNames): Handle new flag.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotListNames)
      (qemuDomainSnapshotNum, qemuDomainSnapshotListChildrenNames)
      (qemuDomainSnapshotNumChildren): Pass new flag through.
      5cf56c4b
    • E
      snapshot: add API for filtering by leaves · 8b6d1a20
      Eric Blake 提交于
      Counterpart to --roots.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_LIST_LEAVES):
      New flag.
      * src/libvirt.c (virDomainSnapshotNum, virDomainSnapshotListNames)
      (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): Document it.
      * tools/virsh.c (cmdSnapshotList): Expose it.
      * tools/virsh.pod (snapshot-list): Document --leaves.
      8b6d1a20
    • P
      xen: Return tap2 for tap2 disks · c490b469
      Philipp Hahn 提交于
      For some versions of Xen the difference between "tap" and "tap2" is
      important. When converting back from xen-sxpr to libvirt-xml, that
      information is lost, which breaks re-defining the domain using that
      data.
      
      Explicitly return "tap2" for disks defined as "device/tap2".
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      c490b469
    • P
      xen: fix PyGrub boot device order · c2969ec7
      Philipp Hahn 提交于
      When PyGrub is used as the bootloader in Xen, it gets passed the first
      bootable disk. Xend supports a "bootable"-flag for this, which isn't
      explicitly supported by libvirt.
      When converting libvirt-xml to xen-sxpr the "bootable"-flag gets
      implicitly set by xen.xend.XenConfig.device_add() for the first disk
      (marked as "Compat hack -- mark first disk bootable").
      When converting back xen-sxpr to libvirt-xml, the disks are returned in
      the internal order used by Xend ignoring the "bootable"-flag, which
      loses the original order. When the domain is then re-defined, the order
      of disks is changed, which breaks PyGrub, since a different disk gets
      passed.
      
      When converting xen-sxpr to libvirt-xml, use the "bootable"-flag to
      determine the first disk.
      
      This isn't perfect, since several disks can be marked as bootable using
      the Xend-API, but that is not supported by libvirt. In all known cases
      relevant to libvirt exactly one disk is marked as bootable.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      c2969ec7
    • P
      tests: Add support for skipping tests · c58d778d
      Philipp Hahn 提交于
      AM_TESTS has support for skipping tests, while the C-implementation
      virtTestRun() does not support that feature.
      
      Print "_" or "SKIP" in verbose mode for tests returning EXIT_AM_SKIP=77.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      c58d778d
    • H
      Introduce <driver> under <filesystem> to support open-by-handle · da8127e6
      Harsh Prateek Bora 提交于
      VirtFS allows the user to choose between path/handle based fs driver.
      As of now, libvirt hardcoded path based driver only. This patch provides
      a solution to allow user to choose between path/handle based fs driver.
      
      Sample:
      
          <filesystem type='mount'>
            <driver type='handle'/>
            <source dir='/folder/to/share1'/>
            <target dir='mount_tag1'/>
          </filesystem>
      
          <filesystem type='mount'>
            <driver type='path'/>
            <source dir='/folder/to/share2'/>
            <target dir='mount_tag2'/>
          </filesystem>
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      da8127e6
    • S
      buf: implement generic virBufferEscape · 7f197559
      Sage Weil 提交于
      Implement a generic helper to escape a given set of characters with a
      leading '\'.  Generalizes virBufferEscapeSexpr().
      Signed-off-by: NSage Weil <sage@newdream.net>
      7f197559
  3. 12 10月, 2011 5 次提交
    • O
      daemon: Always advertise libvirtd service · 33b55fd8
      Osier Yang 提交于
      This is a regression introduced by new RPC codes, previously
      we advertise the service via ssh even if the daemon doesn't
      listen on TLS port (TCP is not choosed). Now the service is
      only advertised when it listens on TLS or TCP port. This breaks
      upper layer apps which intends to discover the service, such
      as virt-manager.
      33b55fd8
    • E
      snapshot: drop dead parameters · ebec21ee
      Eric Blake 提交于
      The previous optimizations lead to some follow-on cleanups.
      
      * src/conf/domain_conf.c (virDomainSnapshotForEachChild)
      (virDomainSnapshotForEachDescendant): Drop dead parameter.
      (virDomainSnapshotActOnDescendant)
      (virDomainSnapshotObjListNumFrom)
      (virDomainSnapshotObjListGetNamesFrom): Update callers.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotNumChildren)
      (qemuDomainSnapshotListChildrenNames, qemuDomainSnapshotDelete):
      Likewise.
      * src/conf/domain_conf.h: Update prototypes.
      ebec21ee
    • E
      snapshot: take advantage of new relations · 35abced2
      Eric Blake 提交于
      Among other improvements, virDomainSnapshotForEachDescendant is
      changed from iterative O(n^2) to recursive O(n).  A bit better
      than the O(n^3) implementation in virsh snapshot-list!
      
      * src/conf/domain_conf.c (virDomainSnapshotObjListNum)
      (virDomainSnapshotObjListNumFrom)
      (virDomainSnapshotObjeListGetNames, virDomainSnapshotForEachChild)
      (virDomainSnapshotForEachDescendant): Optimize.
      (virDomainSnapshotActOnDescendant): Tweak.
      (virDomainSnapshotActOnChild, virDomainSnapshotMarkDescendant):
      Delete, now that they are unused.
      35abced2
    • E
      snapshot: track qemu snapshot relations · 9279bdf7
      Eric Blake 提交于
      Maintain the parent/child relationships of all qemu snapshots.
      
      * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Populate
      relationships after loading.
      (qemuDomainSnapshotCreateXML): Set relations on creation; tweak
      redefinition to reuse existing object.
      (qemuDomainSnapshotReparentChildren, qemuDomainSnapshotDelete):
      Clear relations on delete.
      9279bdf7
    • E
      snapshot: framework for more efficient relation traversal · 7ec6f7bd
      Eric Blake 提交于
      No one was using virDomainSnapshotHasChildren, but that was an
      O(n) function.  Exposing and tracking a bit more metadata for each
      snapshot will allow the same query to be made with an O(1) query
      of the member field.  For single snapshot operations (create,
      delete), callers can be trusted to maintain the metadata themselves,
      but for reloading, we can't compute parents as we go since there
      is no guarantee that parents were parsed before children, so we also
      provide a function to refresh the relationships, and which can
      be used to detect if the user has ignored our warnings and been
      directly modifying files in /var/lib/libvirt/qemu/snapshot.  This
      patch only adds metadata; later patches will actually use it.
      
      This layout intentionally hardcodes the size of each snapshot struct,
      by tracking sibling pointers, rather than having to deal with the
      headache of yet more memory management by directly sticking a
      dynamically sized child[] on each parent.
      
      * src/conf/domain_conf.h (_virDomainSnapshotObj)
      (_virDomainSnapshotObjList): Add members.
      (virDomainSnapshotUpdateRelations, virDomainSnapshotDropParent):
      New prototypes.
      (virDomainSnapshotHasChildren): Delete.
      * src/conf/domain_conf.c (virDomainSnapshotSetRelations)
      (virDomainSnapshotUpdateRelations, virDomainSnapshotDropParent):
      New functions.
      (virDomainSnapshotHasChildren): Drop unused function.
      * src/libvirt_private.syms (domain_conf): Update exports.
      7ec6f7bd