]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
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.

10 years agodomain: conf: Do ostype/arch/machine parsing earlier
Cole Robinson [Fri, 17 Apr 2015 23:18:59 +0000 (19:18 -0400)]
domain: conf: Do ostype/arch/machine parsing earlier

Just move this code to where we parse virtType. Lots of things depend
on os.type values so it should be handled early like virtType.

10 years agocaps: Add virCapabilitiesDomainDataLookup
Cole Robinson [Fri, 17 Apr 2015 16:38:55 +0000 (12:38 -0400)]
caps: Add virCapabilitiesDomainDataLookup

This is a helper function to look up all capabilities data for all
the OS bits that are relevant to <domain>. This is

- os type
- arch
- domain type
- emulator
- machine type

This will be used to replace several functions in later commits.

10 years agocaps: Convert to use VIR_DOMAIN_VIRT internally
Cole Robinson [Fri, 17 Apr 2015 22:38:10 +0000 (18:38 -0400)]
caps: Convert to use VIR_DOMAIN_VIRT internally

10 years agodomain: Convert os.type to VIR_DOMAIN_OSTYPE enum
Cole Robinson [Fri, 17 Apr 2015 00:11:06 +0000 (20:11 -0400)]
domain: Convert os.type to VIR_DOMAIN_OSTYPE enum

10 years agocaps: Switch AddGuest to take VIR_DOMAIN_OSTYPE value
Cole Robinson [Fri, 17 Apr 2015 22:09:16 +0000 (18:09 -0400)]
caps: Switch AddGuest to take VIR_DOMAIN_OSTYPE value

Rather than an opencoded string. This should be a no-op

10 years agocaps: Use an enum internally for ostype value
Cole Robinson [Thu, 16 Apr 2015 23:18:32 +0000 (19:18 -0400)]
caps: Use an enum internally for ostype value

But the internal API stays the same, and we just convert the value as
needed. Not useful yet, but this is the beginning step of using an enum
for ostype throughout the code.

10 years agodomain: conf: Don't validate VM ostype/arch at daemon startup
Cole Robinson [Fri, 17 Apr 2015 20:37:57 +0000 (16:37 -0400)]
domain: conf: Don't validate VM ostype/arch at daemon startup

When parsing XML, we validate the passed ostype + arch combo against
the detected hypervisor capabilities. This has led to the following
problem:

- Define x86 qemu guest
- qemu is inadvertently removed from the host
- libvirtd is restarted. fails to parse VM config since arch is removed
- 'virsh list --all' is now empty, user is wondering where their VMs went

Add a new internal flag VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS. Use
it when loading VM and snapshot configs from disk.

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

10 years agodomain: conf: Better errors on bad os <type> values
Cole Robinson [Thu, 16 Apr 2015 22:08:17 +0000 (18:08 -0400)]
domain: conf: Better errors on bad os <type> values

If no <os><type> was specified:
  before: unknown OS type no OS type
  after : xml error: an os <type> must be specified

If an <os><type> is specified that's not in our capabiliities data:
  before: unknown OS type: $type
  after : unsupported configuration: no support found for os <type> '$type'

VIR_ERR_OS_TYPE is now unused (as it should be frankly) so drop its strings
as well to save our translators some effort.

10 years agoparallels: make device addressing consistent
Nikolay Shirokovskiy [Mon, 20 Apr 2015 06:25:00 +0000 (09:25 +0300)]
parallels: make device addressing consistent

In Parallels we do not support device name hints
aka <target dev=../> option and full-fledged device
disk device addressing through
<address type=.. controller=.. bus=.. target=.. unit=../>
and have only one index instead.
In this situation to be consistent we can only take
one-to-one mapping from some reasonable subset
of full address. Values outside this subset are
invalid to create Parallels VMs.

Reasonable mapping is default one defined in virDomainDiskDefAssignAddress.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@parallels.com>
10 years agoparallels: fix return status for parallelsConnectOpen
Nikolay Shirokovskiy [Mon, 20 Apr 2015 06:24:00 +0000 (09:24 +0300)]
parallels: fix return status for parallelsConnectOpen

We should return VIR_DRV_OPEN_ERROR in case
if we handle scheme in query but some
error occur. Previously we sometimes
return VIR_DRV_OPEN_DECLINE.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@parallels.com>
10 years agolxc: fix starting a domain with non-strict numa memory mode
Luyao Huang [Mon, 20 Apr 2015 13:33:31 +0000 (15:33 +0200)]
lxc: fix starting a domain with non-strict numa memory mode

 # virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Unknown
 failure in libvirt_lxc startup

Return success when there are no cpuset.mems to be set,
instead of failing without setting an error.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agolxc: fix starting a domain with a cpuset but no numatune
Luyao Huang [Fri, 3 Apr 2015 10:11:15 +0000 (18:11 +0800)]
lxc: fix starting a domain with a cpuset but no numatune

 # virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Invalid value '1-3'
 for 'cpuset.mems': Invalid argument

