* src/logging.c src/logging.h src/libvirt_private.syms:
define new functions virLogSetFromEnv and virLogParseDefaultPriority
* qemud/qemud.c src/libvirt.c tests/eventtest.c: cleanup to use the
unified functions
* qemud/qemud.c src/logging.[ch]: Similar as for general libvirt, don't
convert high priority levels to debug level. Ignore LIBVIRT_LOG_FILTERS
and LIBVIRT_LOG_OUTPUTS when they're set to the empty string, otherwise
they can override a valid setting from the config file. Send all
settings through the parser functions for validation, so that the
existence of a bad setting doesn't nullify a good setting that should
have applied -- particularly the default output. Keep the order of
precedence consistent for all variables between the environment and
the config file. Warn when an invalid log level, filter, or output
is ignored.
* src/libvirt_private.syms: export internally a few convenience functions
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug,
src/qemu.conf: Add 'cgroups_controllers' and 'cgroups_device_acl'
parameters
* src/qemu_conf.h, src/qemu_conf.c: Load & parse configuration params
for cgroups
* src/qemu_driver.c: Only use cgroups controllers that are activated,
and use configured device whitelist instead of default, if set.
GCC >= 4.4 assumes the 'printf' attribute refers to the native
runtime libraries format specifiers. Thanks to gnulib, libvirt
has GNU format specifiers everywhere. This means we need to
use 'gnu_printf' with GCC >= 4.4 to get correct compiler
checking of printf format specifiers.
* HACKING: Document new rules for ATTRIBUTE_FMT_PRINTF
* autobuild.sh, mingw32-libvirt.spec.in: Disable OpenNebula
driver on mingw32 builds
* qemud/dispatch.h, qemud/qemu.h, src/buf.h src/internal.h,
src/logging.h, src/security.h, src/sexpr.h, src/util.h,
src/virterror_internal.h, src/xend_internal.c: Change
over to ATTRIBUTE_FMT_PRINTF.
* src/virsh.c: Disable 'cd' and 'pwd' commands on Win32
since they don't compile
* src/threads-win32.c: Add missing return value check
* src/interface_driver.c src/interface_driver.h: the new driver
* src/Makefile.am qemud/Makefile.am qemud/qemud.c: hook the new driver
in the build system and get ti activated by the daemon
* src/libvirt_private.syms: export needed symbols internally
* configure.in: Add --with-qemu-user and --with-qemu-group args
* libvirt.spec.in: use 'qemu' for user/group for Fedora >= 12
* qemud/libvirtd_qemu.arg, qemud/test_libvirtd_qemu.aug,
src/qemu.conf: Add 'user' and 'group' args for configuration
* src/Makefile.am: Create %localstatedir/cache/libvirt/qemu
* src/qemu_conf.c, src/qemu_conf.h: Load user/group from config
* src/qemu_driver.c: Change user ID/group ID when launching QEMU
guests. Change user/group ownership on disks/usb/pci devs.
Put memory dumps in %localstatedir/cache/libvirt/qemu
* src/util.c, src/util.h: Add convenient APIs for converting
username/groupname to user ID / group ID
* src/driver.h: add new driver functions virDrvNumOfDefinedInterfaces
and virDrvListDefinedInterfaces
* src/libvirt.c: implements the entry points, calling new driver
functions
* qemud/remote.c qemud/remote_dispatch_args.h qemud/remote_protocol.[chx]
qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_ret.h
qemud/remote_dispatch_table.h src/remote_internal.c: implement the
client/server side of the RPC
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'
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.
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
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.
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
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
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.
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
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.
* 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/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
* src/opennebula/one_conf.[ch] src/opennebula/one_driver.[ch]:
the OpenNebula driver
* configure.in include/libvirt/virterror.h qemud/Makefile.am
qemud/qemud.c src/Makefile.am src/domain_conf.[ch] src/driver.h
src/libvirt.c src/virterror.c: integration of the OpenNebula
driver in the libvirt infrastructure
* AUTHORS: add Abel Miguez Rodriguez
daniel
* qemud/qemud.c src/console.c src/network_driver.c
src/node_device_conf.c src/node_device_hal.c src/storage_conf.c
src/util.c: cleanup of some direct stderr logging
daniel
* qemud/remote.c qemud/remote_dispatch_args.h
qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_table.h
qemud/remote_protocol.c qemud/remote_protocol.h
qemud/remote_protocol.x src/remote_internal.c: Implement
attach/reattach/reset in the remote driver, patch by Mark
McLoughlin.
Daniel