]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
15 years agoPublic API for new virInterface functions
Laine Stump [Thu, 16 Jul 2009 15:49:50 +0000 (17:49 +0200)]
Public API for new virInterface functions

* include/libvirt/libvirt.h[.in]: adds signatures for the new exported
  functions virConnectNumOfDefinedInterfaces and
  virConnectListDefinedInterfaces
* src/libvirt_public.syms: export the new symbols

15 years agoFix configure flags in spec file
Daniel Veillard [Thu, 16 Jul 2009 15:28:41 +0000 (17:28 +0200)]
Fix configure flags in spec file

* libvirt.spec.in: we were still using deprecated configure switches

15 years agoRename a bunch of internal methods to clarify their meaning
Daniel P. Berrange [Fri, 10 Jul 2009 16:54:23 +0000 (17:54 +0100)]
Rename a bunch of internal methods to clarify their meaning

This renames a lot of the methods in the remote driver client
to more accurately reflect their responsibility of IO handling
vs message handling.

15 years agoSimplify remote driver error reporting
Daniel P. Berrange [Fri, 10 Jul 2009 16:11:31 +0000 (17:11 +0100)]
Simplify remote driver error reporting

Remove redundant error reporting functions which obscured the
filename/line number reporting. Removed code which created a
virDomain/virNetwork object, since those are silently dropped
in error reporting functions now

* src/remote_internal.c: Remove error() and errorf() in favour of
 macros, and remove server_error in favour of direct call

15 years agoRefactor message sending to allow code reuse for data streams
Daniel P. Berrange [Fri, 10 Jul 2009 15:10:56 +0000 (16:10 +0100)]
Refactor message sending to allow code reuse for data streams

Splits up the 'call' method moving generic IO code out into
separate method to allow it to be easily reused for sending
data streams

* src/remote_internal.c: Split 'call' into two methods, the first
  with same name serializes a set of method arguments into a
  message, the second 'remoteIO' takes a pre-serialized messages,
  sends it and awaits a reply

15 years agoRefactor incoming message handling to prepare for data stream support
Daniel P. Berrange [Fri, 10 Jul 2009 15:03:22 +0000 (16:03 +0100)]
Refactor incoming message handling to prepare for data stream support

* src/remote_internal.c: Rename processCallRecvMsg to
  processCallDispatch, and move code specific to method replies
  into processCallDispatchReply, and rename processCallAsyncEvent
  to processCallDispatchMessage

15 years agoRename 'direction' to 'type' in remote_message_header
Daniel P. Berrange [Fri, 10 Jul 2009 12:02:08 +0000 (13:02 +0100)]
Rename 'direction' to 'type' in remote_message_header

The 'remote_message_header' struct has a mis-leadingly named
field 'direction'. It is really a reflection of the type of
message, and some types can be sent in either direction. Thus
the field is more accurately named 'type'. No function change.

* qemud/remote_protocol.x: Rename 'direction' to 'type' in
  'remote_message_header. Write better docs describing the
  message header field semantics & usage
* qemud/remote_protocol.c, qemud/remote_protocol.h: Regenerate
* qemud/remote.c, qemud/dispatch.c, src/remote_internal.c
  Update to reflect rename of 'direction' to 'type'

15 years agoDefine an API for registering incoming message dispatch filters
Daniel P. Berrange [Fri, 10 Jul 2009 11:58:22 +0000 (12:58 +0100)]
Define an API for registering incoming message dispatch filters

All incoming messages currently get routed to the generic method
remoteDispatchClientRequest() for processing. To allow incoming
data stream messages to bypass this and be routed to a specific
location, a concept of dispatch filters is introduced.

* qemud/qemud.h: Add a qemud_client_filter struct and a callback
  qemud_client_filter_func. Maintain a list of filters on every
  struct qemud_client
* qemud/qemud.c: Move remoteDecodeClientMessageHeader() out of
  qemudWorker() into qemudDispatchClientRead(). Check registered
  message filters in qemudDispatchClientRead() to decide where
  to send incoming messages for dispatch.

15 years agoSplit out code for handling incoming method call messages
Daniel P. Berrange [Fri, 10 Jul 2009 11:53:54 +0000 (12:53 +0100)]
Split out code for handling incoming method call messages

The remoteDispatchClientRequest() method is currently hardwired to
assume there is only one type of incoming message, a method call.
To allow for alternate types of incoming messags, the code that is
specific to method calls is being split into a separate method
remoteDispatchClientCall