Free the cpu mask to avoid reusing it as a mem mask
in virCgroupSetCpusetMems
if virDomainNumatuneMaybeFormatNodeset does not set a mask.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agorng: Move sgio attr definition to a separate block
Erik Skultety [Mon, 20 Apr 2015 07:49:36 +0000 (09:49 +0200)]
rng: Move sgio attr definition to a separate block

it might be worth having sgio attribute defined in a separate block the same way
as rawio attribute.

10 years agorng: Forbid to validate mismatched <disk> 'device' and 'type' attributes
Erik Skultety [Fri, 17 Apr 2015 11:14:12 +0000 (13:14 +0200)]
rng: Forbid to validate mismatched <disk> 'device' and 'type' attributes

According to docs, using 'lun' as a value for device attribute is only valid
with disk types 'block' and 'network'. However current RNG schema also allows
a combination type='file' device='lun' which results in a successfull
xml validation, but fails at qemuBuildCommandLine.
Besides fixing the RNG schema, this patch also adds a qemuxml2argvtest
for this case.

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

10 years agoApparmor: removed duplicate nscd rules
Cédric Bosdonnat [Mon, 20 Apr 2015 07:32:04 +0000 (09:32 +0200)]
Apparmor: removed duplicate nscd rules

10 years agodomcaps: Check for architecture more wisely
Michal Privoznik [Wed, 8 Apr 2015 14:59:36 +0000 (16:59 +0200)]
domcaps: Check for architecture more wisely

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

So we have this bug. The virConnectGetDomainCapabilities() API
performs a couple of checks before it produces any result. One of
the checks is if the architecture requested by user can be run by
the binary (again user provided). However, the check is pretty
dumb. It merely compares if the default binary architecture
matches the one provided by user. However, a qemu binary can run
multiple architectures. For instance: qemu-system-ppc64 can run:
ppc, ppcle, ppc64, ppc64le and ppcemb. The default is ppc64, so
if user requested something else, like ppc64le, the check would
have failed without obvious reason.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoschema: Allow multiple machines for VMs and unite architectures
Martin Kletzander [Thu, 9 Apr 2015 08:49:02 +0000 (10:49 +0200)]
schema: Allow multiple machines for VMs and unite architectures

Use the same pattern for all machine types on all archs and same archs
for hvm and exe types.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoqemuDomainShutdownFlags: Set fakeReboot more frequently
zhang bo [Fri, 17 Apr 2015 00:43:58 +0000 (08:43 +0800)]
qemuDomainShutdownFlags: Set fakeReboot more frequently

