[libvirt] [PATCH 3/3] util: Introduce encryption APIs

2016-05-18 Thread John Ferlan
Introduce virCryptoHaveEncrypt and virCryptoEncryptSecret to handle performing encryption. virCryptoHaveEncrypt: Boolean function to determine whether the requested encryption API is available. It's expected this API will be called prior to virCryptoEncryptSecret. It will return

[libvirt] [PATCH 1/3] tests: Add mock for virRandomBytes

2016-05-18 Thread John Ferlan
Create a mock for virRandomBytes to generate a not so random value that can be used by the tests to ensure the generation of an encrypted secret by masterKey and random initialization vector can produce an expected result. The "random number" generated is based upon the size of the expected

[libvirt] [PATCH 0/3] Patches to set up the secret encryption

2016-05-18 Thread John Ferlan
Based on v4 of the AES secret object series: http://www.redhat.com/archives/libvir-list/2016-May/msg01292.html Could have been an RFC too... Precursor for the AES secret object patches - figured I'd make sure this was the "right path" and hopefully to get some help with the mock environment

[libvirt] [PATCH 2/3] tests: Need help... Trying to add virRandomBytes mock

2016-05-18 Thread John Ferlan
What I'd like to do is merge this and the previous patch together; however, I'm missing something (hopefully obvious) with the building of the mocked function. Since this won't be a qemu specific function, the test wouldn't belong in qemuxml2argvmock - rather a separate mock would seemingly have

Re: [libvirt] [PATCH v4 0/3] Add AES Secret Object support (for RBD only)

2016-05-18 Thread John Ferlan
On 05/18/2016 02:55 AM, Peter Krempa wrote: > On Tue, May 17, 2016 at 12:36:06 -0400, John Ferlan wrote: >> v3: >> >> http://www.redhat.com/archives/libvir-list/2016-May/msg00444.html >> >> Changes since v3 (by patch)... >> >> 1. Separate out the mock for virRandomBytes. I realize this is not

Re: [libvirt] [PATCH v4 2/3] qemu: Introduce new Secret AES API's

2016-05-18 Thread John Ferlan
On 05/18/2016 03:16 AM, Peter Krempa wrote: > On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote: >> New APIs: >> >> qemuDomainGetAESKeyAlias: >> Generate/return the secret object alias for an AES Secret Info type. >> This will be called from qemuDomainSecretAESSetup. >> >>

[libvirt] [PATCH v2 2/8] Release address in function granularity than slot

2016-05-18 Thread Shivaprasad G Bhat
The commit 6fe678c is reverted. The code is moved around and cant revert staright. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_addr.c | 22 +- src/libvirt_private.syms |1 + src/qemu/qemu_domain_address.c |2 +- 3

[libvirt] [PATCH v2 2/8] Release address in function granularity than slot

2016-05-18 Thread Shivaprasad G Bhat
The commit 6fe678c is partly reverted. The code is moved around and cant revert staright. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_addr.c | 22 +- src/libvirt_private.syms |1 + src/qemu/qemu_domain_address.c |2

[libvirt] [PATCH v2 8/8] Enable PCI Multifunction hotplug/unplug

2016-05-18 Thread Shivaprasad G Bhat
The flow is to parse and create a list of devices. Go on each device at each step. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_driver.c | 328 +--- 1 file changed, 256 insertions(+), 72 deletions(-) diff --git

[libvirt] [PATCH v2 7/8] Move the detach of PCI device to the beginnging of live hotplug

2016-05-18 Thread Shivaprasad G Bhat
The hostdevices are the only devices which have dependencies outside of themselves such that, other functions of the PCI card should also have been detached from host driver before attempting the hotplug. This patch moves the detach to the beginning of the hotplug so that the following patch can

[libvirt] [PATCH v2 6/8] Separate the hostdevice preparation and checks to a new funtion

2016-05-18 Thread Shivaprasad G Bhat
No Functional change. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_hotplug.c | 89 ++- src/qemu/qemu_hotplug.h |5 +++ 2 files changed, 61 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[libvirt] [PATCH v2 5/8] Introduce virDomainPCIMultifunctionDeviceAddressAssign