* qemud/dispatch.c: Move method call specific code out into
  remoteDispatchClientCall. Add a helper remoteSerializeError
  for returning error messages to client

15 years agoChange the way client event loop watches are managed
Daniel P. Berrange [Fri, 10 Jul 2009 11:48:50 +0000 (12:48 +0100)]
Change the way client event loop watches are managed

The current qemudRegisterClientEvent() code is used both for
registering the initial socket watch, and updating the already
registered watch. This causes unneccessary complexity in alot
of code which only cares about updating existing watches. The
updating of a watch cannot ever fail, nor is a reference to the
'qemud_server' object required.

This introduces a new qemudUpdateClientEvent() method for that
case, allowing the elimination of unneccessary error checking
and removal of the server back-reference in struct qemud_client.

* qemud/qemud.h: Remove 'server' field from struct qemud_client.
  Add qemudUpdateClientEvent() method. Remove 'update' param
  from qemudRegisterClientEvent method
* qemud/dispatch.c, qemud/qemud.c, qemud/remote.c: Update alot
  of code to use qemudUpdateClientEvent() instead of
  qemudRegisterClientEvent(). Move more logic from remoteRelayDomainEvent
  into remoteDispatchDomainEventSend.

15 years agoMove queuing of RPC replies into dispatch code
Daniel P. Berrange [Fri, 10 Jul 2009 11:45:37 +0000 (12:45 +0100)]
Move queuing of RPC replies into dispatch code

This removes an assumption from qemudWorker() code that every
incoming message will generate a reply.

* qemud/dispatch.c: remoteDispatchClientRequest now has responsibility
  for queuing the reply message to the RPC call
* qemud/qemud.c: Do not queue the RPC call reply in qemudWorker(),
  allowing remoteDispatchClientRequest() to take care of it

15 years agoChange code generator to give async event messages their own postfix
Daniel P. Berrange [Fri, 10 Jul 2009 11:38:41 +0000 (12:38 +0100)]
Change code generator to give async event messages their own postfix

The naming convention for structs used in the RPC layer is for
incoming requests to be called XXXX_args, and the associated
outgoing reply to be called XXXX_ret.  Asynchronously emitted
messages (eg events) are re-using the XXXX_ret naming scheme.
This patch changes that such that async messages are XXXX_msg,
and stops adding entries for them in the dispatch table, avoiding
the need for a dummy no-op implementation.

* qemud/remote.c: Remove dummy remoteDispatchDomainEvent, no
  longer required. Update to replace remote_domain_event_ret
  with xdr_remote_domain_event_msg
* qemud/remote_protocol.x: Rename remote_domain_event_ret to
  remote_domain_event_msg
* qemud/remote_generate_stubs.pl: Adding handling for new
  XXX_msg structs.
* src/remote_internal.c: Rename remote_domain_event_ret to
  remote_domain_event_msg
* qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h,
  qemud/remote_dispatch_table.h, qemud/remote_protocol.h,
  qemud/remote_protocol.c: auto-regenerate

15 years agoSeparate code for encoding outgoing remote message headers
Daniel P. Berrange [Fri, 10 Jul 2009 11:31:39 +0000 (12:31 +0100)]
Separate code for encoding outgoing remote message headers

Introduces an API for encoding the header field for outgoing messages
allowing some duplicated code to be eliminated

* qemud/dispatch.c, qemud/dispatch.h: add remoteEncodeClientMessageHeader
  for encoding message header. Update remoteDispatchClientRequest to
  use this method.
* qemud/remote.c: Update remoteDispatchDomainEventSend to use the
  generic remoteEncodeClientMessageHeader() for encoding event
  message hedaders. Push some logic from remoteRelayDomainEvent
  down into remoteDispatchDomainEventSend.

15 years agoDecode incoming request header before invoking dispatch code
Daniel P. Berrange [Fri, 10 Jul 2009 11:26:00 +0000 (12:26 +0100)]
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

15 years agoSplit generic RPC message dispatch code out from remote protocol API handlers
Daniel P. Berrange [Fri, 10 Jul 2009 11:20:03 +0000 (12:20 +0100)]
Split generic RPC message dispatch code out from remote protocol API handlers

* po/POTFILES.in: Add qemud/dispatch.c
* qemud/dispatch.c, qemud/dispatch.h: Generic code handling dispatch of
  RPC messages.
* qemud/Makefile.am: Add dispatch.c to build
* qemud/qemud.c: Include dispatch.h
* qemud/qemud.h: Remove remoteDispatchClientRequest, remoteRelayDomainEvent
  now in dispatch.h
