]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
10 years agoqemu: Add support to Add/Delete IOThreads
John Ferlan [Wed, 18 Mar 2015 10:51:12 +0000 (06:51 -0400)]
qemu: Add support to Add/Delete IOThreads

Add qemuDomainAddIOThread and qemuDomainDelIOThread in order to add or
remove an IOThread to/from the host either for live or config optoins

The implementation for the 'live' option will use the iothreadpids list
in order to make decision, while the 'config' option will use the
iothreadids list.  Additionally, for deletion each may have to adjust
the iothreadpin list.

IOThreads are implemented by qmp objects, the code makes use of the existing
qemuMonitorAddObject or qemuMonitorDelObject APIs.

Signed-off-by: John Ferlan <jferlan@redhat.com>
10 years agodomain: Introduce virDomainIOThreadSchedDelId
John Ferlan [Thu, 23 Apr 2015 18:01:48 +0000 (14:01 -0400)]
domain: Introduce virDomainIOThreadSchedDelId

We're about to allow IOThreads to be deleted, but an iothreadid may be
included in some domain thread sched, so add a new API to allow removing
an iothread from some entry.

Then during the writing of the threadsched data and an additional check
to determine whether the bitmap is all clear before writing it out.

10 years agoremote: Add support for AddIOThread and DelIOThread
John Ferlan [Wed, 25 Mar 2015 21:13:07 +0000 (17:13 -0400)]
remote: Add support for AddIOThread and DelIOThread

Add remote support for the add/delete IOThread API's

10 years agoImplement virDomainAddIOThread and virDomainDelIOThread
John Ferlan [Wed, 25 Mar 2015 21:03:49 +0000 (17:03 -0400)]
Implement virDomainAddIOThread and virDomainDelIOThread

Add libvirt API's to manage adding and deleting IOThreads to/from the
domain

10 years agoconf: Adjust the iothreadsched expectations
John Ferlan [Tue, 21 Apr 2015 21:21:28 +0000 (17:21 -0400)]
conf: Adjust the iothreadsched expectations

With iothreadid's allowing any 'id' value for an iothread_id, the
iothreadsched code needs a slight adjustment to allow for "any"
unsigned int value in order to create the bitmap of ids that will
have scheduler adjustments. Adjusted the doc description as well.

10 years agoMove iothreadspin information into iothreadids
John Ferlan [Tue, 21 Apr 2015 19:43:05 +0000 (15:43 -0400)]
Move iothreadspin information into iothreadids

Remove the iothreadspin array from cputune and replace with a cpumask
to be stored in the iothreadids list.

Adjust the test output because our printing goes in order of the iothreadids
list now.

10 years agoconf: Move virDomainPinIsDuplicate and make static
John Ferlan [Tue, 21 Apr 2015 17:35:33 +0000 (13:35 -0400)]
conf: Move virDomainPinIsDuplicate and make static

Since it's only ever referenced in domain_conf.c, make the function
static, but also will need to move it to somewhere before it's referenced
rather than forward referencing it.

10 years agoqemu: Use domain iothreadids to IOThread's 'thread_id'
John Ferlan [Fri, 10 Apr 2015 13:21:23 +0000 (09:21 -0400)]
qemu: Use domain iothreadids to IOThread's 'thread_id'

Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
'thread_id' as returned from the live qemu monitor data.

Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
the new iothreadids 'thread_id' element.

Rather than use the default numbering scheme of 1..number of iothreads
defined for the domain, use the iothreadid's list for the iothread_id

Since iothreadids list keeps track of the iothread_id's, these are
now used in place of the many places where a for loop would "know"
that the ID was "+ 1" from the array element.

The new tests ensure usage of the <iothreadid> values for an exact number
of iothreads and the usage of a smaller number of <iothreadid> values than
iothreads that exist (and usage of the default numbering scheme).

10 years agoconf: Add new domain XML element 'iothreadids'
John Ferlan [Thu, 2 Apr 2015 23:59:25 +0000 (19:59 -0400)]
conf: Add new domain XML element 'iothreadids'

Adding a new XML element 'iothreadids' in order to allow defining
specific IOThread ID's rather than relying on the algorithm to assign
IOThread ID's starting at 1 and incrementing to iothreads count.

This will allow future patches to be able to add new IOThreads by
a specific iothread_id and of course delete any exisiting IOThread.

Each iothreadids element will have 'n' <iothread> children elements
which will have attribute "id".  The "id" will allow for definition
of any "valid" (eg > 0) iothread_id value.

On input, if any <iothreadids> <iothread>'s are provided, they will
be marked so that we only print out what we read in.

On input, if no <iothreadids> are provided, the PostParse code will
self generate a list of ID's starting at 1 and going to the number
of iothreads defined for the domain (just like the current algorithm
numbering scheme).  A future patch will rework the existing algorithm
to make use of the iothreadids list.

On output, only print out the <iothreadids> if they were read in.

10 years agoCleanup parameters for mock libraries
Martin Kletzander [Mon, 27 Apr 2015 13:31:32 +0000 (15:31 +0200)]
Cleanup parameters for mock libraries

All the libraries use same parameters when building, why not have it in
one place at the begining of the Makefile.

This will also ensure no new mock library will have a problem with
missing e.g. MINGW_EXTRA_LDFLAGS.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoCleanup srcdir usage
Michal Privoznik [Mon, 27 Apr 2015 09:08:59 +0000 (11:08 +0200)]
Cleanup srcdir usage

In a lot places we use path like this:

  $(srcdir)/../src/....

when in fact it can be:

  $(top_srcdir)/src/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoutil: fix memleak in virStorageSourceClear
zhang bo [Mon, 27 Apr 2015 09:26:31 +0000 (17:26 +0800)]
util: fix memleak in virStorageSourceClear

