Commit Graph

76 Commits

Author SHA1 Message Date
Daniel Veillard
5af3ccc8f8 * qemud/protocol.h src/internal.h: applied patch from Jim Meyering
removing global variables (using named enum instead).
Daniel
2007-03-19 14:18:05 +00:00
Daniel Veillard
9e170a88cd * qemud/conf.c qemud/driver.h qemud/internal.h src/internal.h
src/sexpr.h src/test.c src/xm_internal.c src/xml.c src/xml.h:
  applied patch from Richard Jones adding check to printf-like
  functions and fixing the problems raised
Daniel
2007-03-16 15:03:21 +00:00
Daniel P. Berrange
33134578b3 Fixed two bugs in QEMU impl of capabilities call 2007-03-15 18:23:00 +00:00
Daniel Veillard
d3d6ea5a80 Oops forgot them, daniel 2007-03-15 17:30:04 +00:00
Daniel Veillard
635ae38979 * include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
  qemud/dispatch.c qemud/internal.h qemud/protocol.h
  src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
  src/test.c src/virsh.c src/virterror.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xm_internal.c
  src/xml.h src/xs_internal.c: applied patch from Richard Jones
  adding virConnectGetCapabilities(), plus various small little
  fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
2007-03-15 17:24:56 +00:00
Daniel P. Berrange
a534de5281 Improve support for virtual networking 2007-03-13 22:43:22 +00:00
Daniel P. Berrange
a274fe6574 Generate random UUID for network config 2007-03-12 14:10:14 +00:00
Daniel P. Berrange
03d48a87ed Fix double free in XML parsing 2007-03-09 03:08:34 +00:00
Daniel P. Berrange
aeccfe85be Make sure to create system socket directory 2007-03-08 23:31:28 +00:00
Daniel P. Berrange
8ebe070edc Don't try to create default.xml autostart link if it already exists 2007-03-08 14:00:00 +00:00
Mark McLoughlin
60796a554b Wed Mar 07 11:53:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/default-network.xml: add a default network

        * qemud/Makefile.am: install it, and the autostart symlink

        * libvirt.spec.in: update
2007-03-07 11:54:29 +00:00
Daniel P. Berrange
8cb208cd57 Fixed unlink of readonly mode socket 2007-03-06 16:51:48 +00:00
Daniel P. Berrange
b5dfaef4dc Wait for monitor at startup 2007-03-05 17:15:20 +00:00
Mark McLoughlin
868bcd72c7 Mon Mar 05 16:39:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't try and listen to a null socket
        path when run as a session daemon. Noticed by Rich Jones
2007-03-05 16:40:34 +00:00
Mark McLoughlin
7911e22ef7 Mon Mar 05 11:33:18 IST 2007 Mark McLoughlin <markmc@redhat.com:
* qemud/driver.c: fix a couple of invalid free() calls
2007-03-05 12:34:27 +00:00
Mark McLoughlin
51d5609843 Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <markmc@redhat.com>
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
        GNOME but with a few more flags we'd been using.

        * configure.in: use that instead of setting CFLAGS
        directly.

        * proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am,
          src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
2007-03-01 16:18:55 +00:00
Mark McLoughlin
35f911c815 Mon Feb 26 15:33:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/uuid.[ch]: move qemudParseUUID()
        into uuid.c
2007-02-26 15:34:24 +00:00
Mark McLoughlin
bce1d26ef3 Mon Feb 26 15:31:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/uuid.[ch]: add uuid generation code

        * qemud/Makefile.am: build it

        * qemud/conf.c: generate a UUID if not specified in the XML
2007-02-26 15:32:27 +00:00
Mark McLoughlin
d76f6b54a5 Mon Feb 26 15:20:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: qemudAutostartConfigs(): print the detailed
        error message from a guest/network autostart failure.
2007-02-26 15:21:38 +00:00
Mark McLoughlin
e0952bad01 Mon Feb 26 14:20:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: check for malloc failure in GenerateXML()
        and GenerateNetworkXML()

        * qemud/driver.c: free the XML output after returning it
        from the DumpXML() commands.
