1. 20 1月, 2010 1 次提交
  2. 14 1月, 2010 2 次提交
    • C
      daemon: Don't blindly unregister domain events · 438fa793
      Cole Robinson 提交于
      The daemon will attempt to unregister domain events on client disconnect,
      even if no events were ever registered. This raises an unneeded error.
      
      Track in the qemu_client structure if events have been registered, and
      check this when performing cleanup.
      438fa793
    • C
      daemon: Fix various error reporting issues · 2d4d6576
      Cole Robinson 提交于
      Many node device calls weren't properly relaying error messages, and
      domain event registeration was not checking for error.
      2d4d6576
  3. 23 12月, 2009 1 次提交
    • M
      The secret driver is stateful, link it directly to libvirtd · a26d2628
      Matthias Bolte 提交于
      All other stateful drivers are linked directly to libvirtd
      instead of libvirt.so. Link the secret driver to libvirtd too.
      
      * daemon/Makefile.am: link the secret driver to libvirtd
      * daemon/libvirtd.c: add #ifdef WITH_SECRETS blocks
      * src/Makefile.am: don't link the secret driver to libvirt.so
      * src/libvirt_private.syms: remove the secretRegister symbol
      a26d2628
  4. 20 12月, 2009 1 次提交
    • A
      Add domainMemoryStats support to remote driver · 841d5035
      Adam Litke 提交于
      Use a dynamically sized xdr_array to pass memory stats on the wire.  This
      supports the addition of future memory stats and reduces the message size
      since only supported statistics are returned.
      
      * src/remote/remote_protocol.x: provide defines for the new entry point
      * src/remote/remote_driver.c daemon/remote.c: implement the client and
        server side
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: generated
        stubs
      841d5035
  5. 18 12月, 2009 1 次提交
    • J
      CPU flags wire protocol format and server side · 3a2881fa
      Jiri Denemark 提交于
      * src/remote/remote_protocol.x: update with new entry point
      * daemon/remote.c: add the new server dispatcher
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: regenerated
      3a2881fa
  6. 16 12月, 2009 1 次提交
    • J
      avoid calling exit with a constant; use EXIT_* instead · 2e5efc3d
      Jim Meyering 提交于
      This appeases a new gnulib-provided "syntax-check".
      * daemon/libvirtd.c (main): Use EXIT_FAILURE, not 1.
      * proxy/libvirt_proxy.c (main): Likewise, and EXIT_SUCCESS, not 0.
      * tests/conftest.c (main): Likewise.
      * tests/reconnect.c (main): Likewise.
      * tests/testutils.h (EXIT_AM_SKIP): Define.
      * tests/nodeinfotest.c (mymain): Use EXIT_AM_SKIP, not 77.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/virshtest.c (mymain): Likewise.
      2e5efc3d
  7. 15 12月, 2009 1 次提交
  8. 11 12月, 2009 1 次提交
  9. 10 12月, 2009 1 次提交
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  10. 02 12月, 2009 1 次提交
    • D
      Fix event test timer checks on kernels with HZ=100 · 32f021f2
      Daniel P. Berrange 提交于
      On kernels with HZ=100, the resolution of sleeps in poll() is
      quite bad. Doing a precise check on the expiry time vs the
      current time will thus often thing the timer has not expired
      even though we're within 10ms of the expected expiry time. This
      then causes another pointless sleep in poll() for <10ms. Timers
      do not need to have such precise expiration, so we treat a timer
      as expired if it is within 20ms of the expected expiry time. This
      also fixes the eventtest.c test suite on kernels with HZ=100
      
      * daemon/event.c: Add 20ms fuzz when checking for timer expiry
      32f021f2
  11. 27 11月, 2009 1 次提交
  12. 13 11月, 2009 3 次提交
    • D
      Fix cleanup when state driver init fails · 4be6e024
      Daniel P. Berrange 提交于
      * daemon/libvirtd.c: Fix incorrect goto label causing cleanup to
        be missed when state driver init fails
      4be6e024
    • D
      Fix initscript to check daemon pidfile · ce62916b
      Daniel P. Berrange 提交于
      The libvirtd initscript could get confused between the system and
      session instances of the daemon. To avoid this it is neccessary
      to check the pidfile explicitly.
      
      * daemon/libvirtd.init.in: Always check the pidfile of the system
        daemon to avoid confusion with the session daemons
      ce62916b
    • D
      Implement a node device backend using libudev · 3ad6dcf3
      David Allan 提交于
      * configure.in: add new --with-udev, disabled by default, and requiring
        libudev > 145
      * src/node_device/node_device_udev.c src/node_device/node_device_udev.h:
        the new node device backend
      * src/node_device/node_device_linux_sysfs.c: moved node_device_hal_linux.c
        to a better file name
      * src/conf/node_device_conf.c src/conf/node_device_conf.h: add a couple
        of fields in node device definitions, and an API to look them up,
        remove a couple of unused fields from previous patch.
      * src/node_device/node_device_driver.c src/node_device/node_device_driver.h:
        plug the new driver
      * po/POTFILES.in src/Makefile.am src/libvirt_private.syms: add the new
        files and symbols
      * src/util/util.h src/util/util.c: add a new convenience macro
        virBuildPath and virBuildPathInternal() function
      3ad6dcf3
  13. 12 11月, 2009 2 次提交
    • C
      Add virConnectGetLibvirtVersion API · ce4c0bf5
      Cole Robinson 提交于
      There is currently no way to determine the libvirt version of a remote
      libvirtd we are connected to. This is a useful piece of data to enable
      feature detection.
      ce4c0bf5
    • D
      Disable IPv6 socket auto-binding to IPv4 socket · 730fd3b0
      Daniel P. Berrange 提交于
      Sometimes getaddrinfo returns IPv4 addresses before IPv6 addresses.
      IPv6 sockets default to attempting to bind to IPv4 addresses too.
      So if the IPv4 address is activated first, then binding to IPv6
      will unneccessarily fail.
      
      * daemon/libvirtd.c: Bind to IPv6 and IPv4 addresses separately
      730fd3b0
  14. 11 11月, 2009 2 次提交
    • D
      Implmentation of new APIs to checking state/persistence of objects · cabc2cc9
      Daniel P. Berrange 提交于
      This implements the virConnectIsSecure, virConnectIsEncrypted,
      virDomainIsPersistent, virDomainIsActive, virNetworkIsActive,
      virNetworkIsPersistent, virStoragePoolIsActive,
      virStoragePoolIsPersistent, virInterfaceIsActive APIs in
      (nearly) all drivers. Exceptions are:
      
       phyp: missing domainIsActive/Persistent
       esx: missing domainIsPersistent
       opennebula: missing domainIsActive/Persistent
      
      * src/remote/remote_protocol.x: Define remote wire ABI for newly
        added APIs.
      * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_conf.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
        src/remote/remote_driver.c, src/storage/storage_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c,
        src/xen/xen_inotify.h: Implement all the new APIs where possible
      cabc2cc9
    • D
      Various fixes following a code review part 2 · 117aa0d8
      Daniel Veillard 提交于
      * daemon/libvirtd.c tools/virsh.c: Steve Grubb <sgrubb@redhat.com> found
        a few more issues
      117aa0d8
  15. 10 11月, 2009 1 次提交
  16. 04 11月, 2009 2 次提交
    • C
      Improve error reporting for virConnectGetHostname calls · 517761fd
      Cole Robinson 提交于
      All drivers have copy + pasted inadequate error reporting which wraps
      util.c:virGetHostname. Move all error reporting to this function, and improve
      what we report.
      
      Changes from v1:
        Drop the driver wrappers around virGetHostname. This means we still need
        to keep the new conn argument to virGetHostname, but I think it's worth
        it.
      517761fd
    • D
      Move libvirtd event loop into background thread · 075bb5f1
      Daniel P. Berrange 提交于
      The virStateInitialize() call for starting up stateful drivers
      may require that the event loop is running already. This it is
      neccessary to start the event loop before this call. At the
      same time, network clients must not be processed until afte
      virStateInitialize has completed.
      
      The qemudListenUnix() and remoteListenTCP() methods must
      therefore not register file handle watches, merely open the
      network sockets & listen() on them. This means clients can
      connected and are queued, pending completion of initialization
      
      The qemudRunLoop() method is moved into a background thread
      that is started early to allow access to the event loop during
      driver initialization. The main process thread leader pretty
      much does nothing once the daemon is running, merely waits
      for the event loop thread to quit
      
      * daemon/libvirtd.c, daemon/libvirtd.h: Move event loop into
        a background thread
      * daemon/THREADING.txt: Rewrite docs to better reflect reality
      075bb5f1
  17. 03 11月, 2009 7 次提交
    • M
      Fix --with-init-script configure option · 958c366b
      Matthew Booth 提交于
      * configure.in daemon/Makefile.am: the --with-init-script configure
        option was broken, and always defaulted based on the existence of
        /etc/redhat-release. This was a systematic typo based on
        mixed use of init-script and init-scripts.
      958c366b
    • D
      Don't let parent of daemon exit until basic initialization is done · 4296cea2
      Daniel P. Berrange 提交于
      The daemonizing code lets the parent exit almost immediately. This
      means that it may think it has successfully started even when
      important failures occur like not being able to acquire the PID
      file. It also means network sockets are not yet open.
      
      To address this when daemonizing the parent passes an open pipe
      file descriptor to the child. The child does its basic initialization
      and then writes a status code to the pipe indicating either success,
      or failure. This ensures that when daemonizing, the parent does not
      exit until the pidfile is acquired & basic network sockets are open.
      
      Initialization of the libvirt drivers is still done asynchronously
      since this may take a very long time.
      
      * daemon/libvirtd.c: Force parent to stay around until basic config
        file, pidfile & network socket init is completed
      4296cea2
    • D
      Pull signal setup code out into separate method · a71f79c3
      Daniel P. Berrange 提交于
      * daemon/libvirtd.c: Introduce a daemonSetupSignals() method
        and put all signal handling code there
      * daemon/libvirtd.h: Add sigread/sigwrite to qemud_server type
      a71f79c3
    • D
      Fix duplicating logging of errors in libvirtd · 4ab79958
      Daniel P. Berrange 提交于
      The libvirt default error handling callback will print all errors
      to stderr. The libvirtd default logging callback will do the same.
      Set a no-op error handling callback in libvirtd to prevent this
      duplication
      
      * daemon/libvirtd.c: Register a no-op error handling function
      4ab79958
    • D
      Fix initialization order bugs · 5f672538
      Daniel P. Berrange 提交于
      virInitialize must be the first libvirt function called to ensure
      threads, error handling & random number generator are all setup.
      
      Move UNIX socket directory permissions change to place of use
      5f672538
    • D
      Misc cleanup to network socket init · 0264e167
      Daniel P. Berrange 提交于
      * daemon/libvirtd.c: Change qemudNetworkInit() so that it doesn't try
      to free its argument, leaving the caller todo cleanup as is normal
      practice. Add missing policykit cleanup to qemudCleanup, and remove
      server watch if set. Remove duplicated call to listen() on TCP sockets
      0264e167
    • D
      Annotate many methods with ATTRIBUTE_RETURN_CHECK & fix problems · 46992453
      Daniel P. Berrange 提交于
      Nearly all of the methods in src/util/util.h have error codes that
      must be checked by the caller to correct detect & report failure.
      Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of
      this
      
      * daemon/libvirtd.c: Add explicit check on return value of virAsprintf
      * src/conf/domain_conf.c: Add missing check on virParseMacAddr return
        value status & report error
      * src/network/bridge_driver.c: Add missing OOM check on virAsprintf
        and report error
      * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return
        value status & report error
      * src/security/security_selinux.c: Remove call to virRandomInitialize
        that's done in libvirt.c already
      * src/storage/storage_backend_logical.c: Add check & log on virRun
        return status
      * src/util/util.c: Add missing checks on virAsprintf/Run status
      * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK
        if they return an error status code
      * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr
      * src/xen/xm_internal.c: Add missing checks on virAsprintf
      * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
      46992453
  18. 27 10月, 2009 1 次提交
  19. 26 10月, 2009 3 次提交
  20. 21 10月, 2009 1 次提交
    • D
      Do not log rotate very small logs · b03fe2d0
      Dan Kenigsberg 提交于
      Without this, after few weeks without use, each defined domain grows a
      tail of empty gzipped logs, instead of keeping just the last log of
      interest.
      
      * daemon/libvirtd.logrotate.in: only rotate when the log is over 100 KBytes
      b03fe2d0
  21. 09 10月, 2009 1 次提交
    • D
      Remove unneccessary uri_in parameter from virMigratePrepareTunnel · f6c66d01
      Daniel P. Berrange 提交于
      Since virMigratePrepareTunnel() is used for migration over the
      native libvirt connection, there is never any need to pass the
      target URI to this method.
      
      * daemon/remote.c, src/driver.h, src/libvirt.c, src/libvirt_internal.h,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/remote/remote_protocol.c, src/remote/remote_protocol.h,
        src/remote/remote_protocol.x: Remove 'uri_in' parameter from
        virMigratePrepareTunnel() method
      f6c66d01
  22. 08 10月, 2009 1 次提交
    • D
      Misc win32 build fixes · 7b1fe89a
      Daniel P. Berrange 提交于
      * daemon/Makefile.am: Fix missing sasl rule
      * src/datatypes.c: Add unistd.h to avoid gnulib bug
      * src/util/cgroup.c: Disable mntent if not available
      7b1fe89a
  23. 06 10月, 2009 1 次提交
    • M
      Create /var/log/libvirt/{lxc,uml} dirs · d285084b
      Mark McLoughlin 提交于
      Otherwise logrotate barfs:
      
        error: error accessing /var/log/libvirt/uml: No such file or directory
        error: libvirtd:1 glob failed for /var/log/libvirt/uml/*.log
        error: found error in /var/log/libvirt/qemu/*.log /var/log/libvirt/uml/*.log /var/log/libvirt/lxc/*.log , skipping
      
      * qemud/Makefile.am: always create /var/log/libvirt/{lxc,uml} when
        installing the logrotate conf; not ideal, but easier than making
        the logrotate conf depend on which drivers are enabled
      d285084b
  24. 05 10月, 2009 1 次提交
  25. 02 10月, 2009 2 次提交
    • D
      Fix emission of domain events messages · 398d01b8
      Daniel P. Berrange 提交于
      The code which updated the message length after writing the
      payload wrote the updated length word in the wrong place since
      the XDR object was given a buffer pointing to the start of the
      header payload, rather than message start.
      
      * daemon/remote.c: Fix updating of event message length so that
        we actually send the payload, not just the header
      398d01b8
    • C
      Tunnelled migration. · 6e16575a
      Chris Lalancette 提交于
      Implementation of tunnelled migration, using a Unix Domain Socket
      on the qemu backend.  Note that this requires very new versions of
      qemu (0.10.7 at least) in order to get the appropriate bugfixes.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      6e16575a