When a qemu domain is to be rebooted, from outside, at libvirt
level it looks like regular shutdown. To really restart the
domain, libvirt needs to issue reset command on the monitor once
SHUTDOWN event appeared. So, in order to differentiate bare
shutdown and reboot libvirt uses a variable within domain private
data. It's called fakeReboot. When the reboot API is called, the
variable is set, but when the shutdown API is called it must be
cleared out. But it was not for every possible case. So if user
called virDomainReboot(), and there was no ACPI daemon running
inside the guest (so guest didn't initiated shutdown sequence)
and then virDomainShutdown(mode=agent) was called bad thing
happened. We remembered the fakeReboot and instead of shutting
the domain down, we just rebooted it.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoIntroduce virNetDevBandwidthUpdateFilter
Michal Privoznik [Tue, 14 Apr 2015 16:04:30 +0000 (18:04 +0200)]
Introduce virNetDevBandwidthUpdateFilter

This is a simple wrapper around virNetDevBandwidthManipulateFilter() that
will update the desired filter on an interface (usually a network bridge)
with a new MAC address. Although, the MAC address in question usually
refers to some other interface - the one that the filter is constructed
for. Yeah, hard to parse. Thing is, our NATed network has a bridge where
some part of QoS takes place. And vNICs from guests are plugged into
the bridge. However, if a guest decides to change the MAC of its vNIC,
the corresponding qemu process emits an event which we can use to
update the QoS configuration based on the new MAC address.. However,
our QoS hierarchy is currently not notified, therefore it falls apart.
This function (when called in response to the aforementioned event)
will update our QoS hierarchy and duct tape it together again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirnetdevbandwidth.c: Separate tc filter creation to a function
Michal Privoznik [Tue, 14 Apr 2015 11:47:22 +0000 (13:47 +0200)]
virnetdevbandwidth.c: Separate tc filter creation to a function

Not only this simplifies the code a bit, it prepares the
environment for upcoming patches. The new
virNetDevBandwidthManipulateFilter() function is capable of both
removing a filter and adding a new one. At the same time! Yeah,
this is not currently used anywhere but look at the next commit
where you'll see it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirNetDevBandwidthSet: Add priority to filter
Michal Privoznik [Tue, 14 Apr 2015 13:40:17 +0000 (15:40 +0200)]
virNetDevBandwidthSet: Add priority to filter

Currently, when constructing traffic shaping rules, the ingress
filter is created without any priority specified on the command
line. This makes kernel to make up one. While this works, it
simplifies things a bit if we provide the filter priority. In
this case, since it's the root filter lets give it the highest
priority of number 1.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirDomainActualNetDefContentsFormat: Format class_id more frequently
Michal Privoznik [Tue, 14 Apr 2015 15:59:18 +0000 (17:59 +0200)]
virDomainActualNetDefContentsFormat: Format class_id more frequently

After a360912179 the formatting of virDomainActualNetDefPtr was
changed a bit. However, during the function rewrite, iface's class_id
is not formatted as frequently as it could be. In fact, after rewrite
it's formatted only for iface of type VIR_DOMAIN_NET_TYPE_DIRECT where
it makes no sense and is unused. While where needed (_TYPE_NETWORK) is
not formatted at all. This makes the daemon forget it upon daemon
restart resulting in bad behaviour.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agonwfilter: Partly initialize driver even for non-privileged users
Michal Privoznik [Thu, 16 Apr 2015 07:59:22 +0000 (09:59 +0200)]
nwfilter: Partly initialize driver even for non-privileged users

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

This reverts commit b7829f959b33c6e32422222a9ed745c0da7dc696.

The previous fix was not correct. Like everywhere else, a driver is a
global variable allocated in stateInitialize function (or something
similar for stateless drivers). Later, when a driver API is called,
it's possible that the global variable is accessed and dereferenced.
Now, some drivers require root privileges because they undertake some
actions reserved only for the system admin (e.g. manipulating host
firewall). And here's the trouble, the NWFilter state initializer
exited too early when finding out it's running unprivileged, leaving
the global NWFilter driver variable uninitialized. Any subsequent
API call that tried to lock the driver resulted in dereferencing the
driver and thus crash.

On the other hand, in order to not resurrect the bug the original
commit was fixing, Let's forbid the nwfilter define in session mode.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Conflicts:
src/nwfilter/nwfilter_driver.c: Context. Code changed a bit
        since 2013.

10 years agovirNetSocketNewConnectUNIX: Don't unlink(NULL)
Michal Privoznik [Thu, 16 Apr 2015 14:07:15 +0000 (16:07 +0200)]
virNetSocketNewConnectUNIX: Don't unlink(NULL)

There is a possibility that we jump onto error label with @lockpath
still initialized to NULL. Here, the @lockpath should be unlink()-ed,
but passing there a NULL is not a good idea. Don't do that. In fact,
we should call unlink() only if we created the lock file successfully.

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agolxc: move wireless PHYs to a network namespace
Lubomir Rintel [Tue, 14 Apr 2015 16:21:44 +0000 (18:21 +0200)]
lxc: move wireless PHYs to a network namespace

The 802.11 interfaces can not be moved by themselves, their Phy has to move too.

If there are other interfaces, they have to move too -- hopefully it's not too
confusing. This is a less-invasive alternative to defining a new hostdev type
for PHYs.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agolibxl: drop virDomainObj lock when destroying a domain
Jim Fehlig [Wed, 4 Mar 2015 00:54:50 +0000 (17:54 -0700)]
libxl: drop virDomainObj lock when destroying a domain

A destroy operation can take considerable time on large memory
domains due to scrubbing the domain's memory.  Unlock the
virDomainObj while libxl_domain_destroy is executing.

Implement libxlDomainDestroyInternal wrapper to handle unlocking,
calling destroy, and locking.  Change all callers of
libxl_domain_destroy to use the wrapper.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agolibxl: acquire a job when destroying a domain
Jim Fehlig [Sun, 1 Mar 2015 23:22:07 +0000 (16:22 -0700)]
libxl: acquire a job when destroying a domain

A job should be acquired at the beginning of a domain destroy operation,
not at the end when cleaning up the domain.  Fix two occurrences of this
late job acquisition in the libxl driver.  Doing so renders
libxlDomainCleanupJob unused, so it is removed.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agolibxl: Move job acquisition in libxlDomainStart to callers
Jim Fehlig [Mon, 2 Mar 2015 01:24:26 +0000 (18:24 -0700)]
libxl: Move job acquisition in libxlDomainStart to callers

Let callers of libxlDomainStart decide when it is appropriate to
acquire a job on the associated virDomainObj.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agolibxl: support HVM direct kernel boot
Jim Fehlig [Fri, 20 Mar 2015 04:16:11 +0000 (22:16 -0600)]
libxl: support HVM direct kernel boot

Add support for HVM direct kernel boot in libxl.  Also add a
test to verify domXML <-> native conversions.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agoxenconfig: don't use "kernel" for hvmloader
Jim Fehlig [Fri, 20 Mar 2015 01:03:08 +0000 (19:03 -0600)]
xenconfig: don't use "kernel" for hvmloader

In xl config, hvmloader is implied for hvm guests.  It is not
specified with the "kernel" option like xm config.  The "kernel"
option, along with "ramdisk" and "extra", is used for HVM direct
kernel boot.  Instead of using "kernel" option to populate
virDomainDef object's os.loader->path, use hvmloader discovered
when gathering capabilities.

This change required fixing initialization of capabilities in
the test utils and removing 'kernel = "/usr/lib/xen/boot/hvmloader"'
from the test config files.

10 years agoxenconfig: move <os> parsing/formating to config-specific files
Jim Fehlig [Fri, 20 Mar 2015 00:28:49 +0000 (18:28 -0600)]
xenconfig: move <os> parsing/formating to config-specific files

xl and xm differ a bit in how <os> configuration is represented.
E.g. xl config supports <os><nvram .../></os> via its "bios"
setting.

Move the xenParseOS and xenFormatOS functions from xen_common.c
and copy to xen_xl.c and xen_xm.c so they can be customized for
xm vs xl config.  An unfortunate fallout is reordering of entries
in the test config files.

10 years agoxenconfig: remove redunant parsing of device_model
Jim Fehlig [Fri, 20 Mar 2015 00:02:28 +0000 (18:02 -0600)]
xenconfig: remove redunant parsing of device_model

device_model is parsed in xenParseOS(), then later in
xenParseConfigCommon().  <emulator> is not part of <os>,
so makes sense to remove the parsing in xenParseOS().

10 years agoxenconfig: export xenConfigCopyString
Jim Fehlig [Thu, 19 Mar 2015 23:29:38 +0000 (17:29 -0600)]
xenconfig: export xenConfigCopyString

Export xenConfigCopyString for use outside of xen_common.c

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agovirbuffer: fix build on rhel-6
Pavel Hrdina [Thu, 16 Apr 2015 16:32:26 +0000 (18:32 +0200)]
virbuffer: fix build on rhel-6

On rhel-6 is broken gcc that reports this warning:

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

Move the pragma directive before function virBufferEscapeString because
since commit aeb5262e this function uses 'strchr' too.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agostorage: Refactor virStorageBackendSCSINewLun
John Ferlan [Tue, 7 Apr 2015 17:39:01 +0000 (13:39 -0400)]
storage: Refactor virStorageBackendSCSINewLun

Invert the logical of retval and clean up code paths, especially goto's

Signed-off-by: John Ferlan <jferlan@redhat.com>
10 years agovirCondWaitUntil: calculate timespec correctly
Michael Chapman [Thu, 16 Apr 2015 09:27:36 +0000 (19:27 +1000)]
virCondWaitUntil: calculate timespec correctly

ts.tv_nsec was off by a factor of 1000, making timeouts less than a
second in the future often expiring immediately.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
10 years agoqemu: monitor: Refactor and fix monitor checking
Peter Krempa [Tue, 14 Apr 2015 15:52:48 +0000 (17:52 +0200)]
qemu: monitor: Refactor and fix monitor checking

Among all the monitor APIs some where checking if mon is NULL and some
were not. Since it's possible to have mon equal to NULL in case a second
call is attempted once entered the monitor. This requires that every
single API checks for the monitor.

This patch adds a macro that helps checking the state of the monitor and
either refactors existing checking code to use the macro or adds it in
case it was missing.

10 years agodaemon: Prefix sysctl configuration filename with a number
Jiri Denemark [Wed, 15 Apr 2015 09:49:22 +0000 (11:49 +0200)]
daemon: Prefix sysctl configuration filename with a number

Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers
for easier ordering. Let's be consistent with this. I chose 60 for
libvirtd so that it goes after 50-default.conf.

https://bugzilla.redhat.com/show_bug.cgi?id=1084876
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agoqemu: bulk stats: Ignore errors from missing/inaccessible disks
Peter Krempa [Wed, 15 Apr 2015 16:14:30 +0000 (18:14 +0200)]
qemu: bulk stats: Ignore errors from missing/inaccessible disks

Rather than erroring out make the best attempt to retrieve other data if
disks are inaccessible or missing. The failure will still be logged
though.

Since the bulk stats API is called on multiple domains an error like
this makes the API unusable. This regression was introduced by commit
596a13713420e01b20ce3dc3fdbe06d073682675

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

10 years agoRNG schema: allow plain @floor to <bandwidth/>
Michal Privoznik [Tue, 14 Apr 2015 13:54:42 +0000 (15:54 +0200)]
RNG schema: allow plain @floor to <bandwidth/>

The <inbound/> element to <bandwidth/> has several attributes from
which two are mandatory. Well, from two at least one has to be
present: @average or @floor or both. Instead of inventing crazy RNG
schema, let's make all the attributes optional there and rely on our
parsing code to correctly handle the situation.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirNetDevBandwidthPlug: Update function description
Michal Privoznik [Tue, 14 Apr 2015 11:45:30 +0000 (13:45 +0200)]
virNetDevBandwidthPlug: Update function description

The comment is describing arguments passed to the function.
However, there's no @ifmac argument. In 955af4d4 it was replaced
with @ifmac_ptr.  Unfortunately, the comment wasn't updated.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agotests: fix build on old 32-bit platforms
Eric Blake [Wed, 15 Apr 2015 18:50:23 +0000 (12:50 -0600)]
tests: fix build on old 32-bit platforms

gcc 4.1.2 (hello RHEL 5) on 32-bit platforms complains:

vircgrouptest.c: In function 'testCgroupGetPercpuStats':
vircgrouptest.c:627: warning: integer constant is too large for 'long' type
vircgrouptest.c:628: warning: this decimal constant is unsigned only in ISO C90
vircgrouptest.c:634: warning: integer constant is too large for 'long' type
vircgrouptest.c:635: warning: this decimal constant is unsigned only in ISO C90
vircgrouptest.c:636: warning: this decimal constant is unsigned only in ISO C90
vircgrouptest.c:644: warning: integer constant is too large for 'long' type

* tests/vircgrouptest.c (testCgroupGetPercpuStats): Use ULL suffix.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoStrip control codes in virBufferEscapeString
Ján Tomko [Mon, 30 Mar 2015 10:41:40 +0000 (12:41 +0200)]
Strip control codes in virBufferEscapeString

These cannot be represented in XML.

We have been stripping them, but only if the string had
characters that needed escaping: <>"'&

Extend the strcspn check to include control codes, and strip
them even if we don't do any escaping.

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

10 years agoIgnore storage volumes with control codes in their names
Ján Tomko [Tue, 14 Apr 2015 10:30:55 +0000 (12:30 +0200)]
Ignore storage volumes with control codes in their names

To prevent generating invalid XML.

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

10 years agoStrip control characters from sysfs attributes
Ján Tomko [Tue, 14 Apr 2015 10:30:34 +0000 (12:30 +0200)]
Strip control characters from sysfs attributes

Including them in the XML makes them unparsable.

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

10 years agoAdd functions dealing with control characters in strings
Ján Tomko [Tue, 14 Apr 2015 10:30:16 +0000 (12:30 +0200)]
Add functions dealing with control characters in strings

Add virStringHasControlChars that checks if the string has
any control characters other than \t\r\n,
and virStringStripControlChars that removes them in-place.

10 years agotests: rename testStripIPv6BracketsData to testStripData
Ján Tomko [Tue, 14 Apr 2015 10:06:44 +0000 (12:06 +0200)]
tests: rename testStripIPv6BracketsData to testStripData

For reuse with other Strip* functions.

10 years agoAdd an example for EVENT_ID_DEVICE_ADDED
Ján Tomko [Tue, 14 Apr 2015 12:56:09 +0000 (14:56 +0200)]
Add an example for EVENT_ID_DEVICE_ADDED

10 years agoEmit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED in the QEMU driver
Ján Tomko [Mon, 30 Mar 2015 18:08:47 +0000 (20:08 +0200)]
Emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED in the QEMU driver

Only for devices that have an alias.

10 years agoAdd VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event
Ján Tomko [Mon, 30 Mar 2015 16:46:21 +0000 (18:46 +0200)]
Add VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event

The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED.

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

10 years agoCleanup "/sys/class/net" usage
Michal Privoznik [Wed, 15 Apr 2015 09:45:47 +0000 (11:45 +0200)]
Cleanup "/sys/class/net" usage

Throughout the code, we have several places need to construct a path
somewhere in /sys/class/net/... They are not consistent and nearly
each code piece invents its own way how to do it. So unify this by:

1) use virNetDevSysfsFile() wherever possible