2016-05-18 Thread Shivaprasad G Bhat
This patch assigns multifunction pci addresses to devices in the devlist. The pciaddrs passed in the argument is not altered so that the actual call to reserve the address using virDomainPCIAddressEnsureAddr() passes. The function focuses on user given address validation and also the auto-assign

[libvirt] [PATCH v2 4/8] Introduce PCI Multifunction device parser

2016-05-18 Thread Shivaprasad G Bhat
This patch just introduces the parser function used by the later patches. The parser disallows hostdevices to be used with other virtio devices simultaneously. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_conf.c | 236

[libvirt] [PATCH v2 3/8] Validate address in virDomainPCIAddressReleaseAddr

2016-05-18 Thread Shivaprasad G Bhat
This function was not used so far. Now, that we begin to use it, make sure to check the address before actually releasing the address. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_addr.c | 18 +- 1 file changed, 17 insertions(+), 1

[libvirt] [PATCH v2 1/8] Revert "prevent hot unplugging multi function PCI device"

2016-05-18 Thread Shivaprasad G Bhat
This has to go. The unlugging is going to be supported. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_hotplug.c | 60 --- 1 file changed, 60 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCH v2 0/8] PCI Multifunction device hotplug support

2016-05-18 Thread Shivaprasad G Bhat
V1 was posted here. http://www.redhat.com/archives/libvir-list/2016-May/msg01178.html Changes from V1 Fixed couple of issues in address validation and assignment. Added Rollback of the hotplug if anything fails in between. Removed Patch 6 completely as it exposed way too many bugs. Changed the

[libvirt] [PATCH 3/6] conf: allow type='pci' addresses with no address attributes specified

2016-05-18 Thread Laine Stump
Prior to this, wasn't allowed when parsing (domain+bus+slot+function needed to be a "valid" PCI address, meaning that at least one of domain/bus/slot had to be non-0), the RNG required bus to be specified, and if type was set to PCI when formatting, domain+bus+slot+function would always be

[libvirt] [PATCH 0/6] auto-assign addresses when is specified

2016-05-18 Thread Laine Stump
This is an alternative to Cole's series that permits to force assignment of a PCI address, which is particularly useful on platforms that could connect the same device in different ways (e.g. aarch64/virt). Here is Cole's last iteration of the series:

[libvirt] [PATCH 4/6] bhyve: auto-assign addresses when is specified

2016-05-18 Thread Laine Stump
Rather than only assigning a PCI address when no address is given at all, also do it when the config says that the address type is 'pci', but it gives no address. --- src/bhyve/bhyve_device.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bhyve/bhyve_device.c

[libvirt] [PATCH 5/6] qemu: auto-assign addresses when is specified

2016-05-18 Thread Laine Stump
Rather than only assigning a PCI address when no address is given at all, also do it when the config says that the address type is 'pci', but it gives no address (virDeviceInfoPCIAddressWanted()). There are also several places after parsing but prior to address assignment where code previously

[libvirt] [PATCH 6/6] tests: qemu: test with aarch64

2016-05-18 Thread Laine Stump
From: Cole Robinson This is an interesting test case since PCI isn't the default for aarch64. --- .../qemuxml2argv-aarch64-virtio-pci-manual-addresses.args| 4 +++- .../qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml | 5 +

[libvirt] [PATCH 1/6] conf: move virDomainDeviceInfo definition from domain_conf.h to device_conf.h

2016-05-18 Thread Laine Stump
Also moves all the subordinate structs. This is necessary due to a new inline function that will be defined in device_conf.h, and also makes sense, because it is the *device* info that's in the struct. (Actually a lot more stuff from domain_conf.h could move to this newer file, but I didn't want

[libvirt] [PATCH 2/6] conf: new functions to check if PCI address is wanted/present

2016-05-18 Thread Laine Stump
In order to allow with no other attributes to mean "I want a PCI address, but any PCI address will do" (just as having no at all usually indicates), we will need to change several places in the code from a simple "info->type == (or !=) VIR_DOMAIN_DEVICE_ADDRESS_TYPE_(PCI|NONE)" into something