snapshot and configFile are not freed, free them.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoAdd missing linker flags for MinGW build
Pavel Fedin [Mon, 27 Apr 2015 10:40:53 +0000 (13:40 +0300)]
Add missing linker flags for MinGW build

This fix should completely close
https://bugzilla.redhat.com/show_bug.cgi?id=1214605

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
10 years agostorage: Resolve Coverity UNINIT
John Ferlan [Fri, 24 Apr 2015 17:57:30 +0000 (13:57 -0400)]
storage: Resolve Coverity UNINIT

commit id '1e13eff4' didn't init found when changed from a bool to
an int in virStoragePoolFCRefreshThread and Coverity...

10 years agoopenvz: Drop useless domain lookup
Michal Privoznik [Sat, 25 Apr 2015 08:06:29 +0000 (10:06 +0200)]
openvz: Drop useless domain lookup

The lookup is just for check whether a domain we are about to add does
not already exists. Well, the virDomainObjListAdd() function does that
for us already so there's no need to duplicate the check.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoFix check for return value of qemuDomainAgentAvailable()
Martin Kletzander [Mon, 27 Apr 2015 08:11:35 +0000 (10:11 +0200)]
Fix check for return value of qemuDomainAgentAvailable()

Commit dcbb243bbc3470431d15cec4c5bb96d2de89a88b used the return value of
the function as int even though it returns bool.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoconf: fix memleak in virDomainHostdevDefClear
Zhang Bo [Mon, 27 Apr 2015 06:41:45 +0000 (14:41 +0800)]
conf: fix memleak in virDomainHostdevDefClear

use virNetworkRouteDefFree() instead of VIR_FREE to free routes, otherwise
the element 'family' would not be freed.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoconf: fix memleak in virDomainNetIpParseXML
Zhang Bo [Mon, 27 Apr 2015 06:41:44 +0000 (14:41 +0800)]
conf: fix memleak in virDomainNetIpParseXML

use cleanup instead of error, so that the allocated strings could also get freed
when there's no error.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoqemu: fix memleak in virCapabilitiesDomainDataLookup
Zhang Bo [Mon, 27 Apr 2015 06:41:43 +0000 (14:41 +0800)]
qemu: fix memleak in virCapabilitiesDomainDataLookup

virBufferContentAndReset() doesn't free buf contents, we should use
virBufferFreeAndReset() to get buf freed.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoqemu: fix memleaks in qemuBuildCommandLine
Zhang Bo [Mon, 27 Apr 2015 06:41:42 +0000 (14:41 +0800)]
qemu: fix memleaks in qemuBuildCommandLine

free boot_opts_str and boot_order_str both in normal and error paths.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoutil: fix memleak in virFindSCSIHostByPCI
Zhang Bo [Mon, 27 Apr 2015 06:41:41 +0000 (14:41 +0800)]
util: fix memleak in virFindSCSIHostByPCI

free buf in cleanup.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agotests: fix some memleaks in tests
Zhang Bo [Mon, 27 Apr 2015 06:41:40 +0000 (14:41 +0800)]
tests: fix some memleaks in tests

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
10 years agoqemu: Fix comment for timeDelta
Jiri Denemark [Mon, 27 Apr 2015 07:43:27 +0000 (09:43 +0200)]
qemu: Fix comment for timeDelta

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agoFix typo in comment about memory binding
zhang bo [Sat, 25 Apr 2015 06:10:00 +0000 (14:10 +0800)]
Fix typo in comment about memory binding

rather then -> rather than

Signed-off-by: YueWenyuan <yuewenyuan@huawei.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agoqemu: Connect to guest agent after channel hotplug
Peter Krempa [Fri, 24 Apr 2015 14:48:26 +0000 (16:48 +0200)]
qemu: Connect to guest agent after channel hotplug

If a user hot-attaches the guest agent channel libvirt would ignore it
until the restart of libvirtd or shutdown/destroy and start of the VM
itself.

This patch adds code that opens or closes the guest agent connection
according to the state of the guest agent channel according to
connect/disconnect events.

To allow opening the channel from the event handler qemuConnectAgent
needed to be exported.

10 years agoqemu: agent: Differentiate errors when the agent channel was hotplugged
Peter Krempa [Fri, 24 Apr 2015 14:43:38 +0000 (16:43 +0200)]
qemu: agent: Differentiate errors when the agent channel was hotplugged

When the guest agent channel gets hotplugged to a VM, libvirt would
still report that "QEMU guest agent is not configured" rather than
stating that the connection was not established yet.

Currently the code won't be able to connect to the agent after hotplug
but that will change in a later patch.

As the qemuFindAgentConfig() helper is quite helpful in this case move
it to a more usable place and export it.

10 years agoqemu: Reuse qemuDomainAgentAvailable in qemuDomainInterfaceAddresses
Peter Krempa [Fri, 24 Apr 2015 13:54:08 +0000 (15:54 +0200)]
qemu: Reuse qemuDomainAgentAvailable in qemuDomainInterfaceAddresses

10 years agoqemu: Fix domain object leak in qemuDomainInterfaceAddresses
Peter Krempa [Fri, 24 Apr 2015 13:48:43 +0000 (15:48 +0200)]
qemu: Fix domain object leak in qemuDomainInterfaceAddresses

The API didn't use virDomainObjEndAPI to release the domain object thus
it leaked a reference to it.

10 years agoqemu: agent: Reuse virJSONValueObjectCreateVArgs in qemuAgentMakeCommand
Peter Krempa [Fri, 24 Apr 2015 13:32:15 +0000 (15:32 +0200)]
qemu: agent: Reuse virJSONValueObjectCreateVArgs in qemuAgentMakeCommand

Since the code is now separated into the common helper, we can reuse it
instead of maintaining two copies.

10 years agolibxl: remove duplicate check for pci subsystem type
Olaf Hering [Fri, 24 Apr 2015 16:01:02 +0000 (16:01 +0000)]
libxl: remove duplicate check for pci subsystem type