2) At least use common macro SYSFS_NET_DIR declared in virnetdev.h at
   the rest of places which can't go with 1)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agotests: Add virnetdevtestdata to EXTRA_DIST
Michal Privoznik [Wed, 15 Apr 2015 08:09:52 +0000 (10:09 +0200)]
tests: Add virnetdevtestdata to EXTRA_DIST

In one of my previous commits (49ed6cff9) I've introduced a test
among with some files stored under virnetdevtestdata folder.
While this works perfectly within a git tree, the folder was not
getting into .tar.gz and therefore the dist-check would fail.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agotests: Resolve Coverity RESOURCE_LEAK
John Ferlan [Wed, 15 Apr 2015 14:16:36 +0000 (10:16 -0400)]
tests: Resolve Coverity RESOURCE_LEAK

Commit id 'b77ce18a2' added a new bitmap, but neglected to virBitmapFree it

10 years agovirsh: fix regression in 'virsh event' by domain
Eric Blake [Tue, 14 Apr 2015 22:15:06 +0000 (16:15 -0600)]
virsh: fix regression in 'virsh event' by domain

Commit a0670ae caused a regression in 'virsh event' and
'virsh qemu-monitor-event' - if a user tries to filter the
command to a specific domain, an error message is printed:

$ virsh event dom --loop
error: internal error: virsh qemu-monitor-event: no domain VSH_OT_DATA option

