]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
9 years agoqemu: use controller alias when constructing device/controller args
Laine Stump [Thu, 30 Apr 2015 17:19:10 +0000 (13:19 -0400)]
qemu: use controller alias when constructing device/controller args

This makes sure that that the commandlines generated for devices and
controller devices are all using the alias that has been set in the
controller's object as the id of the controller, rather than
hardcoding a printf (or worse, encoding exceptions to the standard
${controller}${index} into the logic)

Since this "fixes" the controller name used for the sata controller,
the commandline arg for the sata controller in the sata test case had
to be adjusted to be "sata0" instead of "ahci0". All other tests
remain unchanged, verifying that the patch causes no other functional
change.

Because the function that finds a controller alias based on a device
def requires a pointer to the full domainDef in order to get the list
of controllers, the arglist of a few functions had to have this added.

9 years agoqemu: fix exceptions in qemuAssignDeviceControllerAlias
Laine Stump [Tue, 12 May 2015 00:51:52 +0000 (20:51 -0400)]
qemu: fix exceptions in qemuAssignDeviceControllerAlias

There are a few extra exceptions that weren't being accounted for when
creating the alias for a controller. This resulted in 1) incorrect
status XML, and 2) exceptions/printfs of what *should* have been
directly available in the controller alias when constructing device
commandline arguments:

1) The primary (and only) IDE controller on a 440FX machinetype is
hardcoded to be "ide" in qemu.

2) The primary SATA controller on a 440FX machinetype is also
hardcoded to be "ide" in qemu.

3) On machinetypes that don't support multiple PCI buses, the PCI bus
is hardcoded in qemu to have the name "pci".

4) The first usb master controller is "usb", all others are the normal
"usb%d". (note that usb controllers that are not a "master" will have
the same index, and thus alias, as the master).

We needed to pass in the full domainDef and qemuCaps in order to
properly make the decisions about these exceptions.

9 years agoconf: utility to return alias of a controller based on type/index
Laine Stump [Wed, 29 Apr 2015 19:37:20 +0000 (15:37 -0400)]
conf: utility to return alias of a controller based on type/index

Because there are multiple potential reasons for an error, this
function logs any errors before returning NULL (since the caller won't
have the information needed to determine which was the reason for
failure).

9 years agoqemu: Don't give up on first error in qemuMigrationCancelDriverMirror
Jiri Denemark [Mon, 11 May 2015 18:15:43 +0000 (20:15 +0200)]
qemu: Don't give up on first error in qemuMigrationCancelDriverMirror

When cancelling drive mirror, always try to do that for all disks even
if it fails for some of them. Report the first error we saw.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoqemu: Keep track of what disks are being migrated
Jiri Denemark [Mon, 11 May 2015 18:10:06 +0000 (20:10 +0200)]
qemu: Keep track of what disks are being migrated

Instead of redoing the same filtering over and over everytime we need to
walk through all disks which are being migrated.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoMove QEMU-only fields from virDomainDiskDef into privateData
Jiri Denemark [Wed, 13 May 2015 09:20:36 +0000 (11:20 +0200)]
Move QEMU-only fields from virDomainDiskDef into privateData

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoRename virDomainHasBlockjob as qemuDomainHasBlockjob
Jiri Denemark [Wed, 13 May 2015 07:47:21 +0000 (09:47 +0200)]
Rename virDomainHasBlockjob as qemuDomainHasBlockjob

And move it to qemu_domain.[ch] because this API is QEMU-only.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoAdd privateData to virDomainDiskDef
Jiri Denemark [Wed, 13 May 2015 07:00:02 +0000 (09:00 +0200)]
Add privateData to virDomainDiskDef

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoreject out of range memory in SetMemory APIs
Ján Tomko [Tue, 5 May 2015 15:58:49 +0000 (17:58 +0200)]
reject out of range memory in SetMemory APIs

The APIs take the memory value in KiB and we store it in KiB
internally, but we cannot parse the whole ULONG_MAX range
on 64-bit systems, because virDomainParseScaledValue
needs to fit the value in bytes in an unsigned long long.

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

9 years agoSome alignment fixes in lxc_controller and jsontest
Martin Kletzander [Tue, 12 May 2015 12:40:34 +0000 (14:40 +0200)]
Some alignment fixes in lxc_controller and jsontest

Again, a clean-up for which we don't have proper syntax-check.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agogendispatch: Don't generate long lines
Martin Kletzander [Thu, 7 May 2015 08:02:32 +0000 (10:02 +0200)]
gendispatch: Don't generate long lines

We don't allow it in normal code, why would it need to be in the
generated one.  IT also splits the line in perl code so it's readable.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agovirnetserver: Remove unnecessary double space
Martin Kletzander [Thu, 7 May 2015 08:01:50 +0000 (10:01 +0200)]
virnetserver: Remove unnecessary double space

Since we don't have syntax-check for this, it has to be checked
manually.  Let's hope this is the only place it happened.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agorpc: Don't mix max_clients and max_workers in PostExecRestart
Martin Kletzander [Thu, 7 May 2015 08:01:32 +0000 (10:01 +0200)]
rpc: Don't mix max_clients and max_workers in PostExecRestart

This only affected the servers that re-exec themselves, which is only
virtlockd and it didn't do any mess, so this is mostly a clenaup.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoqemu: Clear autofil fill flag when pinning iothread
John Ferlan [Wed, 6 May 2015 14:19:30 +0000 (10:19 -0400)]
qemu: Clear autofil fill flag when pinning iothread

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

Treat pinning an IOThread via API as if someone added an IOThread to
ensure the iothreadid doesn't cause the guest to disappear

