1. 11 10月, 2011 2 次提交
    • D
      Update examples for probing with systemtap · 1223910b
      Daniel P. Berrange 提交于
      This removes the old example for legacy probes and adds two
      new scripts demonstrating many of the new probe point facilities.
      
      The rpc-monitor.stp script will print out friendly details of all
      RPC traffic between a libvirt client/server. This is incredibly
      useful in seeing what RPC calls are being made, and also debugging
      problems in the RPC protocol code
      
      The events.stp script will print out lots of info about the poll
      event loop, which is useful for debugging event handling problems
      
      * examples/systemtap/events.stp, examples/systemtap/rpc-monitor.stp:
        New examples
      * examples/systemtap/client.stp: Remove obsolete example
      1223910b
    • D
      Rewrite all the DTrace/SystemTAP probing · ddf3bd32
      Daniel P. Berrange 提交于
      The libvirtd daemon had a few crude system tap probes. Some of
      these were broken during the RPC rewrite. The new modular RPC
      code is structured in a way that allows much more effective
      tracing. Instead of trying to hook up the original probes,
      define a new set of probes for the RPC and event code.
      
      The master probes file is now src/probes.d.  This contains
      probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
      virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
      probes for the poll event loop.
      
      The src/dtrace2systemtap.pl script can convert the probes.d
      file into a libvirt_probes.stp file to make use from systemtap
      much simpler.
      
      The src/rpc/gensystemtap.pl script can generate a set of
      systemtap functions for translating RPC enum values into
      printable strings. This works for all RPC header enums (program,
      type, status, procedure) and also the authentication enum
      
      The PROBE macro will automatically generate a VIR_DEBUG
      statement, so any place with a PROBE can remove any existing
      manual DEBUG statements.
      
      * daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
      * daemon/libvirtd.h: Remove probe macros
      * daemon/Makefile.am: Remove all probe buildings/install
      * daemon/remote.c: Update authentication probes
      * src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
        to generate STP files
      * src/internal.h: Add probe macros
      * src/probes.d: Master list of probes
      * src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
        src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
        src/util/event_poll.c: Insert probe points, removing any
        DEBUG statements that duplicate the info
      ddf3bd32
  2. 21 9月, 2011 1 次提交
    • E
      remote: fix crash on OOM · 2b0803c6
      Eric Blake 提交于
      Bug introduced in commit 675464b1.  On an OOM, this would try to
      dereference a char* and free the contents as a pointer, which is
      doomed to failure.
      
      Adding a syntax check will prevent mistakes like this in the future.
      
      * cfg.mk (sc_prohibit_internal_functions): New syntax check.
      (exclude_file_name_regexp--sc_prohibit_internal_functions): Add
      exemptions.
      * daemon/remote.c (remoteRelayDomainEventIOError)
      (remoteRelayDomainEventIOErrorReason)
      (remoteRelayDomainEventGraphics, remoteRelayDomainEventBlockJob):
      Use correct free function.
      2b0803c6
  3. 17 9月, 2011 1 次提交
    • D
      Prevent crash from dlclose() of libvirt.so · 8e44e559
      Daniel P. Berrange 提交于
      When libvirt calls virInitialize it creates a thread local
      for the virErrorPtr storage, and registers a callback to
      cleanup memory when a thread exits. When libvirt is dlclose()d
      or otherwise made non-resident, the callback function is
      removed from memory, but the thread local may still exist
      and if a thread later exists, it will invoke the callback
      and SEGV. There may also be other thread locals with callbacks
      pointing to libvirt code, so it is in general never safe to
      unload libvirt.so from memory once initialized.
      
      To allow dlclose() to succeed, but keep libvirt.so resident
      in memory, link with '-z nodelete'. This issue was first
      found with the libvirt CIM provider, but can potentially
      hit many of the dynamic language bindings which all ultimately
      involve dlopen() in some way, either on libvirt.so itself,
      or on the glue code for the binding which in turns links
      to libvirt
      
      * configure.ac, src/Makefile.am: Ensure libvirt.so is linked
        with -z nodelete
      * cfg.mk, .gitignore, tests/Makefile.am, tests/shunloadhelper.c,
        tests/shunloadtest.c: A test case to unload libvirt while
        a thread is still running.
      8e44e559
  4. 14 9月, 2011 1 次提交
    • P
      make: Fix 'make syntax-check' failing. · 49ce282a
      Peter Krempa 提交于
      Commit 2a0d75e5 added file python/libvirt-qemu-override.c that contains
      code that does not pass "make syntax-check". This patch adds an
      exception for this file and the check.
      
      prohibit_always_true_header_tests
      python/libvirt-qemu-override.c:17:#undef HAVE_PTHREAD_H
      maint.mk: do not test the above HAVE_<header>_H symbol(s);
        with the corresponding gnulib module, they are always true
      make: *** [sc_prohibit_always_true_header_tests] Error 1
      49ce282a
  5. 26 8月, 2011 1 次提交
  6. 19 8月, 2011 1 次提交
    • E
      maint: treat more libxml2 functions as free-like · e472fe25
      Eric Blake 提交于
      * cfg.mk (useless_free_options): Add xmlFreeDoc, xmlBufferFree.
      * src/esx/esx_vi.c (ESX_VI__TEMPLATE__FREE): Fix offenders.
      * tools/virsh.c (cmdFreecell, cmdVNCDisplay, cmdTTYConsole)
      (cmdDetachInterface, cmdDetachDisk, cmdSnapshotCreate)
      (cmdSnapshotCreateAs, cmdSnapshotList, cmdSnapshotParent):
      Likewise.
      e472fe25
  7. 25 7月, 2011 1 次提交
    • M
      bandwidth: Add parsing and free functions · e2ed67a8
      Michal Privoznik 提交于
      These functions parse given XML node and return pointer to the
      output. Unknown elements are silently ignored. Attributes must
      be integer and must fit in unsigned long long.
      
      Free function frees elements of virBandwidth structure.
      e2ed67a8
  8. 22 7月, 2011 4 次提交
    • D
      Add a test case for certificate validation · bd789dff
      Daniel P. Berrange 提交于
      This test case checks certification validation rules for
      
       - Basic constraints
       - Key purpose
       - Key usage
       - Start/expiry times
      
      It checks initial context creation sanity checks, and live
      session validation
      bd789dff
    • E
      save: add virFileDirectFd wrapper type · 519a1c43
      Eric Blake 提交于
      O_DIRECT has stringent requirements.  Rather than make lots of changes
      at each site that wants to use O_DIRECT, it is easier to offload
      the work through a helper process that mirrors the I/O between a
      pipe and the actual direct fd, so that the other end of the pipe
      no longer has to worry about constraints.
      
      Plus, if the kernel ever gains better posix_fadvise support, then we
      only have to touch a single file to let all callers benefit from a
      more efficient way to avoid file system caching.
      
      * src/util/virfile.h (virFileDirectFdFlag, virFileDirectFdNew)
      (virFileDirectFdClose, virFileDirectFdFree): New prototypes.
      * src/util/virdirect.c: Implement new wrapper object.
      * src/libvirt_private.syms (virfile.h): Export new symbols.
      * cfg.mk (useless_free_options): Add to list.
      * po/POTFILES.in: Add new translations.
      519a1c43
    • L
      conf: support abstracted interface info in domain interface XML · 07f41369
      Laine Stump 提交于
      the domain XML <interface> element is updated in the following ways:
      
      1) <virtualportprofile> can be specified when source type='network'
      (previously it was only valid for source type='direct')
      
      2) A new attribute "portgroup" has been added to the <source>
      element. When source type='network' (the only time portgroup is
      recognized), extra configuration information will be taken from the
      <portgroup> element of the given name in the network definition.
      
      3) Each virDomainNetDef now also potentially has a
      virDomainActualNetDef which is a private object (never
      exported/imported via the public API, and not defined in the RNG) that
      is used to maintain information about the physical device that was
      actually used for a NetDef of type VIR_DOMAIN_NET_TYPE_NETWORK.
      
      The virDomainActualNetDef will only be parsed/formatted if the
      parse/format function is called with the
      VIR_DOMAIN_XML_INTERNAL_ACTUAL_NET flag set (which is only needed when
      saving/loading a running domain's state info to the stateDir).
      07f41369
    • E
      build: rename files.h to virfile.h · 8e22e089
      Eric Blake 提交于
      In preparation for a future patch adding new virFile APIs.
      
      * src/util/files.h, src/util/files.c: Move...
      * src/util/virfile.h, src/util/virfile.c: ...here, and rename
      functions to virFile prefix.  Macro names are intentionally
      left alone.
      * *.c: All '#include "files.h"' uses changed.
      * src/Makefile.am (UTIL_SOURCES): Reflect rename.
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
      * src/libvirt_private.syms: Likewise.
      * docs/hacking.html.in: Likewise.
      * HACKING: Regenerate.
      8e22e089
  9. 20 7月, 2011 1 次提交
  10. 16 7月, 2011 1 次提交
    • E
      build: add syntax check for proper flags use · 761bbb17
      Eric Blake 提交于
      Enforce the recent flags cleanups - we want to use 'unsigned int flags'
      in any of our APIs (except where backwards compatibility is important,
      in the public migration APIs), and that all flags are checked for
      validity (except when there are stub functions that completely
      ignore the flags argument).
      
      There are a few minor tweaks done here to avoid false positives:
      signed arguments passed to open() are renamed oflags, and flags
      arguments that are legitimately ignored are renamed flags_unused.
      
      * cfg.mk (sc_flags_usage): New rule.
      (exclude_file_name_regexp--sc_flags_usage): And a few exemptions.
      (sc_flags_debug): Tweak wording.
      * src/util/iohelper.c (runIO, main): Rename variable.
      * src/util/util.c (virSetInherit): Likewise.
      * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile):
      Likewise.
      * src/fdstream.c (virFDStreamOpenFileInternal)
      (virFDStreamOpenFile, virFDStreamCreateFile): Likewise.
      * src/util/command.c (virExecWithHook) [WIN32]: Likewise.
      * src/util/util.c (virFileOpenAs, virDirCreate) [WIN32]: Likewise.
      * src/locking/lock_manager.c (virLockManagerPluginNew)
      [!HAVE_DLFCN_H]: Likewise.
      * src/locking/lock_driver_nop.c (virLockManagerNopNew)
      (virLockManagerNopAddResource, virLockManagerNopAcquire)
      (virLockManagerNopRelease, virLockManagerNopInquire): Likewise.
      761bbb17
  11. 14 7月, 2011 2 次提交
    • M
      storage: Avoid memory leak on metadata fetching · 85aa40e2
      Michal Privoznik 提交于
      Getting metadata on storage allocates a memory (path) which need to
      be freed after use otherwise it gets leaked. This means after use of
      virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one
      must call virStorageFileFreeMetadata to free it. This function frees
      structure internals and structure itself.
      85aa40e2
    • E
      build: avoid ATTRIBUTE_UNUSED in headers · 088473b2
      Eric Blake 提交于
      The compiler might optimize based on our declaration that something
      is unused.  Putting that declaration in the header risks getting
      out of sync with the actual implementation, so it belongs better
      only in the .c files.  We were mostly compliant, and a new syntax
      check will help us in the future.
      
      * cfg.mk (sc_avoid_attribute_unused_in_header): New syntax check.
      * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Delete
      attribute already present in .c file.
      * src/qemu/qemu_domain.h (qemuDomainEventFlush): Likewise.
      * src/util/virterror_internal.h (virReportErrorHelper): Parameters
      are actually used by .c file.
      * src/xenxs/xen_sxpr.h (xenFormatSxprDisk): Adjust prototype.
      * src/xenxs/xen_sxpr.c (xenFormatSxprDisk): Delete unused argument.
      (xenFormatSxpr): Adjust caller.
      * src/xen/xend_internal.c (xenDaemonAttachDeviceFlags)
      (xenDaemonUpdateDeviceFlags): Likewise.
      Suggested by Daniel Veillard.
      088473b2
  12. 13 7月, 2011 3 次提交
    • E
      maint: print flags in hex during debug · 06dbfa6d
      Eric Blake 提交于
      Continuation of commit 313ac7fd, and enforce things with a syntax
      check.
      
      Technically, virNetServerClientCalculateHandleMode is not printing
      a mode_t, but rather a collection of VIR_EVENT_HANDLE_* bits;
      however, these bits are < 8, so there is no different in the
      output, and that was the easiest way to silence the new syntax check.
      
      * cfg.mk (sc_flags_debug): New syntax check.
      (exclude_file_name_regexp--sc_flags_debug): Add exemptions.
      * src/fdstream.c (virFDStreamOpenFileInternal): Print flags in
      hex, mode_t in octal.
      * src/libvirt-qemu.c (virDomainQemuMonitorCommand)
      (virDomainQemuAttach): Likewise.
      * src/locking/lock_driver_nop.c (virLockManagerNopInit): Likewise.
      * src/locking/lock_driver_sanlock.c (virLockManagerSanlockInit):
      Likewise.
      * src/locking/lock_manager.c: Likewise.
      * src/qemu/qemu_migration.c: Likewise.
      * src/qemu/qemu_monitor.c: Likewise.
      * src/rpc/virnetserverclient.c
      (virNetServerClientCalculateHandleMode): Print mode with %o.
      06dbfa6d
    • E
      maint: exclude more files from syntax check · 017b8405
      Eric Blake 提交于
      * cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Exempt
      docs/api_extension/*.patch.
      (exclude_file_name_regexp--sc_prohibit_always_true_header_tests)
      (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF)
      (exclude_file_name_regexp--sc_prohibit_fork_wrappers)
      (exclude_file_name_regexp--sc_trailing_blank): Simplify.
      (exclude_file_name_regexp--sc_prohibit_gettext_noop): Delete.
      (exclude_file_name_regexp--sc_prohibit_close)
      (exclude_file_name_regexp--sc_prohibit_nonreentrant)
      (exclude_file_name_regexp--sc_prohibit_sprintf): Tighten.
      017b8405
    • E
      maint: avoid incremental 'make syntax-check' failure · 0583825f
      Eric Blake 提交于
      Incrementally running 'make syntax-check' on a tree previously
      built after commit 62dee6fa but before 44036460 fails sc_po_check
      (because the generated qemu_dispatch.h gained translatable strings).
      This is a followup to commit addaa537 for that scenario.
      
      * cfg.mk (sc_po_check): Add another prereq.
      ($(srcdir)/daemon/qemu_dispatch.h): Add rule.
      0583825f
  13. 01 7月, 2011 1 次提交
    • E
      build: allow 'make syntax-check' on fresh checkout · addaa537
      Eric Blake 提交于
      For good or for bad, I did a fresh checkout, ./autogen.sh, then
      'configure', then 'make syntax-check', and was surprised that it
      failed.  Running 'make' before 'make syntax-check' cleaned up the
      issue, but this patch makes it work up front.
      
      * cfg.mk (sc_po_check): Add prerequisites.
      addaa537
  14. 29 6月, 2011 1 次提交
    • E
      build: update translated files · 8f338921
      Eric Blake 提交于
      The last patch was incomplete.  The translated strings merely
      moved between generated file names, rather than disappearing.
      
      * cfg.mk (generated_files): Update generated file names.
      * po/POTFILES.in: Add remote_dispatch.h
      8f338921
  15. 24 6月, 2011 8 次提交
    • D
      Move the RPC generator scripts into src/rpc · b17b4afa
      Daniel P. Berrange 提交于
      Move the daemon/remote_generator.pl to src/rpc/gendispatch.pl
      and move the src/remote/rpcgen_fix.pl to src/rpc/genprotocol.pl
      
      * daemon/Makefile.am: Update for new name/location of generator
      * src/Makefile.am: Update for new name/location of generator
      b17b4afa
    • D
      Introduce generic RPC client objects · 434de30d
      Daniel P. Berrange 提交于
      To facilitate creation of new clients using XDR RPC services,
      pull alot of the remote driver code into a set of reusable
      objects.
      
       - virNetClient: Encapsulates a socket connection to a
         remote RPC server. Handles all the network I/O for
         reading/writing RPC messages. Delegates RPC encoding
         and decoding to the registered programs
      
       - virNetClientProgram: Handles processing and dispatch
         of RPC messages for a single RPC (program,version).
         A program can register to receive async events
         from a client
      
       - virNetClientStream: Handles generic I/O stream
         integration to RPC layer
      
      Each new client program now merely needs to define the list of
      RPC procedures & events it wants and their handlers. It does
      not need to deal with any of the network I/O functionality at
      all.
      434de30d
    • D
      Introduce generic RPC module for advertising via MDNS · e23ec81d
      Daniel P. Berrange 提交于
      Allow RPC servers to advertise themselves using MDNS,
      via Avahi
      
      * src/rpc/virnetserver.c, src/rpc/virnetserver.h: Allow
        registration of MDNS services via avahi
      * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Add
        API to fetch the listen port number
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add API to
        fetch the local port number
      * src/rpc/virnetservermdns.c, src/rpc/virnetservermdns.h: Represent
        an MDNS advertisement
      e23ec81d
    • D
      Introduce generic RPC server objects · 4e00b1da
      Daniel P. Berrange 提交于
      To facilitate creation of new daemons providing XDR RPC services,
      pull a lot of the libvirtd daemon code into a set of reusable
      objects.
      
       * virNetServer: A server contains one or more services which
         accept incoming clients. It maintains the list of active
         clients. It has a list of RPC programs which can be used
         by clients. When clients produce a complete RPC message,
         the server passes this onto the corresponding program for
         handling, and queues any response back with the client.
      
       * virNetServerClient: Encapsulates a single client connection.
         All I/O for the client is handled, reading & writing RPC
         messages.
      
       * virNetServerProgram: Handles processing and dispatch of
         RPC method calls for a single RPC (program,version).
         Multiple programs can be registered with the server.
      
       * virNetServerService: Encapsulates socket(s) listening for
         new connections. Each service listens on a single host/port,
         but may have multiple sockets if on a dual IPv4/6 host.
      
      Each new daemon now merely has to define the list of RPC procedures
      & their handlers. It does not need to deal with any network related
      functionality at all.
      4e00b1da
    • D
      Generic module for handling SASL authentication & encryption · bb1c9296
      Daniel P. Berrange 提交于
      This provides two modules for handling SASL
      
       * virNetSASLContext provides the process-wide state, currently
         just a whitelist of usernames on the server and a one time
         library init call
      
       * virNetTLSSession provides the per-connection state, ie the
         SASL session itself. This also include APIs for providing
         data encryption/decryption once the session is established
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetsaslcontext.c, src/rpc/virnetsaslcontext.h: Generic
        SASL handling code
      bb1c9296
    • D
      Generic module for handling TLS encryption and x509 certs · 30fd0bbb
      Daniel P. Berrange 提交于
      This provides two modules for handling TLS
      
       * virNetTLSContext provides the process-wide state, in particular
         all the x509 credentials, DH params and x509 whitelists
       * virNetTLSSession provides the per-connection state, ie the
         TLS session itself.
      
      The virNetTLSContext provides APIs for validating a TLS session's
      x509 credentials. The virNetTLSSession includes APIs for performing
      the initial TLS handshake and sending/recving encrypted data
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnettlscontext.c, src/rpc/virnettlscontext.h: Generic
        TLS handling code
      30fd0bbb
    • D
      Introduce a generic object for using network sockets · 58b5b14e
      Daniel P. Berrange 提交于
      Introduces a simple wrapper around the raw POSIX sockets APIs
      and name resolution APIs. Allows for easy creation of client
      and server sockets with correct usage of name resolution APIs
      for protocol agnostic socket setup.
      
      It can listen for UNIX and TCP stream sockets.
      
      It can connect to UNIX, TCP streams directly, or indirectly
      to UNIX sockets via an SSH tunnel or external command
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Generic
        sockets APIs
      * tests/Makefile.am: Add socket test
      * tests/virnetsockettest.c: New test case
      * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings
      * tests/ssh.c: Dumb helper program for SSH tunnelling tests
      58b5b14e
    • D
      Provide a simple object for encoding/decoding RPC messages · ceacc1dd
      Daniel P. Berrange 提交于
      This provides a new struct that contains a buffer for the RPC
      message header+payload, as well as a decoded copy of the message
      header. There is an API for applying a XDR encoding & decoding
      of the message headers and payloads. There are also APIs for
      maintaining a simple FIFO queue of message instances.
      
      Expected usage scenarios are:
      
      To send a message
      
         msg = virNetMessageNew()
      
         ...fill in msg->header fields..
         virNetMessageEncodeHeader(msg)
         ...loook at msg->header fields to determine payload filter
         virNetMessageEncodePayload(msg, xdrfilter, data)
         ...send msg->bufferLength worth of data from buffer
      
      To receive a message
      
         msg = virNetMessageNew()
         ...read VIR_NET_MESSAGE_LEN_MAX of data into buffer
         virNetMessageDecodeLength(msg)
         ...read msg->bufferLength-msg->bufferOffset of data into buffer
         virNetMessageDecodeHeader(msg)
         ...look at msg->header fields to determine payload filter
         virNetMessageDecodePayload(msg, xdrfilter, data)
         ...run payload processor
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Internal
        message handling API.
      * testutils.c, testutils.h: Helper for printing binary differences
      * virnetmessagetest.c: Validate all XDR encoding/decoding
      ceacc1dd
  16. 23 6月, 2011 2 次提交
    • E
      maint: avoid future setgid problems · a585eba4
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_setuid)
      (exclude_file_name_regexp--sc_prohibit_setuid): New rule.
      (VC_LIST_ALWAYS_EXCLUDE_REGEX): Always exempt po files.
      (exclude_file_name_regexp--sc_prohibit_asprintf): Simplify.
      (exclude_file_name_regexp--sc_prohibit_can_not): Drop.
      (exclude_file_name_regexp--sc_prohibit_doubled_word): Likewise.
      a585eba4
    • E
      maint: remove syntax-check exception · 50a6a126
      Eric Blake 提交于
      We weren't using the @FOO@ notation for a Makefile substitution,
      but instead for a sed rule, so using [@]FOO@ instead avoids the
      need to exempt this syntax check.
      
      * cfg.mk (_makefile_at_at_check_exceptions): Delete.
      * tools/Makefile.am (virt-xml-validate, virt-pki-validate): Avoid
      tripping syntax-check.
      Reported by Daniel P. Berrange.
      50a6a126
  17. 08 6月, 2011 1 次提交
  18. 07 6月, 2011 1 次提交
  19. 16 5月, 2011 2 次提交
    • D
      Pass graphics setup from dst back to src via migration cookies · 72de0d28
      Daniel P. Berrange 提交于
      Extend the QEMU migration cookie structure to allow information
      about the destination host graphics setup to be passed by to
      the source host. This will enable seamless migration of any
      connected graphics clients
      
      * src/qemu/qemu_migration.c: Add graphics info to migration
        cookies
      * daemon/libvirtd.c: Always initialize gnutls to enable
        x509 cert parsing in QEMU
      72de0d28
    • D
      Introduce migration cookies to QEMU driver · 8654175c
      Daniel P. Berrange 提交于
      The migration protocol has support for a 'cookie' parameter which
      is an opaque array of bytes as far as libvirt is concerned. Drivers
      may use this for passing around arbitrary extra data they might
      need during migration. The QEMU driver needs to do a few things:
      
       - Pass hostname/uuid to allow strict protection against localhost
         migration attempts
       - Pass SPICE/VNC server port from the target back to the source to
         allow seamless relocation of client sessions
       - Pass lock driver state from source to destination
      
      This patch introduces the basic glue for handling cookies
      but only includes the host/guest UUID & name.
      
      * src/libvirt_private.syms: Export virXMLParseStrHelper
      * src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Parsing
        and formatting of migration cookies
      * src/qemu/qemu_driver.c: Pass in cookie parameters where possible
      * src/remote/remote_protocol.h, src/remote/remote_protocol.x: Change
        cookie max length to 16384 bytes
      8654175c
  20. 13 5月, 2011 1 次提交
  21. 12 5月, 2011 3 次提交
    • M
      remote generator: Add skipgen/autogen flags to .x files · 2a5251e2
      Matthias Bolte 提交于
      Make procedure parsing more robust, by allowing arbitrary
      amounts of whitespaces.
      
      Also make some error messages more verbose.
      2a5251e2
    • E
      maint: omit translation for all VIR_INFO · cb84580a
      Eric Blake 提交于
      We were 31/73 on whether to translate; since less than 50% translated
      and since VIR_INFO is less than VIR_WARN which also doesn't translate,
      this makes sense.
      
      * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it
      falls between WARN and DEBUG.
      * daemon/libvirtd.c (qemudDispatchSignalEvent, remoteCheckAccess)
      (qemudDispatchServer): Adjust offenders.
      * daemon/remote.c (remoteDispatchAuthPolkit): Likewise.
      * src/network/bridge_driver.c (networkReloadIptablesRules)
      (networkStartNetworkDaemon, networkShutdownNetworkDaemon)
      (networkCreate, networkDefine, networkUndefine): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainDefine)
      (qemudDomainUndefine): Likewise.
      * src/storage/storage_driver.c (storagePoolCreate)
      (storagePoolDefine, storagePoolUndefine, storagePoolStart)
      (storagePoolDestroy, storagePoolDelete, storageVolumeCreateXML)
      (storageVolumeCreateXMLFrom, storageVolumeDelete): Likewise.
      * src/util/bridge.c (brProbeVnetHdr): Likewise.
      * po/POTFILES.in: Drop src/util/bridge.c.
      cb84580a
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
  22. 10 5月, 2011 1 次提交
    • E
      build: translate generated strings · 9d8e01a1
      Eric Blake 提交于
      Make sure that xgettext scans generated files for translatable
      strings, rather than just files stored in libvirt.git.
      
      * .gnulib: Update, for bootstrap and syntax-check fixes.
      * bootstrap: Resynchronize with gnulib.
      * cfg.mk (generated_files): Define.
      * po/POTFILES.in: Add more files with _().
      9d8e01a1