and then the command continues as though no domain had been
supplied (giving events for ALL domains, instead of the
requested one).  This is because the code was incorrectly
assuming that all "domain" options would be supplied via a
mandatory VSH_OT_DATA, even though "domain" is optional for
these two commands, so we had changed them to VSH_OT_STRING
to quit failing for other reasons (ever since it was decided
that VSH_OT_DATA and VSH_OT_STRING should no longer be
synonyms).

In looking at the situation, though, the code for looking up
a domain was making a pointless check for whether the option
exists prior to finding the option's string value, as
vshCommandOptStringReq does just fine at reporting any errors
when looking up a string whether or not the option was present.

So this is a case of regression fixing by pure code deletion :)

* tools/virsh-domain.c (vshCommandOptDomainBy): Drop useless filter.
* tools/virsh-interface.c (vshCommandOptInterfaceBy): Likewise.
* tools/virsh-network.c (vshCommandOptNetworkBy): Likewise.
* tools/virsh-nwfilter.c (vshCommandOptNWFilterBy): Likewise.
* tools/virsh-secret.c (vshCommandOptSecret): Likewise.
* tools/virsh.h (vshCmdHasOption): Drop unused function.
* tools/virsh.c (vshCmdHasOption): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agonode: udev: Remove some redundant error reports
Peter Krempa [Wed, 15 Apr 2015 12:49:14 +0000 (14:49 +0200)]
node: udev: Remove some redundant error reports