Both attach and detach functions get called only if the type matches.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
10 years agolibxl: use pci init and dispose functions
Olaf Hering [Fri, 24 Apr 2015 15:56:23 +0000 (15:56 +0000)]
libxl: use pci init and dispose functions

Rearrange code so that the local variable is always initialized and
disposed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
10 years agolibxl: initialize sdl.opengl defbool in libxlMakeVfb
Jim Fehlig [Fri, 24 Apr 2015 20:11:26 +0000 (14:11 -0600)]
libxl: initialize sdl.opengl defbool in libxlMakeVfb

Commit bf32462b missed initializing sdl.opengl.  Without the
initialization, libvirtd will be terminated by an assert from libxl:

Assertion `!libxl_defbool_is_default(db)' failed.

Reported-by: Olaf Hering <olaf@aepfle.de>
10 years agolibxl: initialize vfb defbools in libxlMakeVfb
Olaf Hering [Fri, 17 Apr 2015 17:19:31 +0000 (17:19 +0000)]
libxl: initialize vfb defbools in libxlMakeVfb

If the domU configu has sdl enabled libvirtd crashes:
libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val:
Assertion `!libxl_defbool_is_default(db)' failed.

Initialize the relevant defbool variables in libxl_device_vfb.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
10 years agoparallels: fix crash in prlsdkAddNet in case of CT definition
Maxim Nestratov [Thu, 23 Apr 2015 17:35:00 +0000 (20:35 +0300)]
parallels: fix crash in prlsdkAddNet in case of CT definition

Since net->model is not defined for containers we shouldn't touch it.
In case network adapter model is defined, a warning about ignoring
it is shown.

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
10 years agovirhostdev: Fix comments for virHostdevReAttachPCIDevices
John Ferlan [Fri, 24 Apr 2015 17:27:25 +0000 (13:27 -0400)]
virhostdev: Fix comments for virHostdevReAttachPCIDevices

Pushed previous patch (commit id 'd45dadae6') too quickly...

The patch just updates the patch from Laine's suggestions.

10 years agobhyve: fix build in tests
Roman Bogorodskiy [Fri, 24 Apr 2015 16:50:08 +0000 (19:50 +0300)]
bhyve: fix build in tests

Commit ca32929 caused build errors in bhyvexml2argvtest.c because of
some undefined variables.

Pushing under the build breaker rule.

10 years agohostdev: fix net config restore error
Huanle Han [Wed, 15 Apr 2015 17:29:43 +0000 (01:29 +0800)]
hostdev: fix net config restore error

Fix for such a case:
1. Domain A and B xml contain the same SRIOV net hostdev(<interface
type='hostdev' /> with same pci address).
2. virsh start A (Successfully, and configure the SRIOV net with
custom mac)
3. virsh start B (Fail because of the hostdev used by domain A or other
reason.)
In step 3, 'virHostdevNetConfigRestore' is called for the hostdev
which is still used by domain A. It makes the mac/vlan of the SRIOV net
change.

Code Change in this fix:
1. As the pci used by other domain have been removed from
'pcidevs' in previous loop, we only restore the nic config for
the hostdev still in 'pcidevs'(used by this domain)
2. update the comments to make it more clear

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
10 years agohostdev: Create virHostdevIsPCINetDevice
Huanle Han [Wed, 22 Apr 2015 11:33:09 +0000 (07:33 -0400)]
hostdev: Create virHostdevIsPCINetDevice

Refactor some code to create a static function virHostdevIsPCINetDevice
which will detect whether the hostdev is a pci net device or not.

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
10 years agoqemu: Build nvram directory at driver startup
Cole Robinson [Fri, 24 Apr 2015 00:01:05 +0000 (20:01 -0400)]
qemu: Build nvram directory at driver startup

Similar to what was done for the channel socket in the previous commit.

10 years agoqemu: Build channel autosocket directory at driver startup
Cole Robinson [Thu, 23 Apr 2015 23:24:50 +0000 (19:24 -0400)]
qemu: Build channel autosocket directory at driver startup

Rather than depend on the RPM to put it in place, since this doesn't
cover the qemu:///session case. Currently auto allocated socket path is
completely busted with qemu:///session

https://bugzilla.redhat.com/show_bug.cgi?id=1105274

And because we chown the directory at driver startup now, this also fixes
autosocket startup failures when using user/group=root

https://bugzilla.redhat.com/show_bug.cgi?id=1044561
https://bugzilla.redhat.com/show_bug.cgi?id=1146886

10 years agoqemu: chown autoDumpPath on driver startup
Cole Robinson [Fri, 24 Apr 2015 00:21:21 +0000 (20:21 -0400)]
qemu: chown autoDumpPath on driver startup

Not sure if this is required, but it makes things consistent with the
rest of the directories.

10 years agoqemu: conf: Clarify paths that are relative to libDir
Cole Robinson [Fri, 24 Apr 2015 00:16:30 +0000 (20:16 -0400)]
qemu: conf: Clarify paths that are relative to libDir

Rather than duplicate libDir for each new path

10 years agotests: qemu: Couple aarch64 CPU tests
Cole Robinson [Thu, 23 Apr 2015 17:47:06 +0000 (13:47 -0400)]
tests: qemu: Couple aarch64 CPU tests

- Make sure aarch64 host-passthrough works correctly
- Make sure libvirt doesn't choke on cpu model=host, which is what
  virt-install/virt-manager were incorrectly specifying up until recently.

10 years agomigration: Usable time statistics without requiring NTP
Jiri Denemark [Thu, 23 Apr 2015 07:19:12 +0000 (09:19 +0200)]
migration: Usable time statistics without requiring NTP

