aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add logrotate support for libvirtd.logDaniel Veillard2011-03-041-1/+9
| | | | | | As the file may grow quite a bit especially with debug turned on. * daemon/libvirtd.logrotate.in daemon/Makefile.am libvirt.spec.in: add new logrotate file for the daemon log
* build: don't require pod2man for tarball buildsEric Blake2011-02-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Right now, 'man libvirtd' includes information that depends on configure results, so it must be generated on the fly and live in $(builddir); however, requiring pod2man on all end user machines is overkill. Meanwhile, 'man virsh' doesn't mention any configure results, so it can be built at 'make dist' time. If that situation changes in the future, we can generate virsh.1 in the same way that we generate libvirtd.8. * daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in advance of distribution. (libvirtd.8): Use only sed from tarball. (EXTRA_DIST): Ship new file. (libvirtd.pod): Delete unused rule. (man8_MANS): Let automake know which section to use. (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files. * tools/Makefile.am (dist_man1_MANS): Distribute pre-built man pages, fine since they don't require any substitution. (virt-xml-validate.1, virt-pki-validate.1): Change input source. (virsh.1): Build into srcdir. (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style. * daemon/.gitignore: Update. Reported by Diego Elio Pettenò.
* qemu: fix augeas support for vnc_auto_unix_socketEric Blake2011-01-281-2/+3
| | | | | | | | | Fixes test failure that was overlooked after commit 1e1f7a8950. * daemon/Makefile.am (check-local): Let 'make check' fail on error. * daemon/test_libvirtd.aug: Move qemu-specific option... * src/qemu/test_libvirtd_qemu.aug: ...into correct test. * src/qemu/libvirtd_qemu.aug: Parse new option.
* maint: avoid space-tabEric Blake2010-12-211-2/+2
| | | | | | | | | | | | | * daemon/Makefile.am: Avoid spurious space before tabs. * src/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * src/datatypes.h (VIR_CONNECT_MAGIC): Likewise. * src/internal.h (TODO): Likewise. * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE): Likewise. * src/xen/xen_hypervisor.c (XEN_V2_OP_GETAVAILHEAP): Likewise. * src/xen/xs_internal.h: Likewise.
* maint: use gnulib configmake rather than open-coding thingsEric Blake2010-11-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bootstrap.conf (gnulib_modules): Add configmake. * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by gnulib. * src/Makefile.am (INCLUDES): Likewise. * tests/Makefile.am (INCLUDES): Likewise. * tools/Makefile.am (virsh_CFLAGS): Likewise. * daemon/libvirtd.c (qemudInitPaths, usage, main): Update clients. * src/cpu/cpu_map.c (CPUMAPFILE): Likewise. * src/driver.c (DEFAULT_DRIVER_DIR): Likewise. * src/internal.h (_): Likewise. * src/libvirt.c (virInitialize): Likewise. * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR): Likewise. * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig): Likewise. * src/network/bridge_driver.c (NETWORK_PID_DIR) (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise. * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup): Likewise. * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise. * src/qemu/qemu_driver.c (qemudStartup): Likewise. * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET) (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE) (LIBVIRT_PKI_DIR): Likewise. * src/secret/secret_driver.c (secretDriverStartup): Likewise. * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/storage_backend_disk.c (PARTHELPER): Likewise. * src/storage/storage_driver.c (storageDriverStartup): Likewise. * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise. * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise. * tools/virsh.c (main): Likewise. * docs/hooks.html.in: Likewise.
* daemon: updates previous 1 line patch for correctnessJustin Clift2010-10-231-1/+1
| | | | | | The previous commit, 880da47a05b9fb8381e79b03ead5dd2d8a6a937a, worked on my system, but wasn't actually correct. This follow up patch corrects it properly.
* daemon: exclude requirement for probes.h on systems without systemtapJustin Clift2010-10-231-1/+1
| | | | | | | This 1-liner was actually written by Eric Blake, over IRC. It addresses a compilation failure in make dist and make rpm for systems without the dtrace/systemtap development libraries installed.
* Add dtrace static probes in libvirtdDaniel P. Berrange2010-10-221-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds initial support for dtrace static probes in libvirtd daemon, assuming use of systemtap dtrace compat shim on Linux. The probes are inserted for network client connect, disconnect, TLS handshake states and authentication protocol states. This can be tested by running the xample program and then attempting to connect with any libvirt client (virsh, virt-manager, etc). # stap examples/systemtap/client.stp Client fd=44 connected readonly=0 Client fd=44 auth polkit deny pid:24997,uid:500 Client fd=44 disconnected Client fd=46 connected readonly=1 Client fd=46 auth sasl allow test Client fd=46 disconnected The libvirtd.stp file should also really not be required, since it is duplicated info that is already available in the main probes.d definition file. A script to autogenerate the .stp file is needed, either in libvirtd tree, or better as part of systemtap itself. * Makefile.am: Add examples/systemtap subdir * autobuild.sh: Disable dtrace for mingw32 * configure.ac: Add check for dtrace * daemon/.gitignore: Ignore generated dtrace probe file * daemon/Makefile.am: Build dtrace probe header & object files * daemon/libvirtd.stp: SystemTAP convenience probeset * daemon/libvirtd.c: Add connect/disconnect & TLS probes * daemon/remote.c: Add SASL and PolicyKit auth probes * daemon/probes.d: Master probe definition * daemon/libvirtd.h: Add convenience macro for probes so that compilation is a no-op when dtrace is not available * examples/systemtap/Makefile.am, examples/systemtap/client.stp Example systemtap script using dtrace probe markers * libvirt.spec.in: Enable dtrace on F13/RHEL6 * mingw32-libvirt.spec.in: Force disable dtrace
* Fix symbol exports & remove duplicated libvirt_util.la linkageDaniel P. Berrange2010-10-191-4/+2
| | | | | | | | | | | | | | | | | | | | | The libvirt_util.la library was mistakenly linked into libvirtd directly. Since libvirt_util.la is already linked to libvirt.so, this resulted in libvirtd getting two copies of the code and more critically 2 copies of static global variables. Testing in turn exposed a issue with loadable modules. The gnulib replacement functions are not exported to loadable modules. Rather than trying to figure out the name sof all gnulib functions & export them, just linkage all loadable modules against libgnu.la statically. * daemon/Makefile.am: Remove linkage of libvirt_util.la and libvirt_driver.la * src/Makefile.am: Link driver modules against libgnu.la * src/libvirt.c: Don't try to load modules which were compiled out * src/libvirt_private.syms: Export all other internal symbols that are required by drivers
* Fix dependancies for remote generated filesDaniel P. Berrange2010-09-101-8/+11
| | | | | | | | | | Very occasionally during a parallel make, dispatch.c would be compiled before the generated remote headers had been fully written. This would cause it to compile an empty union, and result in really wierd runtime bugs that are near impossible to diagnose. * daemon/Makefile.am: Fix remote build deps
* build: Fix permissions of sysconfig filesJiri Denemark2010-09-071-1/+1
|
* Move libvirt-guests init script and config to toolsJiri Denemark2010-08-251-12/+4
| | | | | | | | Since libvirt-guests init script and its configuration do not require libvirtd to be running/installed, it was a bad idea to put them into daemon directory. libvirt.spec even includes these files in libvirt-client subpackage, which may result in build failure for client-only builds when the whole daemon directory is just skipped.
* build-sys: fix build when daemon is disabled by not installing libvirtd.8Diego Elio Pettenò2010-08-061-2/+2
| | | | | | Since the rule to build libvirtd.8 is within the WITH_LIBVIRTD conditional, so declare the man page in there as well. Without this change, build without daemon will fail.
* build: distribute libvirt_qemu.symsEric Blake2010-07-291-0/+4
| | | | | | * src/Makefile.am (EXTRA_DIST): Ensure 'make distcheck' and 'rpmbuild' can reproduce a build. * daemon/Makefile.am (DAEMON_SOURCES): Likewise.
* Qemu remote protocol.Chris Lalancette2010-07-231-7/+25
| | | | | | | | | | | | | | | | | | | | | | | Since we are adding a new "per-hypervisor" protocol, we make it so that the qemu remote protocol uses a new PROTOCOL and PROGRAM number. This allows us to easily distinguish it from the normal REMOTE protocol. This necessitates changing the proc in remote_message_header from a "remote_procedure" to an "unsigned", which should be the same size (and thus preserve the on-wire protocol). Changes since v1: - Fixed up a couple of script problems in remote_generate_stubs.pl - Switch an int flag to a bool in dispatch.c Changes since v2: - None Changes since v3: - Change unsigned proc to signed proc, to conform to spec Signed-off-by: Chris Lalancette <clalance@redhat.com>
* Fix build by removing unknown pod2man flagDaniel P. Berrange2010-07-121-1/+1
| | | | | | | Some versions of pod2man do not support the -u flag, so this can't be used * daemon/Makefile.am: Remove -u flag from pod2man
* libvirtd: add man page for libvirtdJustin Clift2010-07-101-1/+18
| | | | | | | | | With gracious thanks to Chris Lalancette for helping knock the description section into shape. This addresses BZ #595350 https://bugzilla.redhat.com/show_bug.cgi?id=595350
* build: depend on correct fileEric Blake2010-06-011-1/+1
| | | | | | | | | | | Otherwise, VPATH builds fail with: make[1]: *** No rule to make target `libvirt-guests.init', needed by `all'. Regression introduced in commit 482e08a9. * daemon/Makefile.am (%.init): Look in correct place for config.status.
* build: force init scripts to rebuild on changed --prefixEric Blake2010-05-211-1/+1
| | | | | | | | | Otherwise, './configure --prefix=/foo && make && ./configure --prefix=/bar && make' leaves the wrong files in libvirtd.init (/foo instead of /bar). * daemon/Makefile.am (libvirtd.init): Add dependency on config.status. Reported by Cole Robinson.
* Init script for handling guests on shutdown/bootJiri Denemark2010-05-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output during shutdown: Running guests on default URI: console, rhel6-1, rhel5-64 Running guests on lxc:/// URI: lxc-shell Running guests on xen:/// URI: error: no hypervisor driver available for xen:/// error: failed to connect to the hypervisor Running guests on vbox+tcp://orkuz/system URI: no running guests. Suspending guests on default URI... Suspending console: done Suspending rhel6-1: done Suspending rhel5-64: done Suspending guests on lxc:/// URI... Suspending lxc-shell: error: Failed to save domain 9cba8bfb-56f4-6589-2d12-8a58c886dd3b state error: this function is not supported by the hypervisor: virDomainManagedSave Note, the "Suspending $guest: " shows progress during the suspend phase if domjobinfo gives meaningful output. Example output during boot: Resuming guests on default URI... Resuming guest rhel6-1: done Resuming guest rhel5-64: done Resuming guest console: done Resuming guests on lxc:/// URI... Resuming guest lxc-shell: already active Configuration used for generating the examples above: URIS='default lxc:/// xen:/// vbox+tcp://orkuz/system' The script uses /var/lib/libvirt/libvirt-guests files to note all active guest it should try to resume on next boot. It's content looks like: default 7f8b9d93-30e1-f0b9-47a7-cb408482654b 085b4c95-5da2-e8e1-712f-6ea6a4156af2 fb4d8360-5305-df3a-2da1-07d682891b8c lxc:/// 9cba8bfb-56f4-6589-2d12-8a58c886dd3b
* docs: distribute more coding convention documentationEric Blake2010-05-191-0/+1
| | | | | | | | These files may be useful for anyone making modifications to source files in a tarball distribution. * src/Makefile.am (EXTRA_DIST): Add THREADS.txt. * daemon/Makefile.am (EXTRA_DIST): Add THREADING.txt.
* Keep build quiet for generated fileDaniel P. Berrange2010-04-011-14/+14
| | | | | Adds $(AM_V_GEN) to many more manual makefile.am rules that were generating files
* Core driver implementation with ebtables supportStefan Berger2010-03-261-0/+4
| | | | | | | | | | | | | | 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: Stefan Berger <stefanb@us.ibm.com>
* Change logrotate to be per-hypervisor logsDaniel Veillard2010-03-101-7/+26
| | | | | | | | | | | | | | | Having a single logrotate configuration file for all hypervisors did not work as logrotate would get confused if an hypervisor not supported on that platform was still listed. Simplest is to split the logrotate as separate per hypervisor files and change the spec file to only install the ones compiled in. * daemon/libvirtd.lxc.logrotate.in daemon/libvirtd.qemu.logrotate.in daemon/libvirtd.uml.logrotate.in: copy and split the original daemon/libvirtd.logrotate.in file * daemon/Makefile.am: update to support the different files and cleanup in sed suggested by Eric Blake * libvirt.spec.in: only install the relevant logrotate configs * daemon/.gitignore: update logrotate generated list
* The secret driver is stateful, link it directly to libvirtdMatthias Bolte2009-12-231-0/+4
| | | | | | | | | | 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
* Fix --with-init-script configure optionMatthew Booth2009-11-021-2/+2
| | | | | | | * 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.
* Misc win32 build fixesDaniel P. Berrange2009-10-081-0/+3
| | | | | | * 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
* Create /var/log/libvirt/{lxc,uml} dirsMark McLoughlin2009-10-061-0/+2
| | | | | | | | | | | | 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
* Helper functions for processing data streams in libvirtdDaniel P. Berrange2009-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce virStrncpy.Chris Lalancette2009-09-221-1/+2
| | | | | | | | | | | | | | 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: Chris Lalancette <clalance@redhat.com>
* Move remote protocol definition into src/remote/Daniel P. Berrange2009-09-211-43/+13
| | | | | | | | | | | | | | | | 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
* Move all shared utility files to src/util/Daniel P. Berrange2009-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Move all XML configuration handling to src/conf/Daniel P. Berrange2009-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | * 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
* Rename daemon main codeDaniel P. Berrange2009-09-211-1/+1
| | | | | | | * 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
* Move config files to align with driver sourcesDaniel P. Berrange2009-09-211-25/+5
| | | | | | | | | | | | | | | | * 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
* Rename qemud/ directory to daemon/Daniel P. Berrange2009-09-211-0/+294
* qemud/: Rename to daemon/ * Makefile.am, configure.in, src/Makefile.am, src/remote_internal.c, tests/Makefile.am, tests/eventtest.c: s/qemud/daemon/ where needed