All the called functions already report an error.

10 years agovirPidFileConstructPath: Drop useless VIR_FREE()
Michal Privoznik [Wed, 15 Apr 2015 13:01:02 +0000 (15:01 +0200)]
virPidFileConstructPath: Drop useless VIR_FREE()

If a virAsprintf() within the function fails, we call VIR_FREE()
over @rundir variable and jump onto cleanup label, where it is
freed again.  It doesn't hurt, but not make much sense too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemu: monitor: Fix qemuMonitorGetAllBlockStatsInfo with HMP
Peter Krempa [Tue, 14 Apr 2015 15:08:23 +0000 (17:08 +0200)]
qemu: monitor: Fix qemuMonitorGetAllBlockStatsInfo with HMP

Commit f6563bc3 introduced HMP impl of the function (so that a different
uglier function could be removed). Before the HMP code is called there's
a leftover check that the monitor is JSON which inhibits the code from
working.

10 years agoqemu: monitor: @running in qemuMonitorGetStatus is always non-NULL
Peter Krempa [Tue, 14 Apr 2015 15:00:23 +0000 (17:00 +0200)]
qemu: monitor: @running in qemuMonitorGetStatus is always non-NULL

Add the attribute and remove the check.

10 years agoqemu: monitor: Don't use 'ret' variable where not necessary
Peter Krempa [Tue, 14 Apr 2015 14:19:04 +0000 (16:19 +0200)]
qemu: monitor: Don't use 'ret' variable where not necessary

Quite a lot places set the 'ret' variable just once right before
returning it's value. Remove such usage.

10 years agoqemu: monitor: Ensure that qemuMonitorSetLink is called with non-null name
Peter Krempa [Tue, 14 Apr 2015 13:26:36 +0000 (15:26 +0200)]
qemu: monitor: Ensure that qemuMonitorSetLink is called with non-null name

10 years agoqemu: monitor: Sanitize control flow in qemuMonitorSetCapabilities
Peter Krempa [Tue, 14 Apr 2015 13:17:10 +0000 (15:17 +0200)]
qemu: monitor: Sanitize control flow in qemuMonitorSetCapabilities

10 years agoqemu: monitor: Clean up coding style
Peter Krempa [Tue, 14 Apr 2015 13:14:23 +0000 (15:14 +0200)]
qemu: monitor: Clean up coding style

Fix line spacing between functions, ensure that function return type is
on a separate line and reflow arguments for VIR_DEBUG statements.

10 years agovirNetSocketNewConnectUNIX: Use flocks when spawning a daemon
Michal Privoznik [Thu, 2 Apr 2015 12:41:17 +0000 (14:41 +0200)]
virNetSocketNewConnectUNIX: Use flocks when spawning a daemon

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

Even though we have a mutex mechanism so that two clients don't spawn
two daemons, it's not strong enough. It can happen that while one
client is spawning the daemon, the other one fails to connect.
Basically two possible errors can happen:

  error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': Connection refused

or:

  error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': No such file or directory

The problem in both cases is, the daemon is only starting up, while we
are trying to connect (and fail). We should postpone the connecting
phase until the daemon is started (by the other thread that is
spawning it). In order to do that, create a file lock 'libvirt-lock'
in the directory where session daemon would create its socket. So even
when called from multiple processes, spawning a daemon will serialize
on the file lock. So only the first to come will spawn the daemon.

Tested-by: Richard W. M. Jones <rjones@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agojson: export non-static functions
Martin Kletzander [Mon, 13 Apr 2015 14:11:03 +0000 (16:11 +0200)]
json: export non-static functions

Two non-static functions in virjson.c were missing their export info in
libvirt_private.syms, so they couldn't be used anywhere it the code (and
that's about to get changed).

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoChange virConnectPtr into virObjectLocklable
Martin Kletzander [Thu, 9 Apr 2015 07:43:53 +0000 (09:43 +0200)]
Change virConnectPtr into virObjectLocklable