2007-02-26 14:21:21 +00:00
Daniel P. Berrange
73048102c0 Autodetect QEMU version and adjust command line arg accordingly 2007-02-23 17:15:18 +00:00
Daniel P. Berrange
66a55a4d48 Added init script to RPM. Fixup paths to init script & libvirt_qemud 2007-02-23 15:53:56 +00:00
Mark McLoughlin
fb9f90c942 Fri Feb 23 14:32:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't load config files unless they have
        a ".xml" suffix, e.g. backup files ... we spew a warning
        later if we do.
2007-02-23 14:33:37 +00:00
Mark McLoughlin
fbcd25d3a7 Fri Feb 23 12:49:11 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/libvirtd.in: add init script for libvirt_qemud

        * qemud/Makefile.am: install it unless we were configured
        with --with-init-scripts=none

        * configure.in: add --with-init-scripts to allow us
        have different flavour init scripts
2007-02-23 12:50:58 +00:00
Mark McLoughlin
d758313d67 Fri Feb 23 12:46:44 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: add --pid-file and default to writing
        out a PID file to /var/run/libvirt_qemud.pid in daemon
        mode.

        * configure.in: add --with-pid-file arg
2007-02-23 12:48:36 +00:00
Mark McLoughlin
cf0e5df048 Fri Feb 23 12:45:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/Makefile.am: install libvirt_qemud in /usr/sbin
        instead of /usr/libexec

        * src/Makefile.am, src/qemu_internal.c: pass the correct
        path to libvirt
2007-02-23 12:46:35 +00:00
Mark McLoughlin
91e461ffdd Fri Feb 23 09:11:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: actually autostart guests/networks at startup
        as appropriate.
2007-02-23 09:11:52 +00:00
Mark McLoughlin
08cfcae91b Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h: put the config directory paths in
        an array in order to make them easier to initialize,
        but still expose pointers to each of them as members
        in the server struct.

        * qemud/qemud.c: cleanup the config directory path
        initialization.
2007-02-23 09:10:28 +00:00
Mark McLoughlin
56d2857f95 Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.c: maintain the autostart flag on disk
        using symlinks from the "autostart" directories to
        the corresponding config files.

        * qemud/internal.h: add paths to the autostart links
        to the vm/network structures and paths to the autostart
        dirs to the server struct.

        * qemud/qemud.c: initialize the server autostart dir
        patches.

        * qemud/conf.h: expose qemudEnsureDir()

        * qemud/conf.c: check the autostart symlinks when
        loading config files at startup.
2007-02-23 09:07:41 +00:00
Mark McLoughlin
efe538b709 Fri Feb 23 09:00:13 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/protocol.h: add the (domain/network)(Get/Set)Autostart
        requests and replies to the protocol.

        * src/qemu_internal.c: hookup the qemu driver autostart
        methods

        * qemud/dispatch.c, qemud/driver.[ch], internal.h: add
        the daemon side, but just set an in-memory autostart
        flag for now.
2007-02-23 09:03:25 +00:00
Mark McLoughlin
d954480892 Fri Feb 23 08:41:34 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch]: significantly re-factor qemudLoadConfigXML()
        so that "parse the XML", "assign the def to a VM" and
        "save the XML" operations are in separate functions.
        Add qemudRemoveInactiveVM() and qemudRemoveInactiveNetwork().
        Report errors when loading config files at startup. Check
        that a domain/network's name matches the config filename.

        * qemud/driver.c: update the Create() and Define() functions
        to explicitly parse/assign/save. Also, fix bug where if
        Create() failed, we would free the VM without removing it
        from the inactive list.

        * qemud/qemud.c: use qemudRemoveInactiveVM/Network()
2007-02-23 08:48:02 +00:00
Mark McLoughlin
593d20d400 Fri Feb 23 08:40:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.[ch], qemud/dispatch.c: fix the fact that
        qemudDispatchDomainStart() doesn't report an error if the uuid
        lookup fails and also move the uuid lookup into the driver
        so that it matches the way we do Destroy().