* qemud/remote.c: Remove remoteDispatchClientRequest, remoteRelayDomainEvent
  now in dispatch.c, and dispatch_args, dispatch_ret, dispatch_fn & dispatch_data
  now in remote.h
* qemud/remote.h: Add typedefs for dispatch_args, dispatch_ret,
  dispatch_fn, dispath_data. Add remoteGetDispatchData() API

15 years agoImplement qemu dump capabilities
Paolo Bonzini [Thu, 16 Jul 2009 14:50:23 +0000 (16:50 +0200)]
Implement qemu dump capabilities

* src/qemu_driver.c (qemudDomainCoreDump): New
  (qemuDriver): Add core dump function. The behaviour is similar
  as the current Xen dump

15 years agoadd cd and pwd commands to virsh
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

15 years agomake "make syntax-check" consistent with "git diff --check"
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.

15 years agoremove all trailing blank lines
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.

15 years agoFix free of unitialized data upon PCI open fail
Daniel P. Berrange [Thu, 16 Jul 2009 12:23:32 +0000 (13:23 +0100)]
Fix free of unitialized data upon PCI open fail

15 years agoFix SELinux denial during hotplug
Daniel P. Berrange [Mon, 6 Jul 2009 15:01:55 +0000 (16:01 +0100)]
Fix SELinux denial during hotplug

* src/qemu_driver.c: Relabel disk images *before* running QEMU
hotplug monitor commands

15 years agoFix PCI device hotplug/unplug with newer QEMU
Daniel P. Berrange [Mon, 6 Jul 2009 14:58:55 +0000 (15:58 +0100)]
Fix PCI device hotplug/unplug with newer QEMU

* src/qemu_driver.c: Try new monitor syntax for hotplug first. If
  that fails fallback to old KVM specific syntax

15 years agoFix problem with QEMU monitor welcome prompt confusing libvirt
Daniel P. Berrange [Mon, 6 Jul 2009 14:45:04 +0000 (15:45 +0100)]
Fix problem with QEMU monitor welcome prompt confusing libvirt
after a libvirtd daemon restart with active guests

* src/qemu_driver: Read and dicard pending monitor data
  before issuing new monitor commands.

15 years agoEnsure spawned children have a stderr/out set to /dev/null if requested
Daniel P. Berrange [Mon, 6 Jul 2009 17:43:38 +0000 (18:43 +0100)]
Ensure spawned children have a stderr/out set to /dev/null if requested

15 years agoAllow autostart of libvirtd to be disabled with LIBVIRT_AUTOSTART=0
Daniel P. Berrange [Mon, 6 Jul 2009 17:43:21 +0000 (18:43 +0100)]
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

15 years agonetcf XML validation and input and output tests
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

15 years agoAdd netcf XML schemas and test data
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

15 years agoadd support for netcf XML import and export
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

15 years agoEnsure test:/// URIs get routed to the non-privileged libvirtd
Daniel P. Berrange [Fri, 10 Jul 2009 12:14:23 +0000 (13:14 +0100)]
Ensure test:/// URIs get routed to the non-privileged libvirtd

* src/remote_internal.c: Ensure that all test:/// URIs are dealt
  with by the auto-started, per-user unprivileged libvirtd instances

15 years agoFix error reporting for security driver over remote protocol
Daniel P. Berrange [Wed, 15 Jul 2009 09:36:32 +0000 (10:36 +0100)]
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

15 years agoUpdate the links for RHEL libvirt bugzillas
Garry Dolley [Wed, 15 Jul 2009 09:46:52 +0000 (11:46 +0200)]
Update the links for RHEL libvirt bugzillas

15 years agoUpdate links to bugzilla
Garry Dolley [Mon, 13 Jul 2009 08:31:24 +0000 (10:31 +0200)]
Update links to bugzilla

* docs/bugs.html[.in]: general tickets are under the 'Virtualization
  Tools' product category and Fedora specific tickets are under the
  'Fedora' product category.

15 years agoFix docs and code disagreements for character devices.
Cole Robinson [Wed, 8 Jul 2009 21:59:23 +0000 (17:59 -0400)]
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.

15 years agoqemu: Check driver is initialized up front, to avoid segfault.
Cole Robinson [Wed, 8 Jul 2009 21:59:22 +0000 (17:59 -0400)]
qemu: Check driver is initialized up front, to avoid segfault.

If the qemu_driver was not initialized (possibly due to an error on driver
startup), we can segfault if attempting to connect to the URI.