Re: [libvirt] [PATCH 2/4] qemu: Assign device addresses in PostParse

2016-05-18 Thread Cole Robinson
On 05/17/2016 10:39 AM, Andrea Bolognani wrote: > On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote: >> This wires up qemuDomainAssignAddresses into the new >> virDomainDefAssignAddressesCallback, so it's always triggered >> via virDomainDefPostParse. We are essentially doing this already >>

Re: [libvirt] [PATCH 6/4] qemu: address: Remove QEMU_CAPS_DEVICE usage

2016-05-18 Thread Cole Robinson
On 05/18/2016 10:59 AM, Andrea Bolognani wrote: > On Wed, 2016-05-18 at 09:58 -0400, Laine Stump wrote: >> On 05/18/2016 07:53 AM, Cole Robinson wrote: >>> >>> Kind of. Prior to patch #2, the test suite output was correct (no >>> addresses), >>> it's what we were returning via domxml-from-native.

Re: [libvirt] [PATCH 3/4] qemu: Remove redundant qemuDomainAssignAddresses calls

2016-05-18 Thread Cole Robinson
On 05/17/2016 10:42 AM, Andrea Bolognani wrote: > On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote: >> All these calls come near immediately after parsing the domain >> XML, which now triggers qemuDomainAssignAddresses. So drop the >> now redundnat calls >> --- >> src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH 4/4] qemu: Call virDomainDefPostParse via CONFIG hotplug

2016-05-18 Thread Cole Robinson
On 05/17/2016 01:20 PM, Andrea Bolognani wrote: > On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote: >> hotplug APIs with the AFFECT_CONFIG flag are essentially replicating >> 'insert into XML document, and redefine XML'. Thinking of >> it this way, it's natural that we call

Re: [libvirt] [PATCH 1/2] driver config: Introduce virFirmware object

2016-05-18 Thread Jim Fehlig
On 05/18/2016 10:38 AM, Jim Fehlig wrote: > The virQEMUDriverConfig object contains lists of > loader:nvram pairs to advertise firmwares supported by > by the driver, and qemu_conf.c contains code to populate > the lists, all of which is useful for other drivers too. > > To avoid code duplication,

[libvirt] [PATCH 1/2] driver config: Introduce virFirmware object

2016-05-18 Thread Jim Fehlig
The virQEMUDriverConfig object contains lists of loader:nvram pairs to advertise firmwares supported by by the driver, and qemu_conf.c contains code to populate the lists, all of which is useful for other drivers too. To avoid code duplication, introduce a virFirmware object to encapsulate

[libvirt] [PATCH 0/2] Add virFirmware object for use by driver config

2016-05-18 Thread Jim Fehlig
While refreshing and testing my series to add domain capabilities and UEFI support to the libxl driver [1], I realized it would be useful to support the '--with-loader-nvram' configure option as well. This would allow users/packagers to specify system-provided firmwares instead of those provided

[libvirt] [PATCH 2/2] libxl: add default firmwares to driver config object

2016-05-18 Thread Jim Fehlig
Prefer firmwares specified via --with-loader-nvram configure option. If none are specified, use the Xen-provided default firmwares found in LIBXL_FIRMWARE_DIR. Signed-off-by: Jim Fehlig --- src/libxl/libxl_conf.c | 21 + src/libxl/libxl_conf.h | 4 2

[libvirt] hotplug support for "filesystem" devices?

2016-05-18 Thread Snyder, Emile
Hello all, I'm a newbie to libvirt, coming to it because I'm trying to understand how to provide the ability to attach/detach network filesystem shares to openstack guest instances in something analogous to the way block devices can be now. While playing with the existing virtfs/9p support for

Re: [libvirt] [PATCH 0/2] vz: add domain snapshots functionality

2016-05-18 Thread Maxim Nestratov
02.05.2016 12:33, Nikolay Shirokovskiy пишет: The first patch do all the job. It is rather large but does not touch any existing code so I found it reasonable not to split it. Nikolay Shirokovskiy (2): vz: add domain snapshots functionality vz: drop prlsdkDomainHasSnapshots