virDomainGetJobStats is able to report statistics of a completed
migration, however to get usable downtime and total time statistics both
hosts have to keep synchronized time. To provide at least some
estimation of the times even when NTP daemons are not running on both
hosts we can just ignore the time needed to transfer a migration cookie
to the destination host. The result will be also inaccurate but a bit
more predictable. The total/down time will just be at least what we
report.

https://bugzilla.redhat.com/show_bug.cgi?id=1213434

10 years agoFix memory leak in virNetSocketNewConnectUNIX
Jiri Denemark [Fri, 24 Apr 2015 09:56:34 +0000 (11:56 +0200)]
Fix memory leak in virNetSocketNewConnectUNIX

==26726==    by 0x673CD67: __vasprintf_chk (vasprintf_chk.c:80)
==26726==    by 0x5673605: UnknownInlinedFun (stdio2.h:210)
==26726==    by 0x5673605: virVasprintfInternal (virstring.c:476)
==26726==    by 0x56736EE: virAsprintfInternal (virstring.c:497)
==26726==    by 0x5680C37: virGetUserRuntimeDirectory (virutil.c:866)
==26726==    by 0x5783A89: virNetSocketNewConnectUNIX (virnetsocket.c:572)
==26726==    by 0x57751AF: virNetClientNewUNIX (virnetclient.c:344)
==26726==    by 0x57689B3: doRemoteOpen (remote_driver.c:895)
==26726==    by 0x5769F8E: remoteConnectOpen (remote_driver.c:1195)
==26726==    by 0x57092DF: do_open (libvirt.c:1189)
==26726==    by 0x570A7BF: virConnectOpenAuth (libvirt.c:1341)

https://bugzilla.redhat.com/show_bug.cgi?id=1215042
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agobuild: add pragma directive to fix build on some gcc
Pavel Hrdina [Fri, 24 Apr 2015 10:57:10 +0000 (12:57 +0200)]
build: add pragma directive to fix build on some gcc

Commit 1268820a removed obsolete index() function and replaced it by
strchr.  Few versions of gcc has a bug and reports a warning about
strchr:

../../src/util/virstring.c:1006: error: logical '&&' with non-zero
constant will always evaluate as true [-Wlogical-op]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agouml: s/virDomainObjListFindByID/virDomainObjListFindByUUID/
Michal Privoznik [Fri, 24 Apr 2015 07:34:10 +0000 (09:34 +0200)]
uml: s/virDomainObjListFindByID/virDomainObjListFindByUUID/

ListFindByID() still requires to step through items in the hash table
(in the worst case scenario through all of them), lock each one and
compare whether we've found what we're looking for. This is suboptimal
as locking a domain object means we need to wait for the current API
running over the object to finish.

Unfortunately, we can't drop the function completely because we have
this public API virDomainLookupByID which we can't drop.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainObjList: Introduce yet another hash table
Michal Privoznik [Thu, 23 Apr 2015 13:31:53 +0000 (15:31 +0200)]
virDomainObjList: Introduce yet another hash table

This hash table will contain the same data as already existing one.
The only difference is that while the first table uses domain uuid as
key, the new table uses domain name. This will allow much faster (and
lockless) lookups by domain name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainObjListFindByName: Return referenced object
Michal Privoznik [Thu, 23 Apr 2015 16:00:01 +0000 (18:00 +0200)]
virDomainObjListFindByName: Return referenced object

Every domain that grabs a domain object to work over should
reference it to make sure it won't disappear meanwhile.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoIntroduce virDomainObjEndAPI
Michal Privoznik [Thu, 23 Apr 2015 15:27:58 +0000 (17:27 +0200)]
Introduce virDomainObjEndAPI

This is basically turning qemuDomObjEndAPI into a more general
function. Other drivers which gets a reference to domain objects may
benefit from this function too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainObjListNew: Use virObjectFreeHashData
Michal Privoznik [Thu, 23 Apr 2015 15:10:28 +0000 (17:10 +0200)]
virDomainObjListNew: Use virObjectFreeHashData

There's no point in duplicating virObjectFreeHashData() in a separate
function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainObjListAddLocked: s/false/NULL/ for @oldDef
Michal Privoznik [Thu, 23 Apr 2015 13:27:32 +0000 (15:27 +0200)]
virDomainObjListAddLocked: s/false/NULL/ for @oldDef

It's a pointer after all. We should initialize it to NULL instead of
false.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoparallels: implement .domainGetMaxMemory
Dmitry Guryanov [Thu, 23 Apr 2015 13:21:00 +0000 (16:21 +0300)]
parallels: implement .domainGetMaxMemory

Since we haven't implemented balloon parameters tuning
we can just return amount of memory in this function.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
10 years agoApparmor: allow reading block-rbd.so
Cédric Bosdonnat [Thu, 23 Apr 2015 07:34:19 +0000 (09:34 +0200)]
Apparmor: allow reading block-rbd.so

10 years agoAllow access to vendor and device file for PCI device passthrough
Cédric Bosdonnat [Thu, 23 Apr 2015 07:32:16 +0000 (09:32 +0200)]
Allow access to vendor and device file for PCI device passthrough

For some devices, the $PCIDIR/vendor and $PCIDIR/device need to be
read. Iterate over them to get them as well in the the generated
apparmor profile.

10 years agoqemu: cgroup: Fix priorities when setting emulatorpin
Peter Krempa [Thu, 23 Apr 2015 14:16:03 +0000 (16:16 +0200)]
qemu: cgroup: Fix priorities when setting emulatorpin

Use the custom emulator pin setting with the highest priority same as
with vcpupin.

10 years agotests: Add VIR_TEST_REGENERATE_OUTPUT
Cole Robinson [Thu, 23 Apr 2015 18:02:57 +0000 (14:02 -0400)]
tests: Add VIR_TEST_REGENERATE_OUTPUT

If this enviroment variable is set, the virTestCompareToFile helper
will overwrite the file content we are comparing against, if the
file doesn't exist or it doesn't match the expected input.