15 years agobuild: automatically rerun ./bootstrap when needed
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.

15 years agobuild: make autogen.sh use autoreconf -if
Jim Meyering [Fri, 10 Jul 2009 10:06:36 +0000 (12:06 +0200)]
build: make autogen.sh use autoreconf -if

* autogen.sh: Use "autoreconf -if" instead of open-coding it with
manual and unconditional invocation of each separate tool.

15 years agoUse virDomainChrTypeFromString() instead of open coding
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

15 years agoSwitch to using a unix socket for the qemu monitor
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

15 years agoAdd the monitor type to the domain state XML
Mark McLoughlin [Thu, 9 Jul 2009 17:06:38 +0000 (18:06 +0100)]
Add the monitor type to the domain state XML

There are no functional changes in this patch apart from adding the
monitor type to the state XML.

The patch mostly consists of switching to use virDomainChrDef every
where to describe the monitor.

* src/domain_conf.h: replace monitorpath with monitor_chr

* src/domain_conf.c: handle parsing the monitor type and initializing
  monitor chr

* src/qemu_conf.[ch]: make qemudBuildCommandLine take a
  virDomainChrDefPtr and use that to build the -monitor parameter

* src/qemu_driver.c: split pty specific and common code from
  qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr

* tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change

15 years agoMinor qemu monitor coding style fixes
Mark McLoughlin [Thu, 9 Jul 2009 15:28:36 +0000 (16:28 +0100)]
Minor qemu monitor coding style fixes

* src/qemu_driver.c: use a consistent coding style for function
  definitions

15 years agoDon't leak vm->monitorpath on re-connect
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

15 years agobuild: update from gnulib, for latest maint.mk
Jim Meyering [Thu, 9 Jul 2009 18:02:31 +0000 (20:02 +0200)]
build: update from gnulib, for latest maint.mk

* gnulib: Update submodule to latest.
This fixes the make syntax-check failure whereby sc_po_check
would complain about cfg.mk.

15 years agoavoid a "make syntax-check" failure
Jim Meyering [Thu, 9 Jul 2009 18:00:37 +0000 (20:00 +0200)]
avoid a "make syntax-check" failure

* .x-sc_avoid_if_before_free: Ignore *all* ChangeLog files,
now, including ChangeLog-old.

15 years agoFix wierd build problems due to autopoint overwriting gnulib m4
Daniel P. Berrange [Thu, 9 Jul 2009 11:18:14 +0000 (12:18 +0100)]
Fix wierd build problems due to autopoint overwriting gnulib m4

* Makefile.am: List -I m4 first, in ACLOCAL_AMFLAGS
* .gitignore: ignore gnulib/, ChangeLog, *rej, *orig, *#*# (emacs
  temporary files)

15 years agodoc: clone+build instructions
Jim Meyering [Wed, 8 Jul 2009 19:37:59 +0000 (21:37 +0200)]
doc: clone+build instructions

* README-hacking: New file.
* bootstrap: Remove obsolete comments.

15 years agobuild: adjust aclocal's search patch to prefer gnulib's m4 files.
Jim Meyering [Wed, 8 Jul 2009 19:27:41 +0000 (21:27 +0200)]
build: adjust aclocal's search patch to prefer gnulib's m4 files.

* Makefile.am (ACLOCAL_AMFLAGS): Search gnulib/m4/ before m4/.

15 years agogenerate ChangeLog from git logs into distribution tarball
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.

15 years agouse gnumakefile and maintainer-makefile modules from gnulib
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.

15 years agoremove all .cvsignore files
Jim Meyering [Tue, 7 Jul 2009 10:05:18 +0000 (12:05 +0200)]
remove all .cvsignore files

15 years agomake .gnulib a submodule
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.

15 years agoskip some of gnulib's new rules
Jim Meyering [Mon, 6 Jul 2009 17:17:06 +0000 (19:17 +0200)]
skip some of gnulib's new rules

* cfg.mk (local-checks-to-skip): Add these: sc_error_message_uppercase,
sc_program_name, sc_require_test_exit_idiom, sc_makefile_check.

15 years agoPrepare to use maint.mk from gnulib
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

15 years ago* Makefile.cfg: Rename to...
Jim Meyering [Mon, 6 Jul 2009 16:23:44 +0000 (18:23 +0200)]
* Makefile.cfg: Rename to...

* cfg.mk: ...this.  New file.

15 years agouse automake-1.11's silent-rules option, when possible
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.