Re: [libvirt] [PATCH 2/2] vz: drop prlsdkDomainHasSnapshots

2016-05-18 Thread Maxim Nestratov
02.05.2016 12:33, Nikolay Shirokovskiy пишет: Let's use introduced domain snapshots infrastructure instead. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 87 - 1 file changed, 18 insertions(+),

Re: [libvirt] [PATCH 1/2] vz: add domain snapshots functionality

2016-05-18 Thread Maxim Nestratov
02.05.2016 12:33, Nikolay Shirokovskiy пишет: This solution does not keep snapshots cache because vz sdk lacks good support for snapshot related events. Libvirt and vz sdk has different approach to snapshot ids. vz sdk always auto generate them while libvirt has ability to specify id by user.

Re: [libvirt] [PATCH] Revert "qemu_hotplug: fix checking graphics ports"

2016-05-18 Thread Ján Tomko
On Mon, May 16, 2016 at 01:08:17PM +0200, Pavel Hrdina wrote: > This reverts commit 1ccc7fbff34ea44e5b0cf01a359d127a4c62a695. > > We cannot check ports if autoport is set because we set ports to 0 while > parsing device XML. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336134 > >

Re: [libvirt] [PATCH 6/4] qemu: address: Remove QEMU_CAPS_DEVICE usage

2016-05-18 Thread Andrea Bolognani
On Wed, 2016-05-18 at 09:58 -0400, Laine Stump wrote: > On 05/18/2016 07:53 AM, Cole Robinson wrote: > > > > Kind of. Prior to patch #2, the test suite output was correct (no > > addresses), > > it's what we were returning via domxml-from-native. After patch #2, the test > > suite output was

Re: [libvirt] [PATCH 0/8] lxc: add job support

2016-05-18 Thread Michal Privoznik
On 16.05.2016 23:36, Katerina Koukiou wrote: > This patch series adds job support to the lxc driver, using techiques from the > libxl driver. One benefit is no longer blocking get operations during long > running modify operations. E.g. with these patches 'vish dominfo dom' will > work while

Re: [libvirt] [PATCH 6/4] qemu: address: Remove QEMU_CAPS_DEVICE usage

2016-05-18 Thread Laine Stump
On 05/18/2016 07:53 AM, Cole Robinson wrote: Kind of. Prior to patch #2, the test suite output was correct (no addresses), it's what we were returning via domxml-from-native. After patch #2, the test suite output was wrong for all real world usage; it didn't change because it was only hitting a

[libvirt] [PATCH 0/3] Couple of virtestmock fixes

2016-05-18 Thread Michal Privoznik
Behold! This is not a trivial patch set and you will need a lot of courage to review it. Sorry. I hadn't had a nice time writing the patches neither. Michal Privoznik (3): tests: Drop VIR_MOCK_CALL_STAT virtestmock: Mock stat() properly tests: Link virtestmock with probes cfg.mk

[libvirt] [PATCH 3/3] tests: Link virtestmock with probes

2016-05-18 Thread Michal Privoznik
I've encountered this error while trying out this feature on some systems: $ VIR_TEST_FILE_ACCESS=1 ./virhashtest \ libvirt.git/tests/.libs/lt-virhashtest: \ symbol lookup error: libvirt.git/tests/.libs/virtestmock.so: \ undefined symbol: libvirt_event_poll_purge_timeout_semaphore Problem is,

[libvirt] [PATCH 2/3] virtestmock: Mock stat() properly

2016-05-18 Thread Michal Privoznik
There is a lot to explain, but I try to make it as short as possible. I'd start by pasting some parts of sys/stat.h: extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); extern int __REDIRECT_NTH (stat, (const char

[libvirt] [PATCH 1/3] tests: Drop VIR_MOCK_CALL_STAT

2016-05-18 Thread Michal Privoznik
It wasn't as great idea as I thought. Thing around stat() are more complicated than that. Therefore we need to revert 86d1705a8ace349b plus drop use of the macro as introduced in later patches. Signed-off-by: Michal Privoznik --- tests/vircgroupmock.c | 14 +++---

