- 10 11月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 04 11月, 2009 2 次提交
-
-
由 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.
-
由 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
-
- 03 11月, 2009 7 次提交
-
-
由 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.
-
由 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
-
由 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
-
由 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
-
由 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
-
由 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
-
由 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()
-
- 27 10月, 2009 1 次提交
-
-
由 Dan Kenigsberg 提交于
-
- 26 10月, 2009 3 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
(original patch from Charles Duffy) Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 10月, 2009 1 次提交
-
-
由 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
-
- 09 10月, 2009 1 次提交
-
-
由 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
-
- 08 10月, 2009 1 次提交
-
-
由 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
-
- 06 10月, 2009 1 次提交
-
-
由 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
-
- 05 10月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* daemon/libvirtd.logrotate.in: change to weekly rotation of logs, keep a month worth of data and also extend to cover LXC and UML domain logs
-
- 02 10月, 2009 2 次提交
-
-
由 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
-
由 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>
-
- 30 9月, 2009 5 次提交
-
-
由 Chris Lalancette 提交于
This is necessary for the dispatch functions to be able to use streams in the future. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
Right now, the stream stuff assumes that a stream is always going to be used for transmit. This is not the case, and in fact doesn't work with the tunnelled migration stuff. Add a flag to remoteClientStream() to allow it to do RX only. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Matthias Bolte 提交于
The actual type of size_t is architecture dependent. Because the len parameter is used as unsigned int in remoteSendStreamData(), change its type to unsigned int. * daemon/dispatch.[ch]: change size_t to unsigned int for remoteSendStreamData()
-
由 Matthias Bolte 提交于
Commit 47cab734 changed the way how qemud_client_message objects were reused. Before this commit remoteDispatchClientRequest() reused the received message for normal responses and to report non-fatal errors. If a fatal error occurred qemudWorker() frees the message. After this commit non-fatal errors are reported by remoteSerializeReplyError() using a new qemud_client_message object and the original message leaks. To fix this leak the original message has to be freed if remoteSerializeReplyError() succeeds. If remoteSerializeReplyError() fails the original message is freed in qemudWorker(). * daemon/dispatch.c: free qemud_client_message objects that will not be reused and would leak otherwise, also free the allocated qemud_client_message object in remoteSerializeError() if an error occurs
-
- 29 9月, 2009 4 次提交
-
-
由 Daniel P. Berrange 提交于
When using VNC for graphics + keyboard + mouse, we shouldn't then use the host OS for audio. Audio should go back over VNC. When using SDL for graphics, we should use the host OS for audio since that's where the display is. We need to allow certain QEMU env variables to be passed through to guest too to allow choice of QEMU audio backend. * qemud/libvirtd.sysconf: Mention QEMU/SDL audio env vars * src/qemu_conf.c: Passthrough QEMU/SDL audio env for SDL display, disable host audio for VNC display
-
由 Daniel P. Berrange 提交于
* daemon/dispatch.c: Set streamTX flag on outgoing data packets * daemon/qemud.h: Add streamTX flag to track outgoing data * daemon/qemud.c: Re-enable further TX when outgoing data packet has been fully sent. * daemon/stream.h, daemon/stream.c: Add method for enabling TX. Support reading from streams and transmitting data out to client
-
由 Daniel P. Berrange 提交于
* daemon/stream.c: Handle incoming stream data packets, queuing until stream becomes writable. Handle stream completion handshake * po/POTFILES.in: Add daemon/stream.c
-
由 Daniel P. Berrange 提交于
Defines the extensions to the remote protocol for generic data streams. Adds a bunch of helper code to the libvirtd daemon for working with data streams. * daemon/Makefile.am: Add stream.c/stream.h to build * daemon/stream.c, qemud/stream.h: Generic helper functions for creating new streams, associating streams with clients, finding existing streams for a client and removing/deleting streams. * src/remote/remote_protocol.x: Add a new 'REMOTE_STREAM' constant for the 'enum remote_message_type' for encoding stream data in wire messages. Add a new 'REMOTE_CONTINUE' constant to 'enum remote_message_status' to indicate further data stream messsages are expected to follow. Document how the remote_message_header is used to encode data streams * src/remote/remote_protocol.h: Regenerate * daemon/dispatch.c: Remove assumption that a error message sent to client is always type=REMOTE_REPLY. It may now also be type=REMOTE_STREAM. Add convenient method for sending outgoing stream data packets. Log and ignore non-filtered incoming stream packets. Add a method for serializing a stream error message * daemon/dispatch.h: Add API for serializing stream errors and sending stream data packets * daemon/qemud.h: Add struct qemud_client_stream for tracking active data streams for clients. Tweak filter function operation so that it accepts a client object too. * daemon/qemud.c: Refactor code for free'ing message objects which have been fully transmitted into separate method. Release all active streams when client shuts down. Change filter function to be responsible for queueing the message
-
- 23 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 22 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 9月, 2009 8 次提交
-
-
由 Daniel P. Berrange 提交于
When making changes to the remote protocol, src/ is always built first, so rpcgen should live there, to avoid having to run make in the 'daemon/' directory before building src/ * src/Makefile.am: Add rules for rpcgen, and drop -I../daemon from remote client build * daemon/Makefile.am: Add -I../src/remote/ to libvirtd build and remove rpcgen rules * daemon/libvirtd.c: Adapt include of remote_driver.h taking into account new -I flag * daemon/remote_protocol.c, daemon/remote_protocol.h, daemon/remote_protocol.x: Move to src/remote/ * daemon/rpcgen_fix.pl: Move to src/remote/rpcgen_fix.pl
-
由 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
-
由 Daniel P. Berrange 提交于
* src/capabilities.c, src/capabilities.h, src/domain_conf.c, src/domain_conf.h, src/domain_event.c, src/domain_event.h, src/interface_conf.c, src/interface_conf.h, src/network_conf.c, src/network_conf.h, src/node_device_conf.c, src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h, src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c, src/storage_encryption_conf.h: Move to src/conf/ * src/Makefile.am: Add -Isrc/conf to the individual build targets which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS and SELINUX_CFLAGS from global INCLUDES and only have them in build targets which actually need them. Create a libvirt_conf.la convenience library for all config parsers * src/hostusb.h: Remove bogus include of domain_conf.h * tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src since it never has any generated header files * daemon/Makefile.am: Add -Isrc/conf * proxy/Makefile.am: Add -Isrc/conf and cope with renamed files * src/hash.c: Remove bogus include of libxml/threads.h
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c: Rename to daemon/libvirtd.c * daemon/qemud.h: Rename to daemon/libvirtd.h * daemon/Makefile.am, daemon/dispatch.h, daemon/mdns.c, daemon/remote.h: Update for renamed libvirtd.h file
-
由 Daniel P. Berrange 提交于
* daemon/default-network.xml: Move to src/network/default.xml * daemon/libvirtd_qemu.aug, daemon/test_libvirtd_qemu.aug: Move to src/qemu/ * src/qemu.conf: Move to src/qemu/qemu.conf * daemon/Makefile.am: Remove rules for default-nmetwork.xml and libvirtd_qemu.aug and test_libvirtd_qemu.aug. Fix typo in uninstall-local that would install polkit again. * src/Makefile.am: Add rules for installing network/default.xml and the qemu/*.aug files. Add test case for QEMU augeas files. Add uninstall-local rule for files/directories created during install. Rename install-exec-local to install-data-local. Only install qemu.conf if WITH_QEMU is set. * tests/networkschematest: Update for XML location move
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/secret_driver.c, src/secret_driver.h: Move to src/secret/
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/interface_driver.c: Rename to src/interface/netcf_driver.c * src/interface_driver.h: Rename to src/interface/netcf_driver.h
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/network_driver.c: Rename to src/network/bridge_driver.c * src/network_driver.h: Rename to src/network/bridge_driver.h
-