This is useful when adding new test cases, or making changes that
generate a lot of output churn.

10 years agotests: Add virtTestCompareToFile
Cole Robinson [Thu, 23 Apr 2015 15:14:26 +0000 (11:14 -0400)]
tests: Add virtTestCompareToFile

Replaces a common pattern used in many test files

10 years agotests: Use *DefParseFile more
Cole Robinson [Thu, 23 Apr 2015 15:10:15 +0000 (11:10 -0400)]
tests: Use *DefParseFile more

10 years agotests: Add VIR_TEST_DEBUG and VIR_TEST_VERBOSE
Cole Robinson [Thu, 23 Apr 2015 17:38:00 +0000 (13:38 -0400)]
tests: Add VIR_TEST_DEBUG and VIR_TEST_VERBOSE

To remove a bunch of TestGetDebug()/TestGetVerbose() checks

10 years agobuild: avoid obsolete index()
Eric Blake [Thu, 23 Apr 2015 14:13:53 +0000 (08:13 -0600)]
build: avoid obsolete index()

Commit 2a530a3e5 is not portable to mingw, which intentionally
avoids declaring the obsolete index().  See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1214605

* src/util/virstring.c (virStringStripControlChars): Use strchr.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoparallels: fix IS_CT macro
Maxim Nestratov [Wed, 22 Apr 2015 19:49:00 +0000 (22:49 +0300)]
parallels: fix IS_CT macro

CT stands for containers, i.e. def->os.type should be compared with VIR_DOMAIN_OSTYPE_EXE
rather than VIR_DOMAIN_OSTYPE_HVM

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
10 years agoparallels_sdk: Utilize parallelsDomObjFromDomain()
Michal Privoznik [Wed, 22 Apr 2015 16:27:05 +0000 (18:27 +0200)]
parallels_sdk: Utilize parallelsDomObjFromDomain()

Instead of each API copying the same lines of code, lets use the
generic function designed just for that purpose.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoparallels_driver: Utilize parallelsDomObjFromDomain()
Michal Privoznik [Wed, 22 Apr 2015 16:23:38 +0000 (18:23 +0200)]
parallels_driver: Utilize parallelsDomObjFromDomain()

Instead of each API copying the same lines of code, lets use the
generic function designed just for that purpose. At the same time,
drop useless connection object locking in some functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoparallels: Introduce parallelsDomObjFromDomain()
Michal Privoznik [Wed, 22 Apr 2015 16:10:50 +0000 (18:10 +0200)]
parallels: Introduce parallelsDomObjFromDomain()

This function is practically copied over from qemu driver. Its
only purpose in life is to lookup a domain object and print an
error if no object is found.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agostruct _parallelsConn: Mark @domains as immutable pointer
Michal Privoznik [Wed, 22 Apr 2015 16:07:06 +0000 (18:07 +0200)]
struct _parallelsConn: Mark @domains as immutable pointer

The pointer does not change throughout the while life of a
parallels connection. Mark it as such.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agorng: fix port number range validation
Daniel P. Berrange [Thu, 23 Apr 2015 10:49:23 +0000 (11:49 +0100)]
rng: fix port number range validation

The PortNumber data type is declared to derive from 'short'.
Unfortunately this is an signed type, so validates the range
[-32,768, 32,767] which excludes valid port numbers between
32767 and 65535.

We can't use 'unsignedShort', since we need -1 to be a valid
port number too.

This change is to use 'int' and set an explicit max boundary
instead of relying on the data types' built-in max.

One of the existing tests is changed to use a high port number
to validate the schema.

https://bugzilla.redhat.com/show_bug.cgi?id=1214664

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoqemu: Don't fail to reboot domains with unresponsive agent
zhang bo [Thu, 23 Apr 2015 03:40:15 +0000 (11:40 +0800)]
qemu: Don't fail to reboot domains with unresponsive agent

just as what b8e25c35d7f80a2fadc0e51e95318e39db3d1687 did, we
fall back to the ACPI method when the guest agent is unresponsive
in qemuDomainReboot().

Signed-off-by: YueWenyuan <yuewenyuan@huawei.com>
Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agobhyve: fix build in tests
Roman Bogorodskiy [Thu, 23 Apr 2015 06:25:11 +0000 (10:25 +0400)]
bhyve: fix build in tests

Commit 835cf84 dropped expectedVirtTypes argument for
virDomainDefParse*() functions, however bhyve tests still try to pass
that to virDomainDefParseFile(), therefore build fails.

Fix build by fixing virDomainDefParseFile() usage.

10 years agospec: Point fedora --with-loader-nvram at nightly firmware repo
Cole Robinson [Wed, 22 Apr 2015 20:01:32 +0000 (16:01 -0400)]
spec: Point fedora --with-loader-nvram at nightly firmware repo

Fedora doesn't ship OVMF/AAVMF builds in its repos due to licensing
issues, so the recommended way to consume these bits is via Gerd's
nightly repo: https://www.kraxel.org/repos

Let's teach fedora builds about the loader/nvram pairs these packages
installed, so users don't need to edit qemu.conf to get virt-manager
UEFI support.

10 years agoconfigure: Report --with-loader-nvram value in summary
Cole Robinson [Wed, 22 Apr 2015 18:28:56 +0000 (14:28 -0400)]
configure: Report --with-loader-nvram value in summary

10 years agolocking: relax PID requirement
Jim Fehlig [Thu, 16 Apr 2015 17:32:42 +0000 (11:32 -0600)]
locking: relax PID requirement

Some hypervisors like Xen do not have PIDs associated with domains.
Relax the requirement for PID != 0 in the locking code so it can
be used by hypervisors that do not represent domains as a process
running on the host.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agospec: Fix libxl build with driver modules
Cole Robinson [Wed, 22 Apr 2015 19:43:38 +0000 (15:43 -0400)]
spec: Fix libxl build with driver modules