[libvirt] [PATCH 3/3] qemu: bulk stats: Don't access possibly blocked storage

2016-05-18 Thread Peter Krempa
When libvirt is gathering stats for block devices in the bulk stats API it would use the fallback code that accesses the files directly in libvirt both if the VM was offline and if qemu didn't return the stats at all. If qemu is not cooperating due to being stuck on an inaccessible NFS share we

[libvirt] [PATCH 2/3] qemu: driver: Separate bulk stats worker for block devices

2016-05-18 Thread Peter Krempa
Extract the fallback path that reloads the stats from disk into a separate function. --- src/qemu/qemu_driver.c | 58 -- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH 1/3] qemu: driver: Remove unnecessary flag in qemuDomainGetStatsBlock

2016-05-18 Thread Peter Krempa
'abbreviated' was true if 'stats' were NULL --- src/qemu/qemu_driver.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 00daf72..5917bc2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt] [PATCH 0/3] qemu: Don't get stuck in bulk-stats API on broken NFS

2016-05-18 Thread Peter Krempa
Accessing VM disk files while we weren't able to get the stats from qemu directly as it was most probably stuck on missing storage will make libvrtd's thread handling the stats get stuck. Avoid touching files in such case. Peter Krempa (3): qemu: driver: Remove unnecessary flag in

Re: [libvirt] [PATCH 3/6] conf: Introduce infrastructure to add config validation to define time

2016-05-18 Thread Pavel Hrdina
On Tue, May 17, 2016 at 04:25:39PM +0200, Peter Krempa wrote: > Recently there were a few patches adding checks to the post parse > callback infrastructure that rejected previously accepted configuration. > This unfortunately was not acceptable since we would fail to load the > configs from the

Re: [libvirt] [PATCH 2/4] conf: add to

2016-05-18 Thread Peter Krempa
On Fri, May 13, 2016 at 16:52:14 +0200, Ján Tomko wrote: > Add a new element to XML: > > /path/to/acpi/table/file It looks like the table could compromise of multiple sub-tables which would add a rather unpleasantly looking XML: /path/to/acpi/table/file /path/to/acpi/table/blurb

[libvirt] [PATCH 3/4] util: Adjust return for virPCIGetDeviceAddressFromSysfsLink

2016-05-18 Thread John Ferlan
Rather than return 0/-1 and/or a pointer to some memory, adjust the helper to just return the allocated structure or NULL on failure. Adjust the callers in order to handle that Signed-off-by: John Ferlan --- src/util/virpci.c | 33 - 1 file

[libvirt] [PATCH 4/4] util: Remove need for STATIC_ANALYSIS check

2016-05-18 Thread John Ferlan
Seems recent versions of Coverity have (mostly) resolved the issue using ternary operations in VIR_FREE (and now VIR_DISPOSE*) macros. So let's just remove it and if necessary handle one off issues as the arise. Signed-off-by: John Ferlan --- src/util/viralloc.h | 34

[libvirt] [PATCH 2/4] util: Remove need for ret in virPCIGetPhysicalFunction

2016-05-18 Thread John Ferlan
Since the callers only ever expect 0 or -1, let's just return that directly Signed-off-by: John Ferlan --- src/util/virpci.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index be35017..1119c2e 100644 ---

[libvirt] [PATCH 1/4] util: Fix error path for virPCIGetVirtualFunctions

2016-05-18 Thread John Ferlan
If we get to the error: label and clear out the *virtual_functions[] pointers and then return w/ error to the caller - the caller has it's own cleanup of the same array in the out: label which is keyed off the value of num_virt_fns, which wasn't reset to 0 in the called function leading to a

[libvirt] [PATCH 0/4] Remove need for STATIC_ANALYSIS in viralloc.h

2016-05-18 Thread John Ferlan
Not sure which release exactly, but the coverity analysis bug I filed that was the reason for commit id 'c9a85af31' has been fixed, so it's time to remove that... In doing so uncovered another issue - it seems the fix for Coverity addressed the primary problem we've seen, but when there's

[libvirt] [PATCH] Introduce gnutls_priority config option