15 years agofix another failing "make distcheck" (qemuhelptest)
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.

15 years agofix failing "make distcheck"
Jim Meyering [Wed, 8 Jul 2009 06:15:54 +0000 (08:15 +0200)]
fix failing "make distcheck"

* docs/Makefile.am (xml): Distribute testpool.xml and testvol.xml,
which are referenced from testnode.xml.

15 years agoMake it easier to debug tests running programs
Daniel P. Berrange [Mon, 6 Jul 2009 14:03:31 +0000 (15:03 +0100)]
Make it easier to debug tests running programs

* tests/testutils.c: Don't discard stderr when running
external programs during tests

15 years agoSupport <video> element for QEMU guests
Daniel P. Berrange [Mon, 6 Jul 2009 13:59:19 +0000 (14:59 +0100)]
Support <video> element for QEMU guests

* 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

15 years agoSupport <video> tag for defining VGA card properties
Daniel P. Berrange [Mon, 6 Jul 2009 13:54:44 +0000 (14:54 +0100)]
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

15 years agoReport the object name on lookup error
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

15 years agoAdd new net filesystem glusterfs
Harshavardhana [Wed, 8 Jul 2009 09:46:25 +0000 (11:46 +0200)]
Add new net filesystem glusterfs

* src/storage_conf.c src/storage_conf.h: adds glusterfs to the list
  of network storage
* libvirt.spec.in: adds the dependency on glusterfs-client

15 years agoAvoid raising an internal error
Paolo Bonzini [Tue, 7 Jul 2009 14:54:55 +0000 (16:54 +0200)]
Avoid raising an internal error

* src/qemu_conf.c: when connecting an interface if it reference
  an undefined network, then we used to raise an internal error.

15 years agoFix informations about previous git server
Daniel Veillard [Tue, 7 Jul 2009 08:34:55 +0000 (10:34 +0200)]
Fix informations about previous git server

* docs/downloads.html[.in]: update the secton about
the server on git.et.redhat.com based on the plans
Jim posted.

15 years agoFix python examples to use read-write conn
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

15 years agoupdate download informations after switch to git
Daniel Veillard [Mon, 6 Jul 2009 12:27:00 +0000 (14:27 +0200)]
update download informations after switch to git
* docs/downloads.html docs/downloads.html.in: update download
  informations after switch to git
daniel