10 years agoconfigure: Fix --loader-nvram typo
Cole Robinson [Wed, 22 Apr 2015 18:19:43 +0000 (14:19 -0400)]
configure: Fix --loader-nvram typo

10 years agoparallels: don't forget to unlock domain after successful virDomainObjListFindByUUID...
Maxim Nestratov [Wed, 22 Apr 2015 15:25:50 +0000 (18:25 +0300)]
parallels: don't forget to unlock domain after successful virDomainObjListFindByUUID call

Also a typo is fixed (s/detached/attached/)

Signed-off-by: Maxim Nestratov mnestratov@parallels.com
10 years agovircommand: fix polling in virCommandProcessIO
Roman Bogorodskiy [Tue, 21 Apr 2015 17:11:32 +0000 (20:11 +0300)]
vircommand: fix polling in virCommandProcessIO

When running on FreeBSD, there's a bug in virCommandProcessIO
polling that is triggered by the commandtest.

A test that triggers EPIPE in commandtest (named "test20") hungs
forever on FreeBSD.

Apparently, this happens because FreeBSD sets POLLHUP flag on revents
when stdin in closed. And as the current implementation only checks for
POLLOUT and POLLERR, it ends up looping forever inside
virCommandProcessIO and not trying to do one more write() that would
trigger EPIPE.

To fix that check for the POLLHUP flag along with POLLOUT and POLLERR.

10 years agoutil: storage: Improve error message when requesting image above 'start'
Peter Krempa [Tue, 21 Apr 2015 15:38:08 +0000 (17:38 +0200)]
util: storage: Improve error message when requesting image above 'start'

When a user would specify a backing chain index that is above the start
point libvirt would report a rather unhelpful error:

invalid argument: could not find backing store 1 in chain for 'sub/link2'

This patch adds an explicit check that the index is below start point in
the backing store and reports the following error if not:

invalid argument: requested backing store index 1 is above 'sub/../qcow2' in chain for 'sub/link2'

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177062

10 years agoutil: storage: Add hint to error message that indexed access was used
Peter Krempa [Tue, 21 Apr 2015 15:48:17 +0000 (17:48 +0200)]
util: storage: Add hint to error message that indexed access was used

10 years agoutil: storage: Fix possible crash when source path is NULL
Peter Krempa [Tue, 21 Apr 2015 15:35:23 +0000 (17:35 +0200)]
util: storage: Fix possible crash when source path is NULL

Some storage protocols allow to have the @path field in struct
virStorageSource set to NULL. Add NULLSTR() wrappers to handle this
possibility until I finish the storage source error formatter.

10 years agoutil: command: Deduplicate code in virCommandNewArgList
Peter Krempa [Wed, 22 Apr 2015 08:07:00 +0000 (10:07 +0200)]
util: command: Deduplicate code in virCommandNewArgList

virCommandNewArgList can use virCommandNewVAList.

10 years agoqemu: migration: Refactor hostdev validation in migration check
Peter Krempa [Wed, 22 Apr 2015 09:41:22 +0000 (11:41 +0200)]
qemu: migration: Refactor hostdev validation in migration check

The hostdev check can error out right away.

10 years agoutil: fix build on non-Linux
Roman Bogorodskiy [Wed, 22 Apr 2015 08:14:57 +0000 (12:14 +0400)]
util: fix build on non-Linux

Build fails on non-Linux systems with this error:

  CC       util/libvirt_util_la-virnetdev.lo
util/virnetdev.c:364:1: error: unused function 'virNetDevReplaceMacAddress' [-Werror,-Wunused-function]
virNetDevReplaceMacAddress(const char *linkdev,
^
util/virnetdev.c:406:1: error: unused function 'virNetDevRestoreMacAddress' [-Werror,-Wunused-function]
virNetDevRestoreMacAddress(const char *linkdev,
^
2 errors generated.

The virNetDev{Restore,Replace}MacAddress() functions are only used
by VF-related routines that are available on Linux only. So move these
functions under the same #ifdef.

10 years agoprocessNicRxFilterChangedEvent: Take appropriate actions for NET_TYPE_NETWORK too
Michal Privoznik [Tue, 14 Apr 2015 09:47:53 +0000 (11:47 +0200)]
processNicRxFilterChangedEvent: Take appropriate actions for NET_TYPE_NETWORK too

Because packets going through the egress from a bridge (where our
bandwidth limiting takes place) have no information about which
interface they came from, the QoS rules that we create instead
use the source MAC address of the packets to make their decisions
about which QDisc the packet should be in.

One flaw in this is that when a guest changed the MAC address it
used, packets from the guest would no longer be put into the
correct QDisc, but would instead be put in an "unprivileged"
class, resulting in the bandwidth "floor" (minimum guaranteed)
being no longer honored.

Now that libvirt has infrastructure to capture and respond to
RX_FILTER_CHANGE events from qemu (sent whenever a guest
interface modifies its MAC address, among other things), we can
notice when a guest MAC address changes, and update the QoS rules
accordingly, so that bandwidth floor is honored even after a
guest MAC address change.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainActualNetDefContentsFormat: Format class_id only for status XML
Michal Privoznik [Mon, 20 Apr 2015 08:48:19 +0000 (10:48 +0200)]
virDomainActualNetDefContentsFormat: Format class_id only for status XML

In one of my previous patches (b68a56bcfe) I made class_id to
format more frequently. Well, now it's formatting way too
frequent - even for regular active XML. Users don't need to see
it, so lets format it only for the status XML where it's really
needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemu: Fix issues with maxMemory in qemuDomainSetMemoryFlags()
Luyao Huang [Tue, 24 Mar 2015 14:12:37 +0000 (22:12 +0800)]
qemu: Fix issues with maxMemory in qemuDomainSetMemoryFlags()

qemuDomainSetMemoryFlags() would allow to set the initial memory greater
than the <maxMemory> field. While the configuration would not work as
memory hotplug requires NUMA to be enabled and the
qemuDomainSetMemoryFlags() API does not work on NUMA guests this just
fixes a corner case.

The fix is still worth though as it allows to induce an invalid
configuration and make the VM vanish on libvirt restart.

Additionally this tweaks error message to be more accurate.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
10 years agolibxl: Introduce configuration file for libxl driver
Jim Fehlig [Mon, 9 Sep 2013 15:15:15 +0000 (09:15 -0600)]
libxl: Introduce configuration file for libxl driver

Introduce libxl.conf configuration file, adding the 'autoballoon'
setting as the first knob for controlling the libxl driver.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agoqemu: set macvtap physdevs online when macvtap is set online
Laine Stump [Mon, 13 Apr 2015 17:26:54 +0000 (13:26 -0400)]
qemu: set macvtap physdevs online when macvtap is set online

A further fix for:

  https://bugzilla.redhat.com/show_bug.cgi?id=1113474

Since there is no possibility that any type of macvtap will work if
the parent physdev it's attached to is offline, we should bring the
physdev online at the same time as the macvtap. When taking the
macvtap offline, it's also necessary to take the physdev offline for
macvtap passthrough mode (because the physdev has the same MAC address
as the macvtap device, so could potentially cause problems with
misdirected packets during migration, as outlined in commits 829770
and 879c13). We can't set the physdev offline for other macvtap modes
1) because there may be other macvtap devices attached to the same
physdev (and/or the host itself may be using the device) in the other
modes whereas passthrough mode is exclusive to one macvtap at a time,
and 2) there's no practical reason to do so anyway.