9 years agoconf: Expose iothreadids when delete non sequential iothreadids
John Ferlan [Wed, 6 May 2015 14:13:54 +0000 (10:13 -0400)]
conf: Expose iothreadids when delete non sequential iothreadids

Since 'autofill'd iothreadid entries are not written during XML format
processing, it is possible that if an iothreadid in the middle of an
autofilled list would then change it's id on a subsequent restart.

Thus during the iothreadid deletion, if we determine the delete is not
the "last" thread, then clear the autofill bit for all iothreadid's
following the one being deleted (either the first or one in the middle).
This way, iothreadid's will be printed/saved.

9 years agovirsh: Report an error when cpulist parsing fails
Luyao Huang [Mon, 11 May 2015 08:25:19 +0000 (16:25 +0800)]
virsh: Report an error when cpulist parsing fails

When parsing a cpulist, the virBitmapParse is used. On an invalid
bitmap an error is reported, but the error gets cleared
immediately by subsequent public APIs call, e.g. virDomainFree().
Moreover, we don't check whether bitmap fits into maximal CPU ID
on the host. Therefore the following examples failed without any
error:

 # virsh vcpupin test3 1 aaa

 # virsh vcpupin test3 1 1000

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agoparallels: remove connection wide wait timeout
Nikolay Shirokovskiy [Wed, 13 May 2015 14:23:00 +0000 (17:23 +0300)]
parallels: remove connection wide wait timeout

We have a lot of passing arguments code just to pass connection
object cause it holds jobTimeout. Taking into account that
right now this value is defined at compile time let's just
get rid of it and make arguments list more clear in many
places.

In case we later need some runtime configurable timeout
value we can provide this value through arguments
function already operate such as a parallels domain
object etc as this timeouts are operation( and thus
object) specific in practice.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@parallels.com>
9 years agoqemuMigrationPrepareAny: Drop useless variable @now
zhang bo [Wed, 13 May 2015 05:56:00 +0000 (13:56 +0800)]
qemuMigrationPrepareAny: Drop useless variable @now

As of eeb008dbfcf31 the variable is not used anymore. Drop it.

Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agomaint: Ignore Vim swap files
Andrea Bolognani [Tue, 5 May 2015 11:34:06 +0000 (13:34 +0200)]
maint: Ignore Vim swap files

This removes some noise when you're working on the repository
and also have a bunch of source files open in Vim in another
terminal.

9 years agoFix build --without-network
Martin Kletzander [Mon, 27 Apr 2015 11:25:51 +0000 (13:25 +0200)]
Fix build --without-network

In order not to bring in any link dependencies, bridge driver doesn't
use the usual stubs as other conditionally-built code does.  However,
having the function as a macro imposes a problem with possibly unused
variables if just defined as "0".  This was worked around by using
(dom=dom, iface=iface, 0) which should act like a 0 if used in a
condition.  However, gcc still bugs about that, so I came up with
another way how to fix that.

Using static inline functions in the header won't collide with anything,
it fixes the bug and does one thing that the macro didn't do.  It checks
whenther passed variables are pointers of compatible type.  It has only
one downside, and that is that we need to either a) define it with
ATTRIBUTE_UNUSED, which needs an exception in cfg.mk or b) do something
like ignore_value(variable); in the function body.  I went with the
first variant.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoAssign virtio-serial addresses after coldplugging a device
Ján Tomko [Thu, 7 May 2015 11:15:06 +0000 (13:15 +0200)]
Assign virtio-serial addresses after coldplugging a device

Otherwise we might allow coldplugging a device
that uses an address that is already occupied, creating
an unstartable domain.

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

9 years agoqemu: vnc: error out for invalid port number
Pavel Hrdina [Tue, 12 May 2015 16:18:14 +0000 (18:18 +0200)]
qemu: vnc: error out for invalid port number

In the XML we have the vnc port number, but QEMU takes on command line
a vnc screen number, it's port-5900.  We should fail with error message
that only ports in range [5900,65535] are valid.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9 years agovirSysinfoParseProcessor: Drop useless check for NULL
Michal Privoznik [Tue, 12 May 2015 15:49:59 +0000 (17:49 +0200)]
virSysinfoParseProcessor: Drop useless check for NULL

VIR_STRDUP plays nicely with NULLs. Theres no need to guard its
call with check for non-NULL.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agolibxl: support VNC passwd
Jim Fehlig [Tue, 28 Apr 2015 00:20:30 +0000 (18:20 -0600)]
libxl: support VNC passwd

While implementing support for SPICE, I noticed VNC passwd was
never copied to libxl_device_vfb's vnc.passwd field.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
9 years agoconf: Remove source host name check for iSCSI
John Ferlan [Mon, 11 May 2015 17:51:04 +0000 (13:51 -0400)]
conf: Remove source host name check for iSCSI

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

Remove the check for the source host name for iSCSI source XML processing
declaring duplicate sources when the source device path and if present the
initiator of a proposed storage pool matches an existing storage pool.

