1. 21 5月, 2010 4 次提交
  2. 20 5月, 2010 1 次提交
  3. 19 5月, 2010 1 次提交
  4. 22 4月, 2010 1 次提交
    • C
      Make avahi startup more robust. · 8274993f
      Chris Lalancette 提交于
      If the hostname of the current virtualization machine
      could not be resolved, then libvirtd would fail to
      start.  However, for disconnected operation (on a laptop,
      for instance) the hostname may very legitimately not
      be resolvable.  This patch makes it so that if we can't
      resolve the hostname, avahi doesn't fail, it just uses
      a less useful MDNS string.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      8274993f
  5. 06 4月, 2010 1 次提交
  6. 30 3月, 2010 2 次提交
  7. 27 3月, 2010 1 次提交
    • S
      Core driver implementation with ebtables support · 065b6571
      Stefan Berger 提交于
      This patch implements the core driver and provides
      - management functionality for managing the filter XMLs
      - compiling the internal filter representation into ebtables rules
      - applying ebtables rules on a network (tap,macvtap) interface
      - tearing down ebtables rules that were applied on behalf of an
      interface
      - updating of filters while VMs are running and causing the firewalls to
      be rebuilt
      - other bits and pieces
      Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
      065b6571
  8. 26 3月, 2010 1 次提交
    • D
      Remote driver & daemon impl of new event API · 097e07a6
      Daniel P. Berrange 提交于
      This wires up the remote driver to handle the new events APIs.
      The public API allows an application to request a callback filters
      events to a specific domain object, and register multiple callbacks
      for the same event type. On the wire there are two strategies for
      this
      
       - Register multiple callbacks with the remote daemon, each
         with filtering as needed
       - Register only one callback per event type, with no filtering
      
      Both approaches have potential inefficiency. In the first scheme,
      the same event gets sent over the wire many times if multiple
      callbacks are registered. With the second scheme, unneccessary
      events get sent over the wire if a per-domain filter is set on
      the client. The second scheme is far easier to implement though,
      so this patch takes that approach.
      
      * daemon/dispatch.h: Don't export remoteRelayDomainEvent since it
        is no longer needed for unregistering callbacks, instead the
        unique callback ID is used
      * daemon/libvirtd.c, daemon/libvirtd.h: Track and unregister
        callbacks based on callback ID, instead of function pointer
      * daemon/remote.c: Switch over to using virConnectDomainEventRegisterAny
        instead of legacy virConnectDomainEventRegister function. Refactor
        remoteDispatchDomainEventSend() to cope with arbitrary event types
      * src/driver.h, src/driver.c: Move verify() call into source file
        instead of header, to avoid polluting the global namespace with
        the verify function name
      * src/remote/remote_driver.c: Implement new APIs for event
        registration. Refactor processCallDispatchMessage() to cope
        with arbitrary incoming event types. Merge remoteDomainQueueEvent()
        into processCallDispatchMessage() to avoid duplication of code.
        Rename remoteDomainReadEvent() to remoteDomainReadEventLifecycle()
      * src/remote/remote_protocol.x: Define wire format for the new
        virConnectDomainEventRegisterAny and virConnectDomainEventDeregisterAny
        functions
      097e07a6
  9. 10 3月, 2010 1 次提交
  10. 02 3月, 2010 1 次提交
  11. 27 2月, 2010 1 次提交
  12. 26 2月, 2010 1 次提交
    • C
      remote: Improve daemon startup error reporting · 67b2eb10
      Cole Robinson 提交于
      If I toggle enable_tcp in libvirtd.conf and add --listen in
      /etc/init.d/libvirtd, I get the unhelpful error:
      
      Starting libvirtd daemon: error: Unable to initialize network sockets.
      
      Running without --daemon provides much more useful info:
      
      sudo libvirtd --listen
      11:29:26.117: error : remoteCheckCertFile:270 : Cannot access CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
      
      The daemon architecture makes it difficult to report this useful
      info if daemonized, so point users to /var/log/messages and
      dropping the --daemon flag if they want more info.
      67b2eb10
  13. 09 2月, 2010 2 次提交
  14. 02 2月, 2010 1 次提交
  15. 20 1月, 2010 1 次提交
  16. 14 1月, 2010 1 次提交
    • 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
  17. 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
  18. 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
  19. 15 12月, 2009 1 次提交
  20. 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
  21. 27 11月, 2009 1 次提交
  22. 13 11月, 2009 2 次提交
    • 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
      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
  23. 12 11月, 2009 1 次提交
    • 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
  24. 11 11月, 2009 1 次提交
  25. 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
  26. 03 11月, 2009 6 次提交
    • 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
  27. 27 10月, 2009 1 次提交
  28. 26 10月, 2009 1 次提交