It already had a virMutex inside, so this is just a cleanup.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agocloseCallback is already lockable, initialize it as such
Martin Kletzander [Tue, 7 Apr 2015 15:18:01 +0000 (17:18 +0200)]
closeCallback is already lockable, initialize it as such

Luckily we are allocating structs as clean memory and
PTHREAD_MUTEX_INITIALIZER is "{ 0 }", so nothing happened, but it should
still be created as lockable object.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoconfigure: Align messages
Martin Kletzander [Tue, 17 Mar 2015 08:45:59 +0000 (09:45 +0100)]
configure: Align messages

The first two were a bit off.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agostorage: Add duplicate devices check for zfs pool def
John Ferlan [Thu, 2 Apr 2015 16:50:07 +0000 (12:50 -0400)]
storage: Add duplicate devices check for zfs pool def

Check proposed pool definitions to ensure they aren't trying to use the
same devices as currently defined definitions - disallow the duplicate

10 years agostorage: Add duplicate source pool for Gluster pool def
John Ferlan [Thu, 2 Apr 2015 16:48:04 +0000 (12:48 -0400)]
storage: Add duplicate source pool for Gluster pool def

Check the proposed pool source host XML definition against existing gluster
pools to ensure the incoming definition doesn't use the same source dir and
soure host XML definition as an existing pool.

10 years agostorage: Add duplicate host check for Sheepdog pool def
John Ferlan [Thu, 2 Apr 2015 16:46:00 +0000 (12:46 -0400)]
storage: Add duplicate host check for Sheepdog pool def

Check the proposed pool source host XML definition against existing sheepdog
pools to ensure the incoming definition doesn't use the same source host XML
definition as an existing pool.

10 years agostorage: Remove default from switch in virStoragePoolSourceFindDuplicate
John Ferlan [Thu, 2 Apr 2015 16:39:27 +0000 (12:39 -0400)]
storage: Remove default from switch in virStoragePoolSourceFindDuplicate

So that we can cover all the cases.

10 years agostorage: Use virStoragePoolSourceMatchSingleHost for NETFS
John Ferlan [Wed, 1 Apr 2015 18:09:05 +0000 (14:09 -0400)]
storage: Use virStoragePoolSourceMatchSingleHost for NETFS

Rather than have duplicate code doing the same check, have the netfs
matching processing code use the new virStoragePoolSourceMatchSingleHost.

Signed-off-by: John Ferlan <jferlan@redhat.com>
10 years agostorage: Add check for different ports for host duplicate matching
John Ferlan [Mon, 13 Apr 2015 21:11:53 +0000 (17:11 -0400)]
storage: Add check for different ports for host duplicate matching

In virStoragePoolSourceMatchSingleHost, add a comparison for port number
being different prior to checking the 'name' field.

10 years agostorage: Create virStoragePoolSourceMatchSingleHost
John Ferlan [Wed, 1 Apr 2015 18:05:54 +0000 (14:05 -0400)]
storage: Create virStoragePoolSourceMatchSingleHost

Split out the nhost == 1 and hosts[0].name logic into a separate routine

Signed-off-by: John Ferlan <jferlan@redhat.com>
10 years agostorage: Refactor iSCSI Source matching
John Ferlan [Mon, 30 Mar 2015 23:59:26 +0000 (19:59 -0400)]
storage: Refactor iSCSI Source matching

Create a separate iSCSI Source matching subroutine. Makes the calling
code a bit cleaner as well as sets up for future patches which need to
do better source hosts[0].name processing/checking.

As part of the effort the logic will be inverted from a multi-level
if statement to a series of single level checks for better readability
and further separation

Signed-off-by: John Ferlan <jferlan@redhat.com>
10 years agosanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails
Jiri Denemark [Tue, 14 Apr 2015 14:27:37 +0000 (16:27 +0200)]
sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails

When acquiring resource via sanlock fails, we would report it as
VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using
libvirt. Moreover, the lockd driver would report the same failure as
VIR_ERR_RESOURCE_BUSY, which looks better.

Unfortunately, in sanlock driver we don't really know if acquiring the
resource failed because it was already locked or there was another
reason behind. But the end result is the same and I think using
VIR_ERR_RESOURCE_BUSY reason for all acquire failures is still better
than what we have now.

https://bugzilla.redhat.com/show_bug.cgi?id=1165119
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agobuild: provide virNetDevSysfsFile on non-Linux
Eric Blake [Tue, 14 Apr 2015 19:53:04 +0000 (13:53 -0600)]
build: provide virNetDevSysfsFile on non-Linux

Commit 49ed6cff is broken on mingw and other non-linux platforms:

  CCLD     libvirt.la
  Cannot export virNetDevSysfsFile: symbol not defined
  collect2: error: ld returned 1 exit status