2007-02-23 08:41:23 +00:00
Mark McLoughlin
6ecd4045aa Fri Feb 22 08:37:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/driver.c, qemud/internal.h,
        qemud/qemud.c: Merge the ->activevms and ->inactivevms
        into a single ->vms list in order to make things
        easier to manage. Likewise for networks. Also add
        qemudIsActiveVM() and qemudIsActiveNetwork() inline
        functions.
2007-02-23 08:39:49 +00:00
Mark McLoughlin
68f1003652 Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix another xml property leak.
2007-02-22 10:39:38 +00:00
Mark McLoughlin
5687da2c7a Tue Feb 20 19:08:58 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: use strerror(errno) in some error messages
        to make them a bit more useful
2007-02-20 19:09:44 +00:00
Mark McLoughlin
4579467783 Fri Feb 20 19:07:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't free active networks/vms if we
        fail to save the new config
2007-02-20 19:08:09 +00:00
Mark McLoughlin
1e20b80a91 Fri Feb 20 17:49:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
Fix a few leaks

        * qemud/qemud.c: qemudCleanup(): free the socket
        structures

        * qemud/conf.c: fix various leaks in the xml parsing

        * qemud/iptables.c: fix a typo causing a leak
2007-02-20 17:51:41 +00:00
Mark McLoughlin
c5b3181ad9 Fri Feb 20 16:49:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/qemud.c: only create config dirs
        when actually trying to write out config.
2007-02-20 16:55:56 +00:00
Mark McLoughlin
5ed716484e Fri Feb 20 09:56:35 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: change the fix for the alignment warning
        a little.
2007-02-20 09:57:47 +00:00
Mark McLoughlin
28a07e4c80 Fri Feb 20 09:03:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
        so as to coalesce the two "system vs. user" code paths and
        fix up some problems noticed by dan.
2007-02-20 09:04:27 +00:00
Mark McLoughlin
96b89415a3 Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't shutdown guest and networks on
        SIGHUP
2007-02-19 17:00:05 +00:00
Mark McLoughlin
272639aaac Fri Feb 19 16:58:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: handle SIGQUIT.
2007-02-19 16:59:15 +00:00
Daniel P. Berrange
10041b979d Fixed data type casts to address endianness issues on ia64 2007-02-19 15:01:20 +00:00
Mark McLoughlin
cfa655f9b8 Fri Feb 16 18:28:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/dispatch.c, qemud/internal.h
        qemud/conf.c, qemud/driver.c, configure.in: add a
        qemudLog() function which uses syslog() if we're in daemon
        mode, doesn't output INFO/DEBUG messages unless the
        verbose flag is set and doesn't output DEBUG messages
        unless compiled with --enable-debug. Also, make a first
        pass through fatal errors and add error messages for them.
2007-02-16 18:30:55 +00:00
Mark McLoughlin
49fe28206a Fri Feb 16 18:26:55 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h, qemud/qemud.c: improve signal handling
        and handle SIGHUP by shutting down all guests and networks
        and re-loading configs, and handle SIGINT and SIGTERM
        by shutting down cleanly.
2007-02-16 18:28:17 +00:00
Mark McLoughlin
49dcc264e5 Fri Feb 16 18:24:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/bridge.c, qemud/iptables.c: fix
	our FD_CLOEXEC usage so that all fds which should be
	closed on exec are marked as such and that we leave
	exec() to do the actual closing.
2007-02-16 18:26:18 +00:00
Mark McLoughlin
80820ec7a9 Fri Feb 16 18:23:15 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: fix qemudEnableIpForwarding() to not leak
        an fd if writing to /proc/sys/net/ipv4/ip_forward fails.
2007-02-16 18:24:14 +00:00
Daniel P. Berrange
9d0fa40919 Remove mistaken includes for gnutls 2007-02-16 15:44:08 +00:00
Mark McLoughlin
fb387cbe27 Thu Feb 15 19:07:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix <interface type='network'> output
2007-02-15 19:08:08 +00:00
Mark McLoughlin
e8f064000d Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix the <graphics> output - we weren't
        handling sdl
2007-02-15 19:07:06 +00:00