1. 30 1月, 2013 1 次提交
  2. 22 1月, 2013 2 次提交
  3. 14 1月, 2013 3 次提交
    • D
      Introduce an LXC specific public API & library · 3d1596b0
      Daniel P. Berrange 提交于
      This patch introduces support for LXC specific public APIs. In
      common with what was done for QEMU, this creates a libvirt_lxc.so
      library and libvirt/libvirt-lxc.h header file.
      
      The actual APIs are
      
        int virDomainLxcOpenNamespace(virDomainPtr domain,
                                      int **fdlist,
                                      unsigned int flags);
      
        int virDomainLxcEnterNamespace(virDomainPtr domain,
                                       unsigned int nfdlist,
                                       int *fdlist,
                                       unsigned int *noldfdlist,
                                       int **oldfdlist,
                                       unsigned int flags);
      
      which provide a way to use the setns() system call to move the
      calling process into the container's namespace. It is not
      practical to write in a generically applicable manner. The
      nearest that we could get to such an API would be an API which
      allows to pass a command + argv to be executed inside a
      container. Even if we had such a generic API, this LXC specific
      API is still useful, because it allows the caller to maintain
      the current process context, in particular any I/O streams they
      have open.
      
      NB the virDomainLxcEnterNamespace() API is special in that it
      runs client side, so does not involve the internal driver API.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3d1596b0
    • C
      docs: restrict the set of characters for info keys · bf1786b6
      Claudio Bley 提交于
      When parsing the top level comment of a file, apibuild.py used
      to split on any ':' character of a line regarding the first part
      as a key for a setting, e.g. "Summary". The second part would then
      be assigned as the value for that key.
      
      This means you could not use a ':' character inside those comments
      without ill effects.
      
      Now, a key must consist solely of alphanumeric characters, '_' or '.'.
      bf1786b6
    • C
      docs: simplify code · 833e1493
      Claudio Bley 提交于
      833e1493
  4. 08 1月, 2013 1 次提交
  5. 12 10月, 2012 1 次提交
  6. 18 9月, 2012 1 次提交
    • E
      blockjob: add virDomainBlockCommit · ef1e024d
      Eric Blake 提交于
      A block commit moves data in the opposite direction of block pull.
      Block pull reduces the chain length by dropping backing files after
      data has been pulled into the top overlay, and is always safe; block
      commit reduces the chain length by dropping overlays after data has
      been committed into the backing file, and any files that depended
      on base but not on top are invalidated at any point where they have
      unallocated data that is now pointing to changed contents in base.
      Both directions are useful, however: a qcow2 layer that is more than
      50% allocated will typically be faster with a pull operation, while
      a qcow2 layer with less than 50% allocation will be faster as a
      commit operation.  Committing across multiple layers can be more
      efficient than repeatedly committing one layer at a time, but
      requires extra support from the hypervisor.
      
      This API matches Jeff Cody's proposed qemu command 'block-commit':
      https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02226.html
      
      Jeff's command is still in the works for qemu 1.3, and may gain
      further enhancements, such as the ability to control on-error
      handling (it will be comparable to the error handling Paolo is
      adding to 'drive-mirror', so a similar solution will be needed
      when I finally propose virDomainBlockCopy with more functionality
      than the basics supported by virDomainBlockRebase).  However, even
      without qemu support, this API will be useful for _offline_ block
      commits, by wrapping qemu-img calls and turning them into a block
      job, so this API is worth committing now.
      
      For some examples of how this will be implemented, all starting
      with the chain: base <- snap1 <- snap2 <- active
      
      + These are equivalent:
       virDomainBlockCommit(dom, disk, NULL, NULL, 0, 0)
       virDomainBlockCommit(dom, disk, NULL, "active", 0, 0)
       virDomainBlockCommit(dom, disk, "base", NULL, 0, 0)
       virDomainBlockCommit(dom, disk, "base", "active", 0, 0)
      but cannot be implemented for online qemu with round 1 of
      Jeff's patches; and for offline images, it would require
      three back-to-back qemu-img invocations unless qemu-img
      is patched to allow more efficient multi-layer commits;
      the end result would be 'base' as the active disk with
      contents from all three other files, where 'snap1' and
      'snap2' are invalid right away, and 'active' is invalid
      once any further changes to 'base' are made.
      
      + These are equivalent:
       virDomainBlockCommit(dom, disk, "snap2", NULL, 0, 0)
       virDomainBlockCommit(dom, disk, NULL, NULL, 0, _SHALLOW)
      they cannot be implemented for online qemu, but for offline,
      it is a matter of 'qemu-img commit active', so that 'snap2'
      is now the active disk with contents formerly in 'active'.
      
      + Similarly:
       virDomainBlockCommit(dom, disk, "snap2", NULL, 0, _DELETE)
      for an offline domain will merge 'active' into 'snap2', then
      delete 'active' to avoid leaving a potentially invalid file
      around.
      
      + This version:
       virDomainBlockCommit(dom, disk, NULL, "snap2", 0, _SHALLOW)
      can be implemented online with 'block-commit' passing a base of
      snap1 and a top of snap2; and can be implemented offline by
      'qemu-img commit snap2' followed by 'qemu-img rebase -u
      -b snap1 active'
      
      * include/libvirt/libvirt.h.in (virDomainBlockCommit): New API.
      * src/libvirt.c (virDomainBlockCommit): Implement it.
      * src/libvirt_public.syms (LIBVIRT_0.10.2): Export it.
      * src/driver.h (virDrvDomainBlockCommit): New driver callback.
      * docs/apibuild.py (CParser.parseSignature): Add exception.
      ef1e024d
  7. 27 7月, 2012 1 次提交
  8. 24 5月, 2012 1 次提交
    • D
      Add parsing for VIR_ENUM_IMPL & VIR_ENUM_DECL in apibuild.py · 45b43a8c
      Daniel P. Berrange 提交于
      The apibuild.py parser needs to be able to parse & ignore
      any VIR_ENUM_IMPL/VIR_ENUM_DECL macros in the source. Add
      some special case code to deal with this rather than trying
      to figure out a generic syntax for parsing macros.
      
      * apibuild.py: Special case  VIR_ENUM_IMPL & VIR_ENUM_DECL
      45b43a8c
  9. 02 2月, 2012 1 次提交
    • E
      block rebase: add new API virDomainBlockRebase · 99fd69c3
      Eric Blake 提交于
      Qemu is adding the ability to do a partial rebase.  That is, given:
      
      base <- intermediate <- current
      
      virDomainBlockPull will produce:
      
      current
      
      but qemu now has the ability to leave base in the chain, to produce:
      
      base <- current
      
      Note that current qemu can only do a forward merge, and only with
      the current image as the destination, which is fully described by
      this API without flags.  But in the future, it may be possible to
      enhance this API for additional scenarios by using flags:
      
      Merging the current image back into a previous image (that is,
      undoing a live snapshot), could be done by passing base as the
      destination and flags with a bit requesting a backward merge.
      
      Merging any other part of the image chain, whether forwards (the
      backing image contents are pulled into the newer file) or backwards
      (the deltas recorded in the newer file are merged back into the
      backing file), could also be done by passing a new flag that says
      that base should be treated as an XML snippet rather than an
      absolute path name, where the XML could then supply the additional
      instructions of which part of the image chain is being merged into
      any other part.
      
      * include/libvirt/libvirt.h.in (virDomainBlockRebase): New
      declaration.
      * src/libvirt.c (virDomainBlockRebase): Implement it.
      * src/libvirt_public.syms (LIBVIRT_0.9.10): Export it.
      * src/driver.h (virDrvDomainBlockRebase): New driver callback.
      * src/rpc/gendispatch.pl (long_legacy): Add exemption.
      * docs/apibuild.py (long_legacy_functions): Likewise.
      99fd69c3
  10. 14 9月, 2011 1 次提交
  11. 02 9月, 2011 1 次提交
  12. 22 7月, 2011 1 次提交
    • A
      Add new API virDomainBlockPull* to headers · 152e8103
      Adam Litke 提交于
      Set up the types for the block pull functions and insert them into the
      virDriver structure definition.  Symbols are exported in this patch to
      prevent
      documentation compile failures.
      
      * include/libvirt/libvirt.h.in: new API
      * src/driver.h: add the new entry to the driver structure
      * python/generator.py: fix compiler errors, the actual python bindings
      * are
        implemented later
      * src/libvirt_public.syms: export symbols
      * docs/apibuild.py: Extend 'unsigned long' parameter exception to this
      * API
      152e8103
  13. 19 7月, 2011 1 次提交
    • D
      Quieten build & ensure API build scripts exit with non-zero status · 8665f855
      Daniel P. Berrange 提交于
      The current API build scripts will continue and exit with a zero
      status even if they find problems. This has been the cause of many
      build problems, or hidden build errors, in the past. Change the
      scripts so they always exit with a non-zero status for any problems
      they do not understand. Also turn off all debug output by default
      so they respect $(AM_V_GEN)
      
      * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts
      * docs/apibuild.py, python/generator.py: Exit with non-zero status
        if problems are found. Also be silent, not outputting any debug
        messages.
      * src/Makefile.am: Use $(AM_V_GEN) for ESX generator
      * python/Makefile.am: Tweak rule
      8665f855
  14. 22 6月, 2011 1 次提交
    • D
      Fix to python API extractor and API doc generation · d42ea21a
      Daniel Veillard 提交于
      This fixes a number of issues most of them raised by Eric Blake on the
      generated documentation output:
         - parsing of "long long int" and similar
         - add parsing of unions within a struct
         - remove spurious " * " fron comments on structure fields and enums
         - fix concatenation of base type and name in arrays
         - extend XSLT to cope with union in structs
      
      * docs/apibuild.py: fix and extend API extraction tool
      * docs/newapi.xsl: extend the stylesheets to cope with union in
        public structures
      d42ea21a
  15. 01 6月, 2011 1 次提交
  16. 31 5月, 2011 1 次提交
    • M
      Ignore backward compatibility macros in apibuild.py · 1767c8d7
      Matthias Bolte 提交于
      This fixes this three warnings from the parser by allowing the parser
      to ignore some macros in the same way as it can ignore functions.
      
      Parsing ./../include/libvirt/libvirt.h
      Misformatted macro comment for _virSchedParameter
       Expecting '* _virSchedParameter:' got '* virSchedParameter:'
      Misformatted macro comment for _virBlkioParameter
       Expecting '* _virBlkioParameter:' got '* virBlkioParameter:'
      Misformatted macro comment for _virMemoryParameter
       Expecting '* _virMemoryParameter:' got '* virMemoryParameter:'
      1767c8d7
  17. 16 5月, 2011 1 次提交
    • D
      Introduce yet another migration version in API. · 65043d2d
      Daniel P. Berrange 提交于
      Migration just seems to go from bad to worse. We already had to
      introduce a second migration protocol when adding the QEMU driver,
      since the one from Xen was insufficiently flexible to cope with
      passing the data the QEMU driver required.
      
      It turns out that this protocol still has some flaws that we
      need to address. The current sequence is
      
       *  Src: DumpXML
                - Generate XML to pass to dst
      
       *  Dst: Prepare
                - Get ready to accept incoming VM
                - Generate optional cookie to pass to src
      
       *  Src: Perform
                - Start migration and wait for send completion
                - Kill off VM if successful, resume if failed
      
       *  Dst: Finish
                - Wait for recv completion and check status
                - Kill off VM if unsuccessful
      
      The problems with this are:
      
       - Since the first step is a generic 'DumpXML' call, we can't
         add in other migration specific data. eg, we can't include
         any VM lease data from lock manager plugins
       - Since the first step is a generic 'DumpXML' call, we can't
         emit any 'migration begin' event on the source, or have
         any hook that runs right at the start of the process
       - Since there is no final step on the source, if the Finish
         method fails to receive all migration data & has to kill
         the VM, then there's no way to resume the original VM
         on the source
      
      This patch attempts to introduce a version 3 that uses the
      improved 5 step sequence
      
       *  Src: Begin
                - Generate XML to pass to dst
                - Generate optional cookie to pass to dst
      
       *  Dst: Prepare
                - Get ready to accept incoming VM
                - Generate optional cookie to pass to src
      
       *  Src: Perform
                - Start migration and wait for send completion
                - Generate optional cookie to pass to dst
      
       *  Dst: Finish
                - Wait for recv completion and check status
                - Kill off VM if failed, resume if success
                - Generate optional cookie to pass to src
      
       *  Src: Confirm
                - Kill off VM if success, resume if failed
      
      The API is designed to allow both input and output cookies
      in all methods where applicable. This lets us pass around
      arbitrary extra driver specific data between src & dst during
      migration. Combined with the extra 'Begin' method this lets
      us pass lease information from source to dst at the start of
      migration
      
      Moving the killing of the source VM out of Perform and
      into Confirm, means we can now recover if the dst host
      can't successfully Finish receiving migration data.
      65043d2d
  18. 18 2月, 2011 1 次提交
  19. 17 2月, 2011 1 次提交
  20. 13 10月, 2010 1 次提交
    • D
      Fixes for documentation extraction · 0df67151
      Daniel Veillard 提交于
      * include/libvirt/libvirt.h.in: some of the function type description
        were broken so they could not be automatically documented
      * src/util/event.c docs/apibuild.py: event.c exports one public API
        so it needs to be scanned too, avoid a few warnings
      0df67151
  21. 23 3月, 2010 1 次提交
  22. 25 2月, 2010 1 次提交
  23. 06 11月, 2009 1 次提交
    • P
      Add sentinel attribute for NULL terminated arg lists · 649bcd72
      Paolo Bonzini 提交于
      * src/internal.h (ATTRIBUTE_SENTINEL): New, it's a ggc feature and
        protected as such
      * src/util/buf.c (virBufferStrcat): Use it.
      * src/util/ebtables.c (ebtablesAddRemoveRule): Use it.
      * src/util/iptables.c (iptableAddRemoveRule: Use it.
      * src/util/qparams.h (new_qparam_set, append_qparams): Use it.
      * docs/apibuild.py: avoid breaking the API generator with that new
        internal keyword macro
      649bcd72
  24. 06 10月, 2009 1 次提交
  25. 02 10月, 2009 1 次提交
  26. 28 9月, 2009 1 次提交
    • D
      Fix API doc extractor to stop munging comment formatting · 5486abfe
      Daniel P. Berrange 提交于
      The python method help docs are copied across from the C
      funtion comments, but in the process all line breaks and
      indentation was being lost. This made the resulting text
      and code examples completely unreadable. Both the API
      doc extractor and the python generator were destroying
      whitespace & this fixes them to preserve it exactly.
      
      * docs/apibuild.py: Preserve all whitespace when extracting
        function comments. Print function comment inside a <![CDATA[
        section to fully preserve all whitespace. Look for the
        word 'returns' to describe return values, instead of 'return'
        to avoid getting confused with code examples including the
        C 'return' statement.
      * python/generator.py: Preserve all whitespace when printing
        function help docs
      * src/libvirt.c: Change any return parameter indicated by
        'return' to be 'returns', to avoid confusing the API extractor
      * docs/libvirt-api.xml: Re-build for fixed descriptions
      5486abfe
  27. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  28. 02 8月, 2009 1 次提交
  29. 24 4月, 2009 1 次提交
    • D
      release of 0.6.3 · 9cae1d5e
      Daniel Veillard 提交于
      * NEWS configure.in libvirt.spec.in docs/*: release of 0.6.3
      * po/*: regenerated
      * src/libvirt.c src/virterror.c: fixed some function comments
      Daniel
      9cae1d5e
  30. 20 1月, 2009 1 次提交
  31. 25 11月, 2008 1 次提交
    • D
      Release of 0.5.0 · 517ff04b
      Daniel Veillard 提交于
      * configure.in docs/* NEWS: release of 0.5.0
      * po/*: updated from the translators and merged
      * docs/apibuild.py src/libvirt.c: avoid some warnings at doc
        generation time
      daniel
      517ff04b
  32. 25 7月, 2008 1 次提交
    • D
      Remove Xen centric comments, rebuild the docs · 01fd287b
      Daniel Veillard 提交于
      * include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
        remove Xen centric comments patch from Guido Günther
      * docs/apibuild.py: ignore VIR_DEPRECATED
      * docs/libvirt-*.xml docs/html/libvirt-*.html: regenerated the
        documentation for the API
      Daniel
      01fd287b
  33. 14 3月, 2008 1 次提交
  34. 06 2月, 2008 1 次提交
  35. 14 8月, 2007 1 次提交
  36. 26 7月, 2007 1 次提交
  37. 24 7月, 2007 1 次提交