15 years agoRelease of libvirt-0.6.5
Daniel Veillard [Fri, 3 Jul 2009 14:32:17 +0000 (14:32 +0000)]
Release of libvirt-0.6.5
* configure.in libvirt.spec.in NEWS docs/* po/*: release of
  libvirt-0.6.5
* .gitignore: adding cscope files
Daniel

15 years agoAdd support for arm emulation if qemu-system-arm is present
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

15 years agoSkip labelling if no src path present
Mark McLoughlin [Fri, 3 Jul 2009 10:29:09 +0000 (10:29 +0000)]
Skip labelling if no src path present

Fixes startup of guest's with sourceless cdrom devices.

Patch from Cole Robinson originally posted here:

  https://bugzilla.redhat.com/499569

but never sent upstream.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
15 years agoDon't unnecessarily try to change a file context
Mark McLoughlin [Fri, 3 Jul 2009 10:27:46 +0000 (10:27 +0000)]
Don't unnecessarily try to change a file context

As pointed out by Tim Waugh here:

  https://bugzilla.redhat.com/507555

We shouldn't bother trying to set the context of a file if it already
matches what we want.

(Fixed to use STREQ() and not use tabs, as pointed out by danpb)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
15 years agoRe-label shared and readonly images
Mark McLoughlin [Fri, 3 Jul 2009 10:26:37 +0000 (10:26 +0000)]
Re-label shared and readonly images

This patch was posted ages ago here:

  https://bugzilla.redhat.com/493692

But was never posted upstream AFAICT.

Patch from Dan Berrange

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
15 years agoFix some missing parts in network code and schemas
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

15 years agofix an endless loop in node device XML dump
Daniel Veillard [Wed, 1 Jul 2009 21:30:41 +0000 (21:30 +0000)]
fix an endless loop in node device XML dump
* src/node_device.c: fix an endless loop in node device XML dump,
  patch by Cole Robinson
Daniel

15 years agosmall OpenNebula driver doc update
Daniel Veillard [Wed, 1 Jul 2009 21:24:47 +0000 (21:24 +0000)]
small OpenNebula driver doc update
* docs/drvone.html docs/drvone.html.in: small OpenNebula driver
  doc update by Abel Miguez Rodriguez
daniel

15 years agoOpenNebula driver documentation
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

15 years agoRegenerated the documentation and localization files
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

15 years agoVarious logging cleanups in code and doc
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

15 years agocleanup and small update for OpenNebula
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

15 years agoRemove unused code. Ensure null termination after strncpy in opennebula
Daniel P. Berrange [Wed, 1 Jul 2009 10:40:12 +0000 (10:40 +0000)]
Remove unused code. Ensure null termination after strncpy in opennebula

15 years ago* src/storage_driver.c: don't destroy a pool when calling create
Daniel Veillard [Wed, 1 Jul 2009 08:33:22 +0000 (08:33 +0000)]
* src/storage_driver.c: don't destroy a pool when calling create
  by mistake, patch by Dave Allan.
daniel

15 years agoReduce LXC capabilities
Daniel P. Berrange [Mon, 29 Jun 2009 17:09:42 +0000 (17:09 +0000)]
Reduce LXC capabilities

15 years agoUse libcap-ng to clear capabilities for many child processes
Daniel P. Berrange [Mon, 29 Jun 2009 17:00:52 +0000 (17:00 +0000)]
Use libcap-ng to clear capabilities for many child processes

15 years agoPrepare for using libcap-ng
Daniel P. Berrange [Mon, 29 Jun 2009 11:33:13 +0000 (11:33 +0000)]
Prepare for using libcap-ng

15 years agoAdd HACKING doc to the website
Daniel P. Berrange [Mon, 29 Jun 2009 11:09:17 +0000 (11:09 +0000)]
Add HACKING doc to the website

15 years agoFix crash in QEMU driver with bad capabilities data
Daniel P. Berrange [Mon, 29 Jun 2009 10:41:56 +0000 (10:41 +0000)]
Fix crash in QEMU driver with bad capabilities data

15 years ago* src/parthelper.c: fix a superfluous % on printf format problem
Daniel Veillard [Fri, 26 Jun 2009 20:14:18 +0000 (20:14 +0000)]
* src/parthelper.c: fix a superfluous % on printf format problem
  raised by Matthias Bolte
Daniel

15 years ago* src/nodeinfo.c: sometimes libnuma can't handle some topologies,
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

15 years ago* src/xend_internal.c: avoid a segfault when dumping XML with recent
Daniel Veillard [Fri, 26 Jun 2009 18:14:16 +0000 (18:14 +0000)]
* src/xend_internal.c: avoid a segfault when dumping XML with recent
  xen versions, patch by Sascha, fixes #503254
daniel

15 years agoallow to create storage volumes on disk backend
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

15 years agobig cleanup of the debug configuration option
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

15 years ago* src/node_device.c src/node_device_hal.h src/node_device_hal_linux.c:
Daniel Veillard [Fri, 26 Jun 2009 14:09:01 +0000 (14:09 +0000)]
* src/node_device.c src/node_device_hal.h src/node_device_hal_linux.c:
  fix bogus WWN in NPIV support, patch by David Allan
daniel

15 years agofix reading of storage pool definitions at startup
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

15 years agofix UML driver logging macros
Daniel Veillard [Thu, 25 Jun 2009 15:02:10 +0000 (15:02 +0000)]
fix UML driver logging macros
* src/uml_driver.c: fix UML driver logging macros, patch by Amy Griffis
* AUTHORS: adding Amy Griffis
Daniel

15 years ago* src/node_device_conf.c: fix a leak, patch by Dave Allan
Daniel Veillard [Thu, 25 Jun 2009 14:51:21 +0000 (14:51 +0000)]
* src/node_device_conf.c: fix a leak, patch by Dave Allan
daniel

15 years agoFix a couple of state problems
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

15 years agoFix broken dominfo command when no security driver is implemented
Daniel P. Berrange [Thu, 25 Jun 2009 09:37:22 +0000 (09:37 +0000)]
Fix broken dominfo command when no security driver is implemented

15 years ago* po/*: update a lot of translations, and regenerate the po* files
Daniel Veillard [Wed, 24 Jun 2009 17:42:04 +0000 (17:42 +0000)]
* po/*: update a lot of translations, and regenerate the po* files
daniel

15 years agoFinish the integration of OpenNebula driver
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

15 years ago* src/opennebula/one_conf.c src/opennebula/one_driver.c: fix One
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

15 years agoFix storage handling for custom test driver.
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/

15 years agoRefactor storage XML parsing to be consistent with domain/network conf.
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.