* src/util/virnetdev.c: Provide virNetDevSysfsFile fallback.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agobuild: include correct header for time()
Eric Blake [Tue, 14 Apr 2015 19:15:06 +0000 (13:15 -0600)]
build: include correct header for time()

Found by ./autobuild.sh during a mingw cross-compile:

Commit 8a96e87 was not innocuous - glibc happens to leak the
definition of time() through other headers, so that even without
<sys/select.h>, virrandom.c compiled just fine.  But on mingw,
we were not so lucky; <sys/select.h> was important for its side
effect of dragging in <time.h>, and we now have nothing providing
the declaration of time():

../../src/util/virrandom.c: In function 'virRandomOnceInit':
../../src/util/virrandom.c:65:5: error: implicit declaration of function 'time' [-Werror=implicit-function-declaration]
     unsigned int seed = time(NULL) ^ getpid();
          ^
  ../../src/util/virrandom.c:65:5: error: nested extern declaration of 'time' [-Werror=nested-externs]

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoIntroduce virnetdevtest
Michal Privoznik [Wed, 11 Jun 2014 13:05:00 +0000 (15:05 +0200)]
Introduce virnetdevtest

This is yet another test for check of basic functionality of our
NIC state handling code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agocfg: Disallow usage of 'index' as variable name
John Ferlan [Tue, 14 Apr 2015 11:37:41 +0000 (07:37 -0400)]
cfg: Disallow usage of 'index' as variable name

Since we've run afoul of the Xen-devel build for shadowing a global
declaration of 'index', just disallow using index for a variable name

10 years agonwfilter: Change 'index' to 'idx'
John Ferlan [Tue, 14 Apr 2015 11:36:23 +0000 (07:36 -0400)]
nwfilter: Change 'index' to 'idx'

Forthcoming syntax check rule will disallow usage of 'int index', so
change it for nwfilter

10 years agosnapshot: Change 'index' to 'idx'
John Ferlan [Tue, 14 Apr 2015 11:35:29 +0000 (07:35 -0400)]
snapshot: Change 'index' to 'idx'

Forthcoming syntax check rule will disallow usage of 'int index', so
change it for snapshot

10 years agoutil: Use 'idx' instead of 'index'
John Ferlan [Tue, 14 Apr 2015 11:34:24 +0000 (07:34 -0400)]
util: Use 'idx' instead of 'index'

Impending syntax checker will disallow 'int index', so change it here.

10 years agoqemu: Adjust the prototype to match the function
John Ferlan [Tue, 14 Apr 2015 11:28:57 +0000 (07:28 -0400)]
qemu: Adjust the prototype to match the function

Changing the prototype to not have "int *index" since we'll soon be
disallowing index as a name. Curiously the original commit (a4504ac)
for the function used 'int idx' in the function - so they didn't match.
Now they do.

10 years agoAdd articles to virDomainDeviceDetachFlags docs
Ján Tomko [Tue, 14 Apr 2015 13:29:15 +0000 (15:29 +0200)]
Add articles to virDomainDeviceDetachFlags docs

Reported by John Ferlan.

10 years agoxen: fix build error on rhel-5
Pavel Hrdina [Tue, 14 Apr 2015 12:41:56 +0000 (14:41 +0200)]
xen: fix build error on rhel-5

../../src/xen/block_stats.c:82: warning: dereferencing type-punned
    pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agosparc: Add default PCI root controller
Martin Kletzander [Thu, 9 Apr 2015 08:38:28 +0000 (10:38 +0200)]
sparc: Add default PCI root controller

It is there even with -nodefaults and -no-user-config, so count with
that so we can start sparc domains.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agohostdev: fix loop index error when resetvfnetconfig
Huanle Han [Thu, 2 Apr 2015 15:56:19 +0000 (23:56 +0800)]
hostdev: fix loop index error when resetvfnetconfig

The variable 'last_processed_hostdev_vf' indicates index of the last
successfully configed vf. When resetvfnetconfig because of failure,
hostdevs[last_processed_hostdev_vf] should also be reset.

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
10 years agoqemu: fix index error when clean up vport profile
Huanle Han [Tue, 7 Apr 2015 18:40:15 +0000 (02:40 +0800)]
qemu: fix index error when clean up vport profile

1. 'last_good_net' indicates the index of last successfully configured
net. so def->nets[last_good_net] should also be clean up if error occurs.

2. if error occurs in 'virNetDevMacVLanVPortProfileRegisterCallback'
(second 'goto err_exit' in loop), we should also do
'virNetDevVPortProfileDisassociate' cleanup for the
'virNetDevVPortProfileAssociate'(first code block in loop). So we should
consider the net is successfully configured after first code block in
loop finishes.

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
10 years agovirt-aa-helper: add unix channels (esp for qemu-guest-agent)
Serge Hallyn [Fri, 10 Apr 2015 20:21:03 +0000 (20:21 +0000)]
virt-aa-helper: add unix channels (esp for qemu-guest-agent)

The original bug report was at
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1393842

Also skip abstract unix sockets.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>