10 years agoutil: set MAC address for VF via netlink message to PF+VF# when possible
Laine Stump [Fri, 10 Apr 2015 16:19:49 +0000 (12:19 -0400)]
util: set MAC address for VF via netlink message to PF+VF# when possible

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1113474

When we set the MAC address of a network device as a part of setting
up macvtap "passthrough" mode (where the domain has an emulated netdev
connected to a host macvtap device that has exclusive use of the
physical device, and sets the device MAC address to match its own,
i.e. "<interface type='direct'> <source mode='passthrough' .../>"), we
use ioctl(SIOCSIFHWADDR) giving it the name of that device. This is
true even if it is an SRIOV Virtual Function (VF).

But, when we are setting the MAC address / vlan ID of a VF in
preparation for "hostdev network" passthrough (this is where we set
the MAC address and vlan id of the VF after detaching the host net
driver and before assigning the device to the domain with PCI
passthrough, i.e. "<interface type='hostdev'>", we do the setting via
a netlink RTM_SETLINK message for that VF's Physical Function (PF),
telling it the VF# we want to change. This sets an "administratively
changed MAC" flag for that VF in the PF's driver, and from that point
on (until the PF driver is reloaded, *not* merely the VF driver) that
VF's MAC address can't be changed using ioctl(SIOCSIFHWADDR) - the
only way to change it is via the PF with RTM_SETLINK.

This means that if a VF is used for hostdev passthrough, it will have
the admin flag set, and future attempts to use that VF for macvtap
passthrough will fail.

The solution to this problem is to check if the device being used for
macvtap passthrough is actually a VF; if so, we use the netlink
RTM_SETLINK message to the PF to set the VF's mac address instead of
ioctl(SIOCSIFHWADDR) directly to the VF; if not, behavior does not
change from previously.

There are three pieces to making this work:

1) virNetDevMacVLan(Create|Delete)WithVPortProfile() now call
   virNetDev(Replace|Restore)NetConfig() rather than
   virNetDev(Replace|Restore)MacAddress() (simply passing -1 for VF#
   and vlanid).

2) virNetDev(Replace|Restore)NetConfig() check to see if the device is
   a VF. If so, they find the PF's name and VF#, allowing them to call
   virNetDev(Replace|Restore)VfConfig().

3) To prevent mixups when detaching a macvtap passthrough device that
   had been attached while running an older version of libvirt,
   virNetDevRestoreVfConfig() is potentially given the preserved name
   of the VF, and if the proper statefile for a VF can't be found in
   the stateDir (${stateDir}/${pfname}_vf${vfid}),
   virNetDevRestoreMacAddress() is called instead (which will look in
   the file named ${stateDir}/${vfname}).

This problem has existed in every version of libvirt that has both
macvtap passthrough and interface type='hostdev'. Fortunately people
seem to use one or the other though, so it hasn't caused any real
world problem reports.

10 years agoqemu: Always refresh capabilities if no <guests> found
Cole Robinson [Thu, 16 Apr 2015 18:51:26 +0000 (14:51 -0400)]
qemu: Always refresh capabilities if no <guests> found

- Remove all qemu emulators
- Restart libvirtd
- Install qemu emulators
- Call 'virsh version' -> errors

The only thing that will force the qemu driver to refresh it's cached
capablities info is an explict API call to GetCapabilities.

However in the case when the initial caps lookup at driver connect didn't
find a single qemu emulator to poll, the driver is effectively useless
and really can't do anything until it's populated some qemu capabilities
info.

With the above steps, the user would have to either know about the
magic refresh capabilities call, or restart libvirtd to pick up the
changes.

Instead, this patch changes things so that every time a part of th
driver requests access to capabilities info, check to see if
we've previously seen any emulators. If not, force a refresh.

In the case of 'still no emulators found', this is still very quick, so
I can't think of a downside.

https://bugzilla.redhat.com/show_bug.cgi?id=1000116

10 years agovircapstest: fix build without LXC, QEMU or XEN
Roman Bogorodskiy [Tue, 21 Apr 2015 08:14:45 +0000 (12:14 +0400)]
vircapstest: fix build without LXC, QEMU or XEN

When building without lxc support enabled, build fails with:

CLD     vircapstest
vircapstest.o: In function `test_virCapsDomainDataLookupLXC':
vircapstest.c:(.text+0x9ef): undefined reference to `testLXCCapsInit'

Fix that by hiding LXC tests under appropriate #ifdef. Same applies
for QEMU and XEN.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoscsi: Adjust return values from processLU
John Ferlan [Mon, 30 Mar 2015 22:55:16 +0000 (18:55 -0400)]
scsi: Adjust return values from processLU

https://bugzilla.redhat.com/show_bug.cgi?id=1171933

Adjust the processLU error returns to be a bit more logical. Currently,
the calling code cannot determine the difference between a non disk/lun
volume and a processed/found disk/lun. It can also not differentiate
between perhaps real/fatal error and one that won't necessarily stop
the code from finding other volumes.

After this patch virStorageBackendSCSIFindLUsInternal will stop processing
as soon as a "fatal" message occurs rather than continuting processing
for no apparent reason. It will also only set the *found value when
at least one of the processLU's was successful.

With the failed return, if the reason for the stop was that the pool
target path did not exist, was /dev, was /dev/, or did not start with
/dev, then iSCSI pool startup and refresh will fail.

10 years agoscsi: Change return values for virStorageBackendSCSIFindLUs
John Ferlan [Fri, 17 Apr 2015 01:22:35 +0000 (21:22 -0400)]
scsi: Change return values for virStorageBackendSCSIFindLUs

Rather than passing/returning a pointer to a boolean to indicate that
perhaps we should try again - adjust the return of the call to return
the count of LU's found during processing, then let the caller decide
what to do with that value.

10 years agoscsi: Adjust return value for virStorageBackendSCSINewLun
John Ferlan [Wed, 1 Apr 2015 13:13:05 +0000 (09:13 -0400)]
scsi: Adjust return value for virStorageBackendSCSINewLun

Use virStorageBackendPoolUseDevPath API to determine whether creation of
stable target path is possible for the volume.

This will differentiate a failed virStorageBackendStablePath which won't
need to be fatal. Thus, we'll add a -2 return value to differentiate that
the failure was a result of either the inability to find the symlink for
the device or failure to open the target path directory

10 years agostorage: Fix check for stable path check
John Ferlan [Tue, 21 Apr 2015 10:07:50 +0000 (06:07 -0400)]
storage: Fix check for stable path check

Fix the if (!STRPREFIX(path, "/dev")) to be if (!STRPREFIX(path, "/dev/"))
to ensure a path such as "/device" isn't declared stable.

10 years agostorage: Split out the stable path check
John Ferlan [Tue, 7 Apr 2015 14:53:37 +0000 (10:53 -0400)]
storage: Split out the stable path check

For virStorageBackendStablePath, in order to make decisions in other code
split out the checks regarding whether the pool's target is empty, using /dev,
using /dev/, or doesn't start with /dev

10 years agoxend: Remove a couple of unused function prototypes.
Richard W.M. Jones [Mon, 20 Apr 2015 16:15:12 +0000 (17:15 +0100)]
xend: Remove a couple of unused function prototypes.

Commit 70f446631f142ae92b4d4eb349fcf11408171556 (from 2008) introduced
some functions for testing whether xend was returning correct sound
models.  Those functions have long gone, but the function prototypes
remain.  This commit removes the unused prototypes.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
10 years agodomtop: Properly free cpu status
Michal Privoznik [Sun, 19 Apr 2015 13:58:29 +0000 (15:58 +0200)]
domtop: Properly free cpu status

So, in the example the cpu stats are collected within a function
called do_top. At the beginning of the function we ask the daemon for
how much vCPUs can we get stats, and how many stats for a vCPU can we
get. This is because it's how our API works - users are required to
preallocate a chunk of memory for the results. Now, at the end, we try
to free the allocated array, but we are not doing it correctly.
There's this virTypedParamsFree() function which gets a pointer to the
array and the length of the array. However, if there was an error in
getting vCPU stats we pass a negative number instead of the originally
computed value. This flaw results in SIGSEGV:

libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
ERROR do_top:333 : Unable to get cpu stats
==29201== Invalid read of size 4
==29201==    at 0x4F1DF8B: virTypedParamsClear (virtypedparam.c:1145)
==29201==    by 0x4F1DFEB: virTypedParamsFree (virtypedparam.c:1165)
==29201==    by 0x4023C3: do_top (domtop.c:349)
==29201==    by 0x40260B: main (domtop.c:386)
==29201==  Address 0x131cd7c0 is 16 bytes after a block of size 768 alloc'd
==29201==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==29201==    by 0x401FF1: do_top (domtop.c:295)
==29201==    by 0x40260B: main (domtop.c:386)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agodomain: conf: Drop expectedVirtTypes
Cole Robinson [Sat, 18 Apr 2015 01:22:48 +0000 (21:22 -0400)]
domain: conf: Drop expectedVirtTypes

This needs to specified in way too many places for a simple validation
check. The ostype/arch/virttype validation checks later in
DomainDefParseXML should catch most of the cases that this was covering.

10 years agocaps: Use DomainDataLookup to replace GuestDefault*
Cole Robinson [Sat, 18 Apr 2015 00:15:25 +0000 (20:15 -0400)]
caps: Use DomainDataLookup to replace GuestDefault*

This revealed that GuestDefaultEmulator was a bit buggy, capable
of returning an emulator that didn't match the passed domain type. Fix
up the test suite input to continue to pass.

10 years agodomain: conf: Use CapabilitiesDomainDataLookup for caps validation
Cole Robinson [Fri, 17 Apr 2015 23:38:04 +0000 (19:38 -0400)]
domain: conf: Use CapabilitiesDomainDataLookup for caps validation

The strange logic here is just to duplicate the previous behavior,
which parts of the test suite are currently relying on.