2016-05-18 Thread Ján Tomko
The defaults provided by gnutls_set_default_priority are not configurable at runtime. Introduce a new config option to libvirt.conf that will be passed to gnutls_priority_set. One of the possible options is "@SYSTEM", where gnutls will get the settings from /etc/gnutls/default-priorities. Note

Re: [libvirt] [PATCH 6/4] qemu: address: Remove QEMU_CAPS_DEVICE usage

2016-05-18 Thread Cole Robinson
On 05/18/2016 06:27 AM, Andrea Bolognani wrote: > On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote: >> All qemu versions we support have QEMU_CAPS_DEVICE, so checking >> for it is redundant. Remove the usage. >> >> The code diff isn't clear, but all that code is just inindented >> with no

Re: [libvirt] [PATCH v2 2/4] iscsi: Add exit status checking for virISCSIGetSession

2016-05-18 Thread Peter Krempa
On Wed, May 18, 2016 at 07:15:54 -0400, John Ferlan wrote: > On 05/18/2016 01:55 AM, Peter Krempa wrote: [...] > > "cannot find session iscsiadm session" followed by the message and/or > > containing the code will be probably the best case here. The function > > you are modifying is meant to

Re: [libvirt] [PATCH] lxc: support

2016-05-18 Thread Vasiliy Tolstov
2016-05-17 17:39 GMT+03:00 Laine Stump : > Rather than me spending time adding something to my patches that will just > be superceded by another patch immediately, I would rather just do it the > way everyone wants to begin with. > > What type of things are usually done in the

Re: [libvirt] [PATCH v2 2/4] iscsi: Add exit status checking for virISCSIGetSession

2016-05-18 Thread John Ferlan
On 05/18/2016 01:55 AM, Peter Krempa wrote: > On Tue, May 17, 2016 at 11:31:07 -0400, John Ferlan wrote: >> On 05/17/2016 11:04 AM, Peter Krempa wrote: >>> On Mon, May 16, 2016 at 11:03:09 -0400, John Ferlan wrote: > > [...] > + +virReportError(VIR_ERR_INTERNAL_ERROR,

Re: [libvirt] [PATCH 5/4] tests: qemuargv2xmltest: Drop disk for s390 aes tests

2016-05-18 Thread Andrea Bolognani
On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote: > Upcoming patches are going to make the disk portion of these > test cases fail. In order to make it work, we would need to > extend the qemuargv2xml test infrastructure to handle qemuCaps. > This is worthwhile to do at some point but isn't

Re: [libvirt] [PATCH 6/4] qemu: address: Remove QEMU_CAPS_DEVICE usage

2016-05-18 Thread Andrea Bolognani
On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote: > All qemu versions we support have QEMU_CAPS_DEVICE, so checking > for it is redundant. Remove the usage. >  > The code diff isn't clear, but all that code is just inindented > with no other change. 'git show -w' is your friend ;) This

Re: [libvirt] [PATCH 4/4] qemu: Call virDomainDefPostParse via CONFIG hotplug

2016-05-18 Thread Andrea Bolognani
On Tue, 2016-05-17 at 14:24 -0400, Cole Robinson wrote: > > > > > + virDomainXMLOptionPtr xmlopt) > > >   { > > >   virDomainDiskDefPtr disk; > > >   virDomainNetDefPtr net; > > > @@ -7803,11 +7805,6 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr > > >

Re: [libvirt] [PATCH v2 0/5] Automatically choose usable GIC version

2016-05-18 Thread Andrea Bolognani
On Tue, 2016-05-17 at 00:00 +0200, Andrea Bolognani wrote: > Changes from [v1]: > >   * Factor away some of the logic to > virQEMUCapsSupportsGICVersion(), as suggested by, > and based on a first implementation by, Cole > >   * Factor away the common test suite bits to >

Re: [libvirt] [PATCH v2 5/5] tests: Try different usable GIC versions

2016-05-18 Thread Andrea Bolognani
On Tue, 2016-05-17 at 16:10 -0400, John Ferlan wrote: > > On 05/16/2016 06:00 PM, Andrea Bolognani wrote: > > > > The only case where the hardware capabilities influence the result > > is when no element was provided. > > > > The test programs now ensure both that the correct GIC version is >

Re: [libvirt] [PATCH v2 2/5] qemu: Automatically choose usable GIC version

2016-05-18 Thread Andrea Bolognani
On Tue, 2016-05-17 at 16:10 -0400, John Ferlan wrote: > >   * enabled and configure default values related to those features. > >   */ > >  static void > > -qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def) > > +qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def, > > +

Re: [libvirt] [PATCH v2 4/4] iscsi: Remove initiatoriqn from virISCSIScanTargets

2016-05-18 Thread Peter Krempa
On Mon, May 16, 2016 at 11:03:11 -0400, John Ferlan wrote: > No longer necessary to have it, so remove it. > > Signed-off-by: John Ferlan ACK signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v2 3/4] util: Remove disabling of autologin for iscsi-targets

2016-05-18 Thread Peter Krempa
On Mon, May 16, 2016 at 11:03:10 -0400, John Ferlan wrote: > From: Fritz Elfert > > https://bugzilla.redhat.com/show_bug.cgi?id=1331552 > > Instead of disabling auto-login of all scsi targets (even those > that do not "belong" to libvirt), use iscsiadm's "--op

Re: [libvirt] [PATCH v6 REBASE 5/5] vz: cleanup: define vz format of uuids

2016-05-18 Thread Maxim Nestratov
18.05.2016 10:54, Nikolay Shirokovskiy пишет: On 17.05.2016 22:02, Maxim Nestratov wrote: 22.04.2016 10:20, Nikolay Shirokovskiy пишет: vz puts uuids into curly braces. Simply introduce new contstant to reflect this and get rid of magic +2 in code. Signed-off-by: Nikolay Shirokovskiy

[libvirt] [PATCH 3/5] vz: implement managed migration

2016-05-18 Thread Nikolay Shirokovskiy
The newest version of migration protocol - version 3 with parameters is implemented. Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are VIR_MIGRATE_PARAM_URI and VIR_MIGRATE_PARAM_DEST_NAME. VIR_MIGRATE_PARAM_DEST_XML is in VZ_MIGRATION_PARAMETERS for technical onyl reasons.

[libvirt] [PATCH 1/5] vz: save session uuid on login

2016-05-18 Thread Nikolay Shirokovskiy
This session uuid acts as authN token for different multihost vz operations one of which is migration. Unfortunately we can't get it from server at any time thus we need to save it at login. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 40

[libvirt] [PATCH 5/5] vz: cleanup: define vz format of uuids

2016-05-18 Thread Nikolay Shirokovskiy
vz puts uuids into curly braces. Simply introduce new contstant to reflect this and get rid of magic +2 in code. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 12 ++-- src/vz/vz_utils.h | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-)

[libvirt] [PATCH 2/5] vz: fix const correctness case

2016-05-18 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_utils.c | 2 +- src/vz/vz_utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index d9da1e7..5427314 100644 --- a/src/vz/vz_utils.c +++

[libvirt] [PATCH 4/5] vz: implement p2p migration

2016-05-18 Thread Nikolay Shirokovskiy
Peer to peer migration is implemented just as in managed case. Basically it is copy paste from managed case but with all the branches that are not applied to vz removed. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 136

[libvirt] [PATCH v7 0/5] vz: add migration support

2016-05-18 Thread Nikolay Shirokovskiy
Difference from v6 == Minor fixes suggested by reviewer. Nikolay Shirokovskiy (5): vz: save session uuid on login vz: fix const correctness case vz: implement managed migration vz: implement p2p migration vz: cleanup: define vz format of uuids src/vz/vz_driver.c | 559

Re: [libvirt] [PATCH v6 REBASE 5/5] vz: cleanup: define vz format of uuids

2016-05-18 Thread Nikolay Shirokovskiy
On 17.05.2016 22:02, Maxim Nestratov wrote: > 22.04.2016 10:20, Nikolay Shirokovskiy пишет: > >> vz puts uuids into curly braces. Simply introduce new contstant to reflect >> this >> and get rid of magic +2 in code. >> >> Signed-off-by: Nikolay Shirokovskiy >> ---

Re: [libvirt] [PATCH v6 REBASE 4/5] vz: implement p2p migration

2016-05-18 Thread Nikolay Shirokovskiy
On 17.05.2016 21:56, Maxim Nestratov wrote: > > > 22.04.2016 10:20, Nikolay Shirokovskiy пишет: >> Peer to peer migration is implemented just as in managed case. Basically >> it is copy paste from managed case but with all the branches that are not >> applied to vz removed. >> >>

Re: [libvirt] [PATCH v4 3/3] qemu: Utilize qemu secret objects for RBD auth/secret

2016-05-18 Thread Peter Krempa
On Tue, May 17, 2016 at 12:36:09 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1182074 > > If they're available and we need to pass secrets to qemu, then use the > qemu domain secret object in order to pass the secrets for RBD volumes > instead of passing the base64

Re: [libvirt] [PATCH v6 REBASE 3/5] vz: implement managed migration

2016-05-18 Thread Nikolay Shirokovskiy
On 17.05.2016 21:33, Maxim Nestratov wrote: > > > 22.04.2016 10:20, Nikolay Shirokovskiy пишет: >> The newest version of migration protocol - version 3 with parameters is >> implemented. >> Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are >> VIR_MIGRATE_PARAM_URI and

Re: [libvirt] [PATCH v4 2/3] qemu: Introduce new Secret AES API's

2016-05-18 Thread Peter Krempa
On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote: [...] > +/* qemuDomainGetAESKeyAlias: > + * > + * Generate and return an initialization vector alias > + * > + * Returns NULL or a string containing the AES key alias > + */ > +char * > +qemuDomainGetAESKeyAlias(const char *srcalias) >

Re: [libvirt] [PATCH v4 2/3] qemu: Introduce new Secret AES API's

2016-05-18 Thread Peter Krempa
On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote: > New APIs: > > qemuDomainGetAESKeyAlias: > Generate/return the secret object alias for an AES Secret Info type. > This will be called from qemuDomainSecretAESSetup. > > qemuDomainSecretHaveEncrypt: (private) > Boolean

Re: [libvirt] [PATCH v4 0/3] Add AES Secret Object support (for RBD only)

2016-05-18 Thread Peter Krempa
On Tue, May 17, 2016 at 12:36:06 -0400, John Ferlan wrote: > v3: > > http://www.redhat.com/archives/libvir-list/2016-May/msg00444.html > > Changes since v3 (by patch)... > > 1. Separate out the mock for virRandomBytes. I realize this is not the >desired state, but figured to at least be

[libvirt] [PATCH v2 2/2] qemu: parse: Handle suffixes for -m memory

2016-05-18 Thread Nishith Shah
According to QEMU docs, the '-m' option for specifying RAM is by default in MiB, and a suffix of "M" or "G" may be passed for values in MiB and GiB respectively. This commit adds support and a test for the same. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=812295 Signed-off-by: Nishith

[libvirt] [PATCH v2 1/2] qemu: parse: Use qemuParseCommandLineMem for -m memory

2016-05-18 Thread Nishith Shah
Move the parsing of -m memory to a new function, qemuParseCommandLineMem Signed-off-by: Nishith Shah --- src/qemu/qemu_parse_command.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_parse_command.c

[libvirt] [PATCH v2 0/2] qemu: parse: Introduce qemuParseCommandLineMem

2016-05-18 Thread Nishith Shah
This series moves the parsing of qemu -m memory into a separate function and adds suffix support for the -m option. The first patch introduces the function qemuParseCommandLineMem, and the second patch handles suffixes for the -m values and adds a test for the same. Nishith Shah (2): qemu:

Re: [libvirt] [PATCH 0/6] conf: qemu: Introduce relaxed config validation

2016-05-18 Thread Peter Krempa
On Tue, May 17, 2016 at 16:55:53 -0400, John Ferlan wrote: > On 05/17/2016 10:25 AM, Peter Krempa wrote: > > Recently I NACKed quite a few patches attempting to add checks to the post > > parse callback infrastructure that would inhbit configs from being loaded > > after daemon restart. > > > >