The backend iSCSI storage driver uses 'iscsiadm --mode session' to query
available iscsid target sessions. The output displayed is the IP address
and the IQN (target path) of known targets. The displayed IP address
is a resolved address based on the session --login. Additionally, iscsid
keeps track of the various ways to define the host name (IPv4 Address,
IPv6 Address, /etc/hosts, etc.) for that IQN (see output of an 'iscsiadm
--mode node'). If an incoming IQN matches and the host name provided by
libvirt is resolved to the existing IQN, then iscsid will "reuse" the
session. Although libvirt could do the same name resolution, if there
is a difference, iscsid could still declare two seemingly different sources
to be the same and not create a new session which means libvirt now has
two storage pools looking at the same source. Thus to avoid any strange
host name resolution issues, just rely on iscsid for that and do not
allow multiple pools on the same host to use the same device path (IQN).

9 years agoconf: Adjust duplicate source host port check
John Ferlan [Mon, 11 May 2015 14:19:39 +0000 (10:19 -0400)]
conf: Adjust duplicate source host port check

Only perform the port number check if the incoming definition actually
provides it. Since the port number is optional we could erroneously pass
a duplicate source host check since some storage pool backends which fill
in the default port number (e.g., iSCSI and sheepdog) for the started pool.

9 years agoqemu: fix double free when RNG cold-plug fails
Luyao Huang [Tue, 12 May 2015 13:55:05 +0000 (21:55 +0800)]
qemu: fix double free when RNG cold-plug fails

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

When cold-plugging an RNG device but something fails in
qemuDomainAssignAddresses, we will double free the RNG device.
Once a device is plugged into the domain, we should set the
device pointer to NULL to fix this issue.

...
5  0x00007fb7d180ac8a in virFree at util/viralloc.c:582
6  0x00007fb7d1895cdd in virDomainRNGDefFree at conf/domain_conf.c:19786
7  0x00007fb7d1895d99 in virDomainDeviceDefFree at conf/domain_conf.c:2022
8  0x00007fb7b92b8baf in qemuDomainAttachDeviceFlags at qemu/qemu_driver.c:8785
9  0x00007fb7d190c5d7 in virDomainAttachDeviceFlags at libvirt-domain.c:8488
10 0x00007fb7d23af9d2 in remoteDispatchDomainAttachDeviceFlags at remote_dispatch.h:2842
...

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agodaemon: Suppress logging of VIR_ERR_NO_DOMAIN_METADATA
Peter Krempa [Tue, 12 May 2015 11:55:30 +0000 (13:55 +0200)]
daemon: Suppress logging of VIR_ERR_NO_DOMAIN_METADATA

Similarly to other error codes that notify the user that the object does
not exist lower the priority of VIR_ERR_NO_DOMAIN_METADATA to
VIR_LOG_DEBUG when writing the log entry.

9 years agoconf_capabilities: fix wrong indentation
Pavel Hrdina [Tue, 12 May 2015 10:12:58 +0000 (12:12 +0200)]
conf_capabilities: fix wrong indentation

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9 years agoXML: escape strings where we should do it
Pavel Hrdina [Tue, 5 May 2015 14:52:46 +0000 (16:52 +0200)]
XML: escape strings where we should do it

There is a lot of places, were it's pretty easy for user to enter some
characters that we need to escape to create a valid XML description.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9 years agoDocument that virNodeGetInfo can return mhz == 0.
Richard W.M. Jones [Mon, 11 May 2015 20:24:36 +0000 (21:24 +0100)]
Document that virNodeGetInfo can return mhz == 0.

On the s/390x architecture, libvirt may already return 0 in the
node_info->mhz field (see src/nodeinfo.c:linuxNodeInfoCPUPopulate).

We may also want to return this on aarch64 in future, because
calculating the proper value requires SMBIOS, which is not available
on non-server-class systems (specifically on systems which don't
adhere to the SBSA standard).

Therefore this change documents the existing behaviour and provides a
valid path for aarch64.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Bug-URL: https://bugzilla.redhat.com/1206353

9 years agolibvirt-guests: Initialize SYNC_TIME
Michal Privoznik [Mon, 11 May 2015 16:18:39 +0000 (18:18 +0200)]
libvirt-guests: Initialize SYNC_TIME

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

Since 0fa15b19 we have this variable SYNC_TIME which allows users to
synchronize time on domain resume. However, despite what documentation
says, it's by default on because it's never initialized. Fix this by
setting it to zero at the beginning of the libvirt-guests script.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agoqemu: eliminate duplicated code in qemuBuildDriveDevStr()
Laine Stump [Thu, 30 Apr 2015 16:51:51 +0000 (12:51 -0400)]
qemu: eliminate duplicated code in qemuBuildDriveDevStr()

The code to add device type to the commandline was identical for lsi
and other models of SCSI controllers, but was duplicated (with the
exception of a minor ordering difference of the if-else clauses) for
the two cases. This patch replaces those two with a single instance of
the code just before the if().

9 years agoqemu: use qemuDomainMachineIsI440FX() in appropriate place
Laine Stump [Wed, 29 Apr 2015 16:23:02 +0000 (12:23 -0400)]
qemu: use qemuDomainMachineIsI440FX() in appropriate place

This patch makes qemuValideDevicePCISlotsChipsets() more consistent in
appearance by replacing several clauses of an if with the equivalent
call to qemuDomainMachineIsI440FX. The if was checking exactly the
same items, just in a slightly different order.

9 years agomaint: extend PIE support check
Roman Bogorodskiy [Sat, 9 May 2015 16:06:36 +0000 (19:06 +0300)]
maint: extend PIE support check

GCC installed from FreeBSD ports doesn't support building PIE executables
and fails with:

/usr/local/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 against
`_DYNAMIC' can not be used when making a shared object; recompile with
-fPIC
/usr/lib/crt1.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

However, the configure check for '-fPIC -DPIC' doesn't catch that. In
order to catch this case, add '-pie' to CFLAGS in m4/virt-compile-pie.m4
so it could detect lack of PIE support on configure time and don't fail
the build.

9 years agobhyve: fix bhyvexml2argvtest build with gcc
Roman Bogorodskiy [Sat, 9 May 2015 15:10:50 +0000 (18:10 +0300)]
bhyve: fix bhyvexml2argvtest build with gcc

gcc5 reports an error like this:

bhyvexml2argvtest.c: In function 'testCompareXMLToArgvFiles':
bhyvexml2argvtest.c:24:18: error: variable 'vm' set but not used
[-Werror=unused-but-set-variable]
     virDomainObj vm;
                  ^
cc1: all warnings being treated as errors

Fix by dropping this variable.

9 years agoconf: Report error for unknown shmem ioeventfd value
Luyao Huang [Mon, 11 May 2015 12:59:37 +0000 (20:59 +0800)]
conf: Report error for unknown shmem ioeventfd value

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

Passing the return value to an enum directly is not safe.  Fix this by
comparing the true integer result of virTristateSwitchTypeFromString().

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agoIgnore bridge template names with multiple printf conversions
Ján Tomko [Tue, 28 Apr 2015 15:07:20 +0000 (17:07 +0200)]
Ignore bridge template names with multiple printf conversions

For some reason, we allow a bridge name with %d in it, which we replace
with an unsigned integer to form a bridge name that does not yet exist
on the host.

Do not blindly pass it to virAsprintf if it's not the only conversion,
to prevent crashing on input like:

<network>
  <name>test</name>
  <forward mode='none'/>
  <bridge name='virbr%d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s'/>
</network>

Ignore any template strings that do not have exactly one %d conversion,
like we do in various drivers before calling virNetDevTapCreateInBridgePort.

9 years agoqemu: Fix balloon size handling with memory hot(un)plug
Peter Krempa [Thu, 30 Apr 2015 16:03:41 +0000 (18:03 +0200)]
qemu: Fix balloon size handling with memory hot(un)plug

Since libvirt doesn't call to update the new balloon size in qemu add
code that will handle tweaking of the size of the current balloon
statistic until qemu reports the new size using the event.

9 years agoconf: Fix up balloon size after removing a memory device from def
Peter Krempa [Thu, 30 Apr 2015 15:43:53 +0000 (17:43 +0200)]
conf: Fix up balloon size after removing a memory device from def

To avoid having the ballooned memory size larger than the actual
physical memory size, truncate the ballooned size if it overflows.

9 years agoconf: Always truncate balloon size to maximum memory size
Peter Krempa [Thu, 30 Apr 2015 15:33:41 +0000 (17:33 +0200)]
conf: Always truncate balloon size to maximum memory size

Specifying a balloon size more than the memory size of a guest isn't
something that should be rejected when parsing the XML. Truncate the
size to the maximum memory size.

9 years agoqemu: Convert qemuConnectGetAllDomainStats to use new helpers
Peter Krempa [Wed, 29 Apr 2015 14:41:20 +0000 (16:41 +0200)]
qemu: Convert qemuConnectGetAllDomainStats to use new helpers

Use the new domain list collection helpers to avoid going through
virDomainPtrs.

This additionally implements filter capability when called through the
api that accepts domain list filters.

9 years agoconf: Add helper to convert list of virDomains to a list of virDomainObjs
Peter Krempa [Wed, 29 Apr 2015 14:15:53 +0000 (16:15 +0200)]
conf: Add helper to convert list of virDomains to a list of virDomainObjs

Add virDomainObjListConvert that will take a list of virDomains, apply
filters and return a list of virDomainObjs.

9 years agoconf: Refactor domain list collection critical section
Peter Krempa [Wed, 29 Apr 2015 12:11:09 +0000 (14:11 +0200)]
conf: Refactor domain list collection critical section

Until now the virDomainListAllDomains API would lock the domain list and
then every single domain object to access and filter it. This would
potentially allow a unresponsive VM to block the whole daemon if a
*listAllDomains call would get stuck.

To avoid this problem this patch collects a list of referenced domain
objects first from the list and then unlocks it right away. The
expensive operation requiring locking of the domain object is executed
after the list lock is dropped. While a single blocked domain will still
lock up a listAllDomains call, the domain list won't be held locked and
thus other APIs won't be blocked.

Additionally this patch also fixes the lookup code, where we'd ignore
the vm->removing flag and thus potentially return domain objects that
would be deleted very soon so calling any API wouldn't make sense.

As other clients also could benefit from operating on a list of domain
objects rather than the public domain descriptors a new intermediate
API - virDomainObjListCollect - is introduced by this patch.

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

9 years agoconf: Rename virDomainObjListFilter type to virDomainObjListACLFilter
Peter Krempa [Wed, 29 Apr 2015 13:25:34 +0000 (15:25 +0200)]
conf: Rename virDomainObjListFilter type to virDomainObjListACLFilter

The passed function is meant to filter domains according to ACL match.

9 years agoconf: Extract code to filter domain list into a separate function
Peter Krempa [Wed, 29 Apr 2015 11:18:37 +0000 (13:18 +0200)]
conf: Extract code to filter domain list into a separate function

Separate the code to simplify future refactors.

9 years agoutil: Make the virDomainListFree helper more universal
Peter Krempa [Wed, 29 Apr 2015 09:54:58 +0000 (11:54 +0200)]
util: Make the virDomainListFree helper more universal

Extend it to a universal helper used for clearing lists of any objects.
Note that the argument type is specifically void * to allow implicit
typecasting.

Additionally add a helper that works on non-NULL terminated arrays once
we know the length.

10 years agocaps: Fix regression defaulting to host arch
Cole Robinson [Wed, 6 May 2015 22:32:05 +0000 (18:32 -0400)]
caps: Fix regression defaulting to host arch

My commit 747761a79 (v1.2.15 only) dropped this bit of logic when filling
in a default arch in the XML:

-    /* First try to find one matching host arch */
-    for (i = 0; i < caps->nguests; i++) {
-        if (caps->guests[i]->ostype == ostype) {
-            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
-                if (caps->guests[i]->arch.domains[j]->type == domain &&
-                    caps->guests[i]->arch.id == caps->host.arch)
-                    return caps->guests[i]->arch.id;
-            }
-        }
-    }

That attempt to match host.arch is important, otherwise we end up
defaulting to i686 on x86_64 host for KVM, which is not intended.
Duplicate it in the centralized CapsLookup function.

Additionally add some testcases that would have caught this.

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

10 years agotests: Remove redundant aarch64 tests
Cole Robinson [Wed, 6 May 2015 23:04:52 +0000 (19:04 -0400)]
tests: Remove redundant aarch64 tests

My commit 7b9de914 added some aarch64 CPU test cases. I wanted to test
two different code paths but inadvertently added two of the same test
cases.

The second code path (using <cpu><model>host</model</cpu>) isn't easily
exercised via the qemu tests anyways, I'll need to look elsewhere.

Regardless, remove the redundant tests for now

10 years agoprocessSerialChangedEvent: Close agent monitor early
Michal Privoznik [Thu, 7 May 2015 09:19:38 +0000 (11:19 +0200)]
processSerialChangedEvent: Close agent monitor early

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

So, imagine you've issued an API that involves guest agent. For
instance, you want to query guest's IP addresses. So the API acquires
QUERY_JOB, locks the guest agent and issues the agent command.
However, for some reason, guest agent replies to initial ping
correctly, but then crashes tragically while executing real command
(in this case guest-network-get-interfaces). Since initial ping went
well, libvirt thinks guest agent is accessible and awaits reply to the
real command. But it will never come. What will is a monitor event.
Our handler (processSerialChangedEvent) will try to acquire
MODIFY_JOB, which will fail obviously because the other thread that's
executing the API already holds a job. So the event handler exits
early, and the QUERY_JOB is never released nor ended.

The way how to solve this is to put flag somewhere in the monitor
internals. The flag is called @running and agent commands are issued
iff the flag is set. The flag itself is set when we connect to the
agent socket. And unset whenever we see DISCONNECT event from the
agent. Moreover, we must wake up all the threads waiting for the
agent. This is done by signalizing the condition they're waiting on.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemuDomainShutdownFlags: check for domain activeness prior to guest presence
Michal Privoznik [Wed, 6 May 2015 13:40:15 +0000 (15:40 +0200)]
qemuDomainShutdownFlags: check for domain activeness prior to guest presence

Running shutdown with mode agent on a shutoff domain gives cryptic
error message:

    virsh # shutdown --mode agent gentoo
    error: Failed to shutdown domain gentoo
    error: Guest agent is not responding: QEMU guest agent is not connected

After this patch, the error is more clear:

    virsh # shutdown --mode agent gentoo
    error: Failed to shutdown domain gentoo
    error: Requested operation is not valid: domain is not running

Reported-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agolxc: don't up the veth interfaces unless explicitly asked to
Lubomir Rintel [Fri, 24 Apr 2015 13:52:56 +0000 (15:52 +0200)]
lxc: don't up the veth interfaces unless explicitly asked to

Upping an interface for no reason and not configuring it is a cardinal sin.

With the default addrgenmode if eui64 it sticks a link-local address to the
interface. That is not good, as NetworkManager would see an address configured,
assume the interface is already configured and won't touch it iself and the
interface might stay unconfigured until the end of the days.

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemu: multiqueue for ccw devices
Boris Fiuczynski [Wed, 6 May 2015 14:07:40 +0000 (16:07 +0200)]
qemu: multiqueue for ccw devices

Allow ccw devices to be used with multiqueues. ccw provides a one to
one relation of fds to queues and does not support the vectors option.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
10 years agoqemu: Resolve Coverity FORWARD_NULL
John Ferlan [Tue, 5 May 2015 11:13:19 +0000 (07:13 -0400)]
qemu: Resolve Coverity FORWARD_NULL

Coverity points out that qemuMonitorGetAllBlockStatsInfo could return a
-1 and thus not fill in 'stats' (leaving it NULL). Then the call to
qemuMonitorBlockStatsUpdateCapacity will dereference it.

10 years agoqemu: Resolve Coverity FORWARD_NULL
John Ferlan [Tue, 5 May 2015 10:59:56 +0000 (06:59 -0400)]
qemu: Resolve Coverity FORWARD_NULL

Coverity complains over the [n]values pairing in virQEMUCapsFreeStringList
and rather than make a bunch if "if values" checks prior to calling, by
just adding the values check inside the free function we avoid the chance
that somehow nvalues is > 0, while values == NULL

10 years agoqemu: Resolve Coverity FORWARD_NULL
John Ferlan [Tue, 5 May 2015 10:53:24 +0000 (06:53 -0400)]
qemu: Resolve Coverity FORWARD_NULL

Coverity points out it was possible to have a zero return from
qemuBuildRNGBackendProps thus not filling in 'props' and then
causing a NULL dereference on the next call.

10 years agoxen: Resolve Coverity FORWARD_NULL
John Ferlan [Mon, 4 May 2015 16:00:40 +0000 (12:00 -0400)]
xen: Resolve Coverity FORWARD_NULL

Coverity found that xenXMConfigCacheAddFile has an error path in which
no error message and a -1 was not returned which could have resulted in
a NULL dereference in a VIR_DEBUG statement and of course an erroneous
0 value returned!

10 years agoqemu: Resolve Coverity FORWARD_NULL
John Ferlan [Fri, 1 May 2015 12:55:12 +0000 (08:55 -0400)]
qemu: Resolve Coverity FORWARD_NULL

Coverity notes that ->ifname is used after the VIR_FREE done in the
code path after the call to virNetDevMacVLanDeleteWithVPortProfile
by a call to virNetDevOpenvswitchRemovePort.

Since the ->ifname will be VIR_FREE()'d eventually in virDomainNetDefFree
just remove the extraneous VIR_FREE here.

When originally added, the Openvswitch code wasn't present and checks
were made for non NULL prior to use.

10 years agoqemu: Resolve Coverity IDENTICAL_BRANCHES
John Ferlan [Fri, 1 May 2015 11:55:29 +0000 (07:55 -0400)]
qemu: Resolve Coverity IDENTICAL_BRANCHES

Coverity complains that in the error paths both the < 0 condition and
the success path after the qemuDomainObjExitMonitor failure will end
up going to cleanup.  So just use ignore_value in this error path to
resolve the complaint.

10 years agovbox: Resolve Coverity RESOURCE_LEAK
John Ferlan [Fri, 1 May 2015 11:28:25 +0000 (07:28 -0400)]
vbox: Resolve Coverity RESOURCE_LEAK

If the virStringSearch() returns a 0 (zero), then each of the uses
of the call will just jump to cleanup forgetting to free the returned
empty list. Expand the scope a bit of each use and free at cleanup.

10 years agolibxl: Resolve Coverity RESOURCE_LEAK
John Ferlan [Fri, 1 May 2015 11:25:39 +0000 (07:25 -0400)]
libxl: Resolve Coverity RESOURCE_LEAK

The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd
as well as seach of the Close/Unref on all the socks[i] that is
already done

10 years agolibxl: support soundhw for hvm domains
Jim Fehlig [Mon, 4 May 2015 19:50:10 +0000 (13:50 -0600)]
libxl: support soundhw for hvm domains

The xend driver and the parsing/formating code in src/xenconfig
have long supported soundhw.  Add support in the libxl driver too.

10 years agolibxl: add logrotate config file
Jim Fehlig [Thu, 30 Apr 2015 21:16:49 +0000 (15:16 -0600)]
libxl: add logrotate config file

Add logrotate config for log files in /var/log/libvirt/libxl.

10 years agodocs: fix a small xml error in docs
Luyao Huang [Mon, 30 Mar 2015 08:49:30 +0000 (16:49 +0800)]
docs: fix a small xml error in docs

Signed-off-by: Luyao Huang <lhuang@redhat.com>
10 years agoconf: Add the cpu duplicate use check for vm numa settings
Luyao Huang [Tue, 5 May 2015 10:13:38 +0000 (18:13 +0800)]
conf: Add the cpu duplicate use check for vm numa settings

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

We had a check for the vcpu count total number in <numa>
before, however this check is not good enough. There are
some examples:

1. one of cpu id is out of maxvcpus, can set success(cpu count = 5 < 10):

<vcpu placement='static'>10</vcpu>
<cell id='0' cpus='0-3,100' memory='512000' unit='KiB'/>

2. use the same cpu in 2 cell, can set success(cpu count = 8 < 10):
<vcpu placement='static'>10</vcpu>
<cell id='0' cpus='0-3' memory='512000' unit='KiB'/>
<cell id='1' cpus='0-3' memory='512000' unit='KiB'/>

3. use the same cpu in 2 cell, cannot set success(cpu count = 11 > 10):
<vcpu placement='static'>10</vcpu>
<cell id='0' cpus='0-6' memory='512000' unit='KiB'/>
<cell id='1' cpus='0-3' memory='512000' unit='KiB'/>

Add a check for numa cpus, check if duplicate use one cpu in more
than one cell.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemu: Implement GIC
Michal Privoznik [Mon, 27 Apr 2015 12:54:19 +0000 (14:54 +0200)]
qemu: Implement GIC

The only version that's supported in QEMU is version 2, currently.
Fortunately, it is enabled by aarch64 automatically, so there's
nothing for us that needs to be put onto command line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoIntroduce GIC feature
Michal Privoznik [Mon, 27 Apr 2015 12:03:19 +0000 (14:03 +0200)]
Introduce GIC feature

Some platforms, like aarch64, don't have APIC but GIC. So there's
no reason to have <apic/> feature turned on. However, we are
still missing <gic/> feature. This commit introduces the feature
to XML parser and formatter, adds documentation and updates RNG
schema.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemu: Properly rename persistent def after migration
Jiri Denemark [Mon, 4 May 2015 20:21:23 +0000 (22:21 +0200)]
qemu: Properly rename persistent def after migration

When migrating a domain while changing its name and using
VIR_MIGRATE_PERSIST_DEST flag, libvirt would fail to properly change the
name in the persistent definition. The inconsistency results in weird
behavior when dumping domain XML, destroying the domain, restarting
libvirtd and likely in several other situations.

Since the new name is already stored in vm->def->name, we just need to
make sure the persistent definition uses this new name too.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agopolkit: Allow password-less access for 'libvirt' group
Cole Robinson [Tue, 28 Apr 2015 21:38:00 +0000 (17:38 -0400)]
polkit: Allow password-less access for 'libvirt' group

Many users, who admin their own machines, want to be able to access
system libvirtd via tools like virt-manager without having to enter
a root password. Just google 'virt-manager without password' and
you'll find many hits. I've read at least 5 blog posts over the years
describing slightly different ways of achieving this goal.

Let's finally add official support for this.

Install a polkit-1 rules file granting password-less auth for any user
in the new 'libvirt' group. Create the group on RPM install

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

10 years agostorage: fs: Don't try to chown directory unless user requested
Cole Robinson [Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)]
storage: fs: Don't try to chown directory unless user requested

Currently we try to chown any directory passed to virDirCreate,
even if the user didn't request any explicit owner/group via the
pool/vol XML.

This causes issues with qemu:///session: try to build a pool of
a root owned directory like /tmp, and it fails trying to chown the
directory to the session user. Instead it should just leave things
as they are, unless the user requests changing permissions via
the pool XML.

Similarly this is annoying if creating a storage pool via system
libvirtd of an existing directory in user $HOME, it's now owned
by root.

The virDirCreate function is pretty convoluted, since it needs to
fork off in certain specific cases. Try to document that, to make
it clear where exactly we are changing behavior.

10 years agostorage: fs: Don't attempt directory creation if it already exists
Cole Robinson [Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)]
storage: fs: Don't attempt directory creation if it already exists

The current code attempts to handle this, but it only catches mkdir
failing with EEXIST. However if say trying to build /tmp for an
unprivileged qemu:///session, mkdir will fail with EPERM.

Rather than catch any errors, just don't attempt mkdir if the directory
already exists.

10 years agostorage: fs: Fill in permissions on pool refresh
Cole Robinson [Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)]
storage: fs: Fill in permissions on pool refresh

This means pool XML actually reports accurate user/group/mode/label.

This uses UpdateVolTargetInfoFD in a bit of a hackish way, but it works

10 years agostorage: fs: Don't overwrite virDirCreate error
Cole Robinson [Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)]
storage: fs: Don't overwrite virDirCreate error

virDirCreate will give us fine grained details about what actually failed.

10 years agovirsh: Don't check migrate parameters
Jiri Denemark [Thu, 30 Apr 2015 12:47:46 +0000 (14:47 +0200)]
virsh: Don't check migrate parameters

Just pass anything a user specified to the appropriate API. It's the API
or libvirtd that should be responsible for checking its parameters.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agoqemu: Forbid unsupported parameters for tunnelled migration
Jiri Denemark [Thu, 30 Apr 2015 13:56:07 +0000 (15:56 +0200)]
qemu: Forbid unsupported parameters for tunnelled migration

Neither migrate URI nor lister address make any sense for tunnelled
migration.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agotests: Fix grammar in comments.
Andrea Bolognani [Tue, 28 Apr 2015 15:43:12 +0000 (17:43 +0200)]
tests: Fix grammar in comments.

Replace all occurrences of "stream write to differences to"
with "stream to write differences to".

10 years agotests: add machine vmport qemu test
Marc-André Lureau [Thu, 2 Apr 2015 16:44:44 +0000 (18:44 +0200)]
tests: add machine vmport qemu test

Check that the vmport feature is correctly used in qemu commande line.

10 years agoqemu: add machine vmport argument
Marc-André Lureau [Thu, 2 Apr 2015 16:44:08 +0000 (18:44 +0200)]
qemu: add machine vmport argument

Fill qemu command line vmport argument as required.

10 years agoqemu: add virQEMUCapsSupportsVmport
Marc-André Lureau [Tue, 21 Apr 2015 11:28:40 +0000 (13:28 +0200)]
qemu: add virQEMUCapsSupportsVmport

The vmport machine argument works with pc machine kind, not with xen for
example.

10 years agoqemu: move qemuDomainMachineIs{I440FX,Q35}
Marc-André Lureau [Tue, 28 Apr 2015 09:21:52 +0000 (11:21 +0200)]
qemu: move qemuDomainMachineIs{I440FX,Q35}

Move common functions being used by the following
virQEMUCapsSupportsVmport commit.

10 years agoqemu: add QEMU_CAPS_MACHINE_VMPORT_OPT
Marc-André Lureau [Thu, 2 Apr 2015 16:43:47 +0000 (18:43 +0200)]
qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

Set the capability based on qmp query, or qemu version.  The qmp query
includes vmport with 2.2, but no longer with 2.3. It lists only
non-machine specific capabilities, so check the qemu version too until a
machine-specific query is supported.

10 years agodomain/conf: add VIR_DOMAIN_FEATURE_VMPORT
Marc-André Lureau [Thu, 2 Apr 2015 16:42:20 +0000 (18:42 +0200)]
domain/conf: add VIR_DOMAIN_FEATURE_VMPORT

10 years agodocs: add domain vmport feature
Marc-André Lureau [Thu, 2 Apr 2015 16:41:33 +0000 (18:41 +0200)]
docs: add domain vmport feature

A new feature that can be turned on or off.

The QEMU machine vmport option allows to set the VMWare IO port
emulation. This emulation is useful for absolute pointer input when the
guest has vmware input drivers, and is enabled by default for kvm.

However it is unnecessary for Spice-enabled VM, since the agent already
handles absolute pointer and multi-monitors. Furthermore, it prevents
Spice from switching to relative input since the regular ps/2 pointer
driver is replaced by the vmware driver. It is thus advised to disable
vmport when using a Spice VM. This will permit the Spice client to
switch from absolute to relative pointer, as it may be required for
certain games or applications.

10 years agoBump version to 1.2.16 for new dev cycle
Jiri Denemark [Mon, 4 May 2015 11:04:32 +0000 (13:04 +0200)]
Bump version to 1.2.16 for new dev cycle

10 years agoqemu: fix the vm deadlock when deleting a nonexistent iothread
Luyao Huang [Mon, 4 May 2015 09:36:16 +0000 (17:36 +0800)]
qemu: fix the vm deadlock when deleting a nonexistent iothread

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

Jump to endjob instead of cleanup to fix this deadlock.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
10 years agotools: fix the wrong check when use virsh setvcpus --maximum
Luyao Huang [Fri, 20 Mar 2015 14:39:03 +0000 (15:39 +0100)]
tools: fix the wrong check when use virsh setvcpus --maximum

The --maximum option wasn't properly parsed and the equivalent flag
wasn't set.  Fix this bug and also rewrite the way we check this option
by using new macro.  The new approach is that --maximum requires
--config, no other combination is allowed, because they don't make sense.

The new error will be:

 # virsh setvcpus test --maximum 10
 error: Option --config is required by option --maximum

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

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agovirsh: introduce new macros to help check flag requirements
Pavel Hrdina [Thu, 26 Mar 2015 10:01:35 +0000 (11:01 +0100)]
virsh: introduce new macros to help check flag requirements

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoqemu: use new macros for setvcpus to check flags and cleanup the code
Pavel Hrdina [Wed, 25 Mar 2015 21:33:10 +0000 (22:33 +0100)]
qemu: use new macros for setvcpus to check flags and cleanup the code

Now that we have macros for exclusive flags and flag requirements we can
use them to cleanup the code for setvcpus and error out for all wrong
flag combination.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agouse new macro helpers to check flag requirements
Pavel Hrdina [Tue, 28 Apr 2015 17:24:07 +0000 (19:24 +0200)]
use new macro helpers to check flag requirements

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agouse new macro helpers to check exclusive flags
Pavel Hrdina [Tue, 28 Apr 2015 17:14:07 +0000 (19:14 +0200)]
use new macro helpers to check exclusive flags

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agointernal: introduce macro helpers to check flag requirements
Pavel Hrdina [Wed, 25 Mar 2015 12:11:38 +0000 (13:11 +0100)]
internal: introduce macro helpers to check flag requirements

Similar to VIR_EXLUSIVE_FLAGS, it will error out if flag requirement is
not met.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agointernal: introduce macro helpers to reject exclusive flags
Pavel Hrdina [Fri, 20 Mar 2015 14:38:59 +0000 (15:38 +0100)]
internal: introduce macro helpers to reject exclusive flags

Inspired by commit 7e437ee7 that introduced similar macros for virsh
commands so we don't have to repeat the same code all over.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoRelease of libvirt-1.2.15
Daniel Veillard [Mon, 4 May 2015 03:43:04 +0000 (11:43 +0800)]
Release of libvirt-1.2.15

- docs/news.html.in libvirt.spec.in: update for the release
- po/*.po*: regenerated

10 years agoqemu: Fix bus and lun checks when scsi-disk.channel not present
John Ferlan [Thu, 30 Apr 2015 19:52:03 +0000 (15:52 -0400)]
qemu: Fix bus and lun checks when scsi-disk.channel not present

Found by Laine and discussed a bit on internal IRC.

Commit id c56fe7f1d6 added support for creating a command line to support
scsi-disk.channel.

Series was here:
http://www.redhat.com/archives/libvir-list/2012-February/msg01052.html

Which pointed to a design proposal here:
http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428

Which states (in part):

Libvirt should check for the QEMU "scsi-disk.channel" property.  If it
is unavailable, QEMU will only support channel=lun=0 and 0<=target<=7.

However, the check added was ensuring that bus != lun *and* bus != 0. So
if bus == lun and both were non zero, we'd never make the second check.
Changing this to an *or* check fixes the check, but still is less readable
than the just checking each for 0

10 years agomain: add new generated files to .gitignore
Pavel Hrdina [Thu, 30 Apr 2015 16:32:58 +0000 (18:32 +0200)]
main: add new generated files to .gitignore

This means new libxl-lockd.conf and libxl-sanlock.conf

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agorpm-build: update %files section for libxl
Pavel Hrdina [Thu, 30 Apr 2015 15:18:59 +0000 (17:18 +0200)]
rpm-build: update %files section for libxl

Recent commit 198cc1d3 introduced integration of lockd and sanlock into
libxl, but forget to update libvirt.spec.in to also list new files
distributed via package.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoqemu: blockjob: Call qemuDomainSupportsBlockJobs only on online VMs
Peter Krempa [Thu, 30 Apr 2015 14:01:18 +0000 (16:01 +0200)]
qemu: blockjob: Call qemuDomainSupportsBlockJobs only on online VMs

Since the qemu capabilities are not initialized for offline VMs the
caller might get suboptimal error message:

$ virsh blockjob VM PATH --bandwidth 1
error: unsupported configuration: block jobs not supported with this QEMU binary

Move the checks after we make sure that the VM is alive.

10 years agoqemu: Check address type for USB disks
Jiri Denemark [Thu, 30 Apr 2015 12:16:40 +0000 (14:16 +0200)]
qemu: Check address type for USB disks

Only USB addresses are allowed for USB disks. Report an error if another
address is configured.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agocpu: Honor vendor_id override in host-model
Jiri Denemark [Thu, 30 Apr 2015 09:10:16 +0000 (11:10 +0200)]
cpu: Honor vendor_id override in host-model

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agoiscsi: do not fail to stop a stopped pool
Ján Tomko [Wed, 29 Apr 2015 12:59:08 +0000 (14:59 +0200)]
iscsi: do not fail to stop a stopped pool

Just as we allow stopping filesystem pools when they were unmounted
externally, do not fail to stop an iscsi pool when someone else
closed the session externally.

Reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1171984