Decode incoming request header before invoking dispatch code
Separate the decoding of incoming request header out from the
dispatch code. This will allow later code to making dispatcher
routing decisions based on the header field data.
* qemud/dispatch.c, qemud/dispatch.h: Add remoteDecodeClientMessageHeader
API for decoding the header of a client message. Update the
remoteDispatchClientRequest method to assume a pre-decoded
header.
* qemud/qemud.h: Include a 'remote_message_header' field in
'struct qemud_client_message' for pre-decoded header data
* qemud/qemud.c: Decode the incoming client message header before
invoking remoteDispatchClientRequest
Paolo Bonzini [Thu, 16 Jul 2009 14:40:08 +0000 (16:40 +0200)]
add cd and pwd commands to virsh
* src/virsh.c: adds cd and pwd commands to virsh useful for save and
restore commands
* docs/virsh.pod virsh.1: update the documentation
* AUTHORS: add Paolo Bonzini
Jim Meyering [Thu, 16 Jul 2009 07:06:58 +0000 (09:06 +0200)]
make "make syntax-check" consistent with "git diff --check"
This makes "make syntax-check" fail when a version-controlled
file contains a trailing blank line.
* cfg.mk (sc_prohibit_trailing_blank_lines): New rule.
Jim Meyering [Thu, 16 Jul 2009 06:25:36 +0000 (08:25 +0200)]
remove all trailing blank lines
by running this command:
git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
This is in preparation for a more strict make syntax-check
rule that will detect trailing blank lines.
Allow autostart of libvirtd to be disabled with LIBVIRT_AUTOSTART=0
* src/remote_internal.c: Disable libvirtd autostart if the
LIBVIRT_AUTOSTART=0 env variable is set
* src/libvirt.c: Document environment variables can impact
the virConnectOpen API
Daniel Veillard [Wed, 15 Jul 2009 17:50:34 +0000 (19:50 +0200)]
netcf XML validation and input and output tests
* tests/interfaceschematest: test all XML data against the interface
schemas
* tests/interfacexml2xmltest.c: parse and reserialize all XML data
and check the output is identical
* tests/Makefile.am: hook up the tests
* tests/.gitignore: add ignore test
Daniel Veillard [Wed, 15 Jul 2009 17:37:20 +0000 (19:37 +0200)]
Add netcf XML schemas and test data
* docs/schemas/interface.rng: schemas for the interface XML files
directly imported from netcf-0.1.0
* tests/interfaceschemadata/*.xml: set of test files from netcf-0.1.0
changed to use single quote instead of double quote
Daniel Veillard [Wed, 15 Jul 2009 17:34:04 +0000 (19:34 +0200)]
add support for netcf XML import and export
* src/interface_conf.c src/interface_conf.h: the import and export
routines and the internal APIs
* src/Makefile.am: hook the new file in the makefiles
* src/libvirt_private.syms: export a few private symbols internally
* po/POTFILES.in: the new file contains translatable strings
Fix error reporting for security driver over remote protocol
* qemud/remote.c: Send back the actual libvirt connection error
rather than formatting a generic error for security driver
methods
* src/libvirt.c: Fix virDomainGetSecurityLabel, and
virNodeGetSecurityModel to correctly set the error on
the virConnectPtr object, and raise a full error rather
than warning when not supported
* docs/bugs.html[.in]: general tickets are under the 'Virtualization
Tools' product category and Fedora specific tickets are under the
'Fedora' product category.
Fix docs and code disagreements for character devices.
The 'pipe' character type wasn't documented.
TCP uses a <protocol> element, not <wire>
We weren't doing strict validation for protocol and source mode values.
Jim Meyering [Fri, 10 Jul 2009 08:01:04 +0000 (10:01 +0200)]
build: automatically rerun ./bootstrap when needed
When "git pull" (or any other operation) brings in a new version of the
gnulib git submodule, you must rerun the autogen.sh script. With this
change, "make" now fails and tells you to run ./autogen.sh, when needed.
* autogen.sh: Maintain a new file, .git-module-status, containing
the current submodule status. If it doesn't exist or its content
is different from what "git submodule status" prints, then run
./bootstrap
* .gitignore: Add .git-module-status
* cfg.mk: Diagnose out of date submodule and fail.
* README-hacking: Update not to mention bootstrap.
* Makefile.am (MAINTAINERCLEANFILES): Add .git-module-status,
so that "make maintainerclean" will remove it.
Mark McLoughlin [Fri, 10 Jul 2009 08:33:34 +0000 (09:33 +0100)]
Use virDomainChrTypeFromString() instead of open coding
* src/domain_conf.c: replace open coded chr type parsing with
virDomainChrTypeFromString(), retaining the existing semantics
where unknown types are silently mapped to the "null" type and
"pty" is used if none is specified
Mark McLoughlin [Thu, 9 Jul 2009 17:33:40 +0000 (18:33 +0100)]
Switch to using a unix socket for the qemu monitor
We keep support for the pty based monitor so that we can re-connect
to VMs started by older versions of libvirtd.
* src/domain_conf.c: handle formatting and parsing unix monitors
* src/qemu_driver.c: add qemudOpenMonitorUnix(), remove the monitor
pty path searching from qemudFindCharDevicePTYs(), switch
qemudStartVMDaemon() and qemuDomainXMLToNative() to using a unix
monitor
* tests/qemuxml2argvtest.c: switch to using a unix monitor
* tests/qemuxml2argvdata/qemuxml2argv-*.args: update test data
Mark McLoughlin [Thu, 9 Jul 2009 15:02:19 +0000 (16:02 +0100)]
Don't leak vm->monitorpath on re-connect
* src/qemu_driver.c: vm->monitorpath is already initialized in the case
of re-connect, so move the initialization for the normal startup case
out of the common code
Jim Meyering [Wed, 8 Jul 2009 06:54:25 +0000 (08:54 +0200)]
generate ChangeLog from git logs into distribution tarball
No longer maintain a version-controlled ChangeLog file, but do
continue to include a ChangeLog file in distribution tarball.
* Makefile.am (gen-ChangeLog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Add ChangeLog-old.
* bootstrap (modules): Add gitlog-to-changelog.
* ChangeLog: Remove file. Renamed to...
* ChangeLog-old: ...this. New file.
* autogen.sh: Touch ChangeLog, to ensure it exists. For automake.
Jim Meyering [Tue, 7 Jul 2009 16:08:45 +0000 (18:08 +0200)]
use gnumakefile and maintainer-makefile modules from gnulib
* bootstrap (modules): Add gnumakefile and maintainer-makefile.
* GNUmakefile: Remove file, now provided by gnulib.
* Makefile.maint: Remove. Replaced by maint.mk from gnulib.
.gitignore: Add GNUmakefile and maint.mk.
* cfg.mk (prev_version_file): Disable this feature.
Setting this to /dev/null avoids an otherwise harmless diagnostic.
Jim Meyering [Tue, 7 Jul 2009 09:22:52 +0000 (11:22 +0200)]
make .gnulib a submodule
This makes it so we record (via a git submodule)
a snapshot of whatever version of gnulib we're using,
and none of gnulib sources are in the libvirt repository.
The result is that we have as much reproducibility as when
we version-controlled imported copies of the gnulib sources,
but without the hassle of the manual process we used when
syncing with upstream.
Note that when you clone libvirt, you get only the libvirt
repository, but when you first run ./bootstrap, it clones
gnulib (at the SHA1 recorded via the submodule), creating
the .gnulib/ hierarchy. Then, the bootstrap script runs
gnulib-tool to populate gnulib/ with the files that make
up the selected modules.
Put the following in your ~/.gitconfig file.
[alias]
syncsub = submodule foreach git pull origin master
The update procedure is simple:
git syncsub
...build & test...
git commit -m 'gnulib: sync submodule to latest' .gnulib
* .gitmodules: New file.
* .gnulib: Initialize.
* bootstrap: Set up to use the new submodule.
Stop using --no-vc-files.
Don't remove .gitignore files.
Don't use or create .cvsignore.
Diagnose an invalid --gnulib-srcdir=DIR argument.
* build-aux/vc-list-files: Delete file, now pulled from gnulib.
* build-aux/useless-if-before-free: Likewise.
* po/POTFILES.in: Remove gnulib/lib/gai_strerror.c, since
it no longer contains translatable strings.
* gnulib/*: Remove gnulib/ hierarchy.
Jim Meyering [Mon, 6 Jul 2009 16:28:10 +0000 (18:28 +0200)]
Prepare to use maint.mk from gnulib
Since Makefile.maint will soon come from gnulib's maint.mk,
sync Makefile.maint to have the same contents (modulo minor
things). In syncing it, we have to remove some libvirt-specific
rules. Since we want to keep them (of course), put those in cfg.mk.
* Makefile.maint: Merge from gnulib's maint.mk.
* cfg.mk (sc_avoid_write): New rule. From Makefile.cfg.
(sc_prohibit_strcmp_and_strncmp): Likewise, and rename.
(sc_prohibit_asprintf, sc_prohibit_VIR_ERR_NO_MEMORY): Likewise.
(sc_prohibit_nonreentrant): Likewise.
(sc_prohibit_ctype_h): Likewise.
(sc_TAB_in_indentation, sc_avoid_ctype_macros): Likewise.
(sc_prohibit_virBufferAdd_with_string_literal): Likewise.
(sc_prohibit_gethostby): Likewise.
(sc_libvirt_unmarked_diagnostics): Likewise. Also, rename the
rule, inserting "_libvirt", since this rule is a specialization of
the one in gnulib.
* GNUmakefile: Include cfg.mk, not Makefile.cfg
* .x-sc_prohibit_strcmp_and_strncmp: New file.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp_and_strncmp
Jim Meyering [Wed, 8 Jul 2009 09:51:59 +0000 (11:51 +0200)]
use automake-1.11's silent-rules option, when possible
Don't use mylibtool, (subsumed by automake's silent rules)
Its use was causing a non-srcdir build to fail.
* Makefile.am (EXTRA_DIST): Remove mylibtool.
* configure.in: Don't use mylibtool.
* configure.in: Use AM_SILENT_RULES([yes]),
but only if that m4 macro is defined.
Thus, it works even on systems that lack automake-1.11.
Daniel Berrange suggested adding the conditional, so that
we don't have a hard requirement on 1.11, e.g., for RHEL5.
Jim Meyering [Wed, 8 Jul 2009 06:35:24 +0000 (08:35 +0200)]
fix another failing "make distcheck" (qemuhelptest)
It failed in a non-srcdir build because those 5 sample output
files were not included in the distribution tarball. Include them.
* tests/Makefile.am (qemuhelpdata, EXTRA_DIST): Include these:
kvm-74, kvm-86, qemu-0.10.5, qemu-0.9.1, qemu-kvm-0.10.5.
* src/qemu_conf.c, src/qemu_conf.h: Use -vga or -std-vga
when starting guests if video card is present
* tests/qemuhelptest.c: Change to use constants instead
of hardcoded hex numbers, and add VGA support
* tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args,
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml,
tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml: Add <video>
element for testing graphics adapter
* tests/qemuxml2argvtest.c: Add QEMUD_CMD_FLAG_VGA flag
* tests/qemuxml2xmltest.c: Add missing graphics-vnc-sasl/tls tests
Support <video> tag for defining VGA card properties
* docs/schemas/domain.rng: Define <video> element schema
* src/domain_conf.c, src/domain_conf.h, src/libvirt_private.syms:
Add parsing and formatting for <video> element
Daniel Veillard [Wed, 8 Jul 2009 10:01:35 +0000 (12:01 +0200)]
Report the object name on lookup error
* src/network_driver.c src/node_device.c src/storage_driver.c:
many places in the code reported 'No xxx with matching name" after
a Lookup error without reporting the name used by the failed lookup
Dan Kenigsberg [Mon, 6 Jul 2009 15:05:41 +0000 (17:05 +0200)]
Fix python examples to use read-write conn
* docs/examples/python/domstart.py python/tests/create.py:
The two example were broken as they needed full-access connection
but only opened read-only connections
Daniel Veillard [Fri, 3 Jul 2009 13:15:55 +0000 (13:15 +0000)]
Add support for arm emulation if qemu-system-arm is present
* src/qemu_conf.c: patch from C.J. Adams-Collier adding support
for arm emulation if qemu-system-arm is present
daniel
Daniel Veillard [Thu, 2 Jul 2009 14:02:18 +0000 (14:02 +0000)]
Fix some missing parts in network code and schemas
* docs/schemas/network.rng: fix the network schemas to match
new accepted elements, patch by Satoru SATOH
* src/network_conf.c: fix network driver to save the domain name
in XML if present, patch by Satoru SATOH
* AUTHORS: adding Satoru SATOH
Daniel
Daniel Veillard [Wed, 1 Jul 2009 14:27:24 +0000 (14:27 +0000)]
OpenNebula driver documentation
* docs/drvone.html.in docs/drvone.html docs/drivers.html.in
docs/hvsupport.html.in docs/sitemap.html.in docs/*: added
documentation for OpenNebula driver by Abel Miguez Rodriguez
and regenerated the docs
Daniel
Daniel Veillard [Wed, 1 Jul 2009 13:08:17 +0000 (13:08 +0000)]
Regenerated the documentation and localization files
* src/libvirt.c src/virterror.c: fix some missing comments in public
modules.
* docs/libvirt-api.xml docs/libvirt-refs.xml
docs/devhelp/libvirt-libvirt.html docs/html/libvirt-libvirt.html:
regenerated documentation
* po/*: updated the polish localization and regenerated
Daniel
Daniel Veillard [Wed, 1 Jul 2009 11:21:15 +0000 (11:21 +0000)]
Various logging cleanups in code and doc
* docs/logging.html[.in] qemud/libvirtd.conf qemud/qemud.c
src/logging.[ch]: cleanup the logging code and docs to remove
all references to log level 0, cleanup hardcoded values and add
a default VIR_LOG_DEFAULT value, patch by Amy Griffis
daniel
Daniel Veillard [Wed, 1 Jul 2009 10:42:10 +0000 (10:42 +0000)]
cleanup and small update for OpenNebula
* src/opennebula/one_conf.c src/opennebula/one_driver.c: cleanup
and small update for OpenNebula driver by Abel Miguez Rodriguez
Daniel
Daniel Veillard [Fri, 26 Jun 2009 20:08:07 +0000 (20:08 +0000)]
* src/nodeinfo.c: sometimes libnuma can't handle some topologies,
but those failures should not completely break libvirt, patch
by Dan Berrange, fixes #506590
daniel
Daniel Veillard [Fri, 26 Jun 2009 16:18:59 +0000 (16:18 +0000)]
allow to create storage volumes on disk backend
* src/libvirt_private.syms src/parthelper.c src/storage_backend_disk.c
src/storage_conf.c src/storage_conf.h: allow to create storage
volumes on disk backend, patches by Henrik Persson
* AUTHORS: add Henrik Persson
Daniel
Daniel Veillard [Fri, 26 Jun 2009 15:08:04 +0000 (15:08 +0000)]
big cleanup of the debug configuration option
* src/Makefile.am src/libvirt.c src/libvirt_private.syms src/logging.c
src/logging.h src/util.c src/libvirt_debug.syms: big cleanup of
the debug configuration option and code by Amy Griffis
daniel
Daniel Veillard [Thu, 25 Jun 2009 15:13:25 +0000 (15:13 +0000)]
fix reading of storage pool definitions at startup
* src/storage_conf.c: fix reading of storage pool definitions at startup
patch by Cole Robinson
daniel
Daniel Veillard [Thu, 25 Jun 2009 13:55:58 +0000 (13:55 +0000)]
Fix a couple of state problems
* src/qemu_driver.c: fix a domain state problem after
migration, patch by Federico Simoncelli, fixes #507537
* src/domain_conf.c: fix a transcient domain state problem after
destroy, patch by Federico Simoncelli, fixes #507304
* AUTHORS: add Federico Simoncelli and Javier Fontan
daniel
Daniel Veillard [Wed, 24 Jun 2009 17:32:56 +0000 (17:32 +0000)]
Finish the integration of OpenNebula driver
* configure.in libvirt.spec.in src/Makefile.am
src/opennebula/one_client.[ch] src/opennebula/one_conf.h
src/opennebula/one_driver.[ch] : Finish the integration of OpenNebula,
avoid dependancy on OpenNebula libraries, require xmlrpc-c-devel
and build it by default, based on patch by Javier Fontan and DanB
suggestions
Daniel
Daniel Veillard [Wed, 24 Jun 2009 16:17:10 +0000 (16:17 +0000)]
* src/opennebula/one_conf.c src/opennebula/one_driver.c: fix One
driver compilation issues, patch by Javier Fontan and remove
some tabs in format strings
daniel
Cole Robinson [Mon, 22 Jun 2009 17:19:30 +0000 (17:19 +0000)]
Fix storage handling for custom test driver.
If using a custom test driver, storage pool file parsing was broken, and
storage volume parsing was never implemented. Fix these issues, and add
some examples in docs/
Cole Robinson [Mon, 22 Jun 2009 16:41:34 +0000 (16:41 +0000)]
Refactor storage XML parsing to be consistent with domain/network conf.
The storage driver arranges its parsing routines in a way that make them
difficult to use in the test driver for non-default file parsing. This
refactoring moves things to be consistent with the way domain_conf and
network_conf do things.
Cole Robinson [Mon, 22 Jun 2009 16:39:23 +0000 (16:39 +0000)]
Activate virtual networks initialized in custom test driver.
If specifying a custom test driver, virtual networks were not 'activated'
on driver init. This differs from the behavior of domains and storage pools,
so fix it. Also improve a couple error messages in that area.
Cole Robinson [Mon, 22 Jun 2009 16:37:52 +0000 (16:37 +0000)]
Fix segfault if storage pool has no type attribute (possibly others)
virEnumFromString doesn't check for a NULL string, and will segfault if
passed one. Lots of calling code protects against this, but at least
/pool/@type parsing does not.
Cole Robinson [Mon, 22 Jun 2009 16:33:24 +0000 (16:33 +0000)]
Fix raw storage volume creation for allocation < capacity.
CreateXMLFrom changes accidentally caused all raw volume creation to be
fully allocated (as though allocation == capacity). Fix this.
Also force CreateXMLFrom to maintain the previous behavior: sparseness
should still be maintained since we search for holes when copying, and the
clone behavior hasn't been tested with anything but the broken behavior.
Daniel Veillard [Fri, 19 Jun 2009 12:34:30 +0000 (12:34 +0000)]
extend the configuration parser for VMX syntax
* qemud/qemud.c src/conf.c src/conf.h src/qemu_conf.c src/xen_unified.c
src/xm_internal.c tests/conftest.c tests/xmconfigtest.c: extend
the configuration parser for VMX syntax, patch by Matthias Bolte
Daniel
Cole Robinson [Tue, 16 Jun 2009 15:42:46 +0000 (15:42 +0000)]
Set default emulator in domain_conf.*, rather than the driver.
Rather than numerous instances of:
emulator = vm->def->emulator;
if (!emulator)
emulator = virDomainDefDefaultEmulator(conn, vm->def, driver->caps);
if (!emulator)
return -1;
Set this value at XML parse time in the domain config, so we can depend on
it for all future emulator accesses. There were unchecked accesses in the
qemu driver that were tripping up on this if no emulator was specified in
the XML, see: