Re: [libvirt] [PATCH 3/5] qemu: Use bitmap with migration capabilities

2017-10-19 Thread John Ferlan
On 10/18/2017 07:29 AM, Jiri Denemark wrote: > All calls to qemuMonitorGetMigrationCapability in QEMU driver are > replaced with qemuMigrationCapsGet. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_domain.c| 7 +++ > src/qemu/qemu_driver.c| 32

Re: [libvirt] [PATCH 1/5] qemu: Create a wrapper around qemuMonitorSetCapabilities

2017-10-19 Thread John Ferlan
On 10/18/2017 07:29 AM, Jiri Denemark wrote: > The new function is called qemuProcessInitMonitor and it will enter/exit > the monitor so that the caller doesn't have to deal with this. > > The goal of this patch is to simplify the code in qemuConnectMonitor > which would otherwise be a bit

Re: [libvirt] [PATCH 2/5] qemu: Store supported migration capabilities in a bitmap

2017-10-19 Thread John Ferlan
On 10/18/2017 07:29 AM, Jiri Denemark wrote: > Each time we need to check whether a given migration capability is > supported by QEMU, we call query-migrate-capabilities QMP command and > lookup the capability in the returned list. Asking for the list of > supported capabilities once when we

Re: [libvirt] [PATCH 4/5] qemu: Drop qemuMonitorGetMigrationCapability

2017-10-19 Thread John Ferlan
On 10/18/2017 07:29 AM, Jiri Denemark wrote: > The only remaining user of qemuMonitorGetMigrationCapability is our test > suite. Let's replace qemuMonitorGetMigrationCapability with > qemuMonitorGetMigrationCapabilities there and drop the unused function. > > Signed-off-by: Jiri Denemark

Re: [libvirt] [PATCH 5/5] qemu: Enhance debug message in qemuMonitorSetMigrationCapability

2017-10-19 Thread John Ferlan
On 10/18/2017 07:29 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_monitor.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c > index 55b123e5f5..64efb89e83 100644 >

Re: [libvirt] [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP

2017-10-19 Thread Eduardo Habkost
On Thu, Oct 19, 2017 at 04:28:59PM +0100, Daniel P. Berrange wrote: > On Thu, Oct 19, 2017 at 11:21:22AM -0400, Igor Mammedov wrote: > > - Original Message - > > > From: "Daniel P. Berrange" > > > To: "Igor Mammedov" > > > Cc: "peter maydell"

Re: [libvirt] [PATCH 5/6] vbox: Process controller definitions from xml.

2017-10-19 Thread Dawid Zamirski
On Tue, 2017-10-17 at 15:46 -0400, John Ferlan wrote: > > On 10/09/2017 04:49 PM, Dawid Zamirski wrote: > > From: Dawid Zamirski > > > Lots of potentially use DEBUG information being lost. IDC, but seems > a > shame to not have it. Although it can be overkill when DEBUG is

Re: [libvirt] [PATCH v5 07/16] conf: Add/Allow parsing the encryption in the disk source

2017-10-19 Thread Peter Krempa
On Thu, Oct 05, 2017 at 09:22:14 -0400, John Ferlan wrote: > Since the virStorageEncryptionPtr encryption; is a member of > _virStorageSource it really should be allowed to be a subelement > of the disk for various disk formats: > >Source{File|Dir|Block|Volume} >

Re: [libvirt] [PATCH v5 01/16] conf: Add/Allow parsing the auth in the disk source

2017-10-19 Thread Peter Krempa
On Thu, Oct 05, 2017 at 09:22:08 -0400, John Ferlan wrote: > Since the virStorageAuthDefPtr auth; is a member of _virStorageSource > it really should be allowed to be a subelement of the disk > for the RBD and iSCSI prototcols. That way we can set up to allow > the element to be formatted within

[libvirt] [jenkins-ci PATCH] guests: update libvirt-freebsd-10 jenkins secret

2017-10-19 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- Pushed under trivial rule and no chance to review it. guests/host_vars/libvirt-freebsd-10/vault.yml | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/guests/host_vars/libvirt-freebsd-10/vault.yml

[libvirt] [jenkins-ci PATCH] projects: rename libvirt-freebsd into libvirt-freebsd-10

2017-10-19 Thread Pavel Hrdina
We will have freebsd-11 as well. Signed-off-by: Pavel Hrdina --- Pushed under trivial rule. projects/libvirt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml index e5946e2..a70a58c 100644 ---

Re: [libvirt] [PATCH v3] interfaces: Convert virInterfaceObjList to virObjectRWLockable

2017-10-19 Thread John Ferlan
[...] >>> >>> With the patch split in 2 introducing 2 distinct changes + the NULL check: >>> Reviewed-by: Erik Skultety >> >> Hopefully you reconsider the desire for 2 patches... > > Well, since I was apparently fine with the change when reviewing the same > changes to

Re: [libvirt] [PATCH v3] interfaces: Convert virInterfaceObjList to virObjectRWLockable

2017-10-19 Thread Erik Skultety
On Thu, Oct 19, 2017 at 10:48:56AM -0400, John Ferlan wrote: > > > On 10/19/2017 10:07 AM, Erik Skultety wrote: > > On Fri, Oct 13, 2017 at 07:45:01AM -0400, John Ferlan wrote: > >> Rather than a forward linked list, let's use the ObjectRWLockable object > >> in order to manage the data. > >> > >>

Re: [libvirt] [PATCH 0/5] qemu: Refactor placement of per-storage-source data (blockdev-add saga)

2017-10-19 Thread John Ferlan
On 10/19/2017 11:34 AM, Peter Krempa wrote: > These patches are part of John's original series located here: > > https://www.redhat.com/archives/libvir-list/2017-October/msg00228.html > > The patches are reordered and fixed to make more sense. > > Patch 1/5 is originally 5/16, without any

Re: [libvirt] [PATCH v3] [libvirt-jenkins-ci] Build on supported Fedora releases (25-26)

2017-10-19 Thread Pavel Hrdina
On Thu, Sep 07, 2017 at 12:48:22PM +0200, Andrea Bolognani wrote: > Fedora 23 has been out of support for quite a while now, with > Fedora 24 recently joining it with the release of Fedora 26 > which, on the other hand, is fully supported and a prime candidate > for building libvirt. > >

[libvirt] [libvirt-jenkins-ci PATCH 3/6] guests: Implement flavors

2017-10-19 Thread Andrea Bolognani
Our CI infrastructure and developers have different requirements, but really the overlap is almost complete and it's a shame that we require developers to perform manual steps before we can use our tools. Flavors are a very simple and effective way to deal with the issue: we'll be able to

[libvirt] [libvirt-jenkins-ci PATCH 2/6] guests: Move configuration handling to load_config()

2017-10-19 Thread Andrea Bolognani
Just a code move. We'll be adding more logic soon, and it'll be nice not to pollute the do_prepare() function too much because of it. Rename the existing load_config() function to load_install_config() accordingly. Signed-off-by: Andrea Bolognani --- guests/lcitool | 54

[libvirt] [libvirt-jenkins-ci PATCH 0/6] Implement developer flavor

2017-10-19 Thread Andrea Bolognani
Make lcitool useful outside of the libvirt CI context, even though doing so openly contradicts its name. We're just savage like that. Andrea Bolognani (6): guests: Open vault on demand guests: Move configuration handling to load_config() guests: Implement flavors guests: Implement

[libvirt] [libvirt-jenkins-ci PATCH 6/6] guests: Update documentation

2017-10-19 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- guests/README.markdown | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/guests/README.markdown b/guests/README.markdown index 100ca31..51d9012 100644 ---

[libvirt] [libvirt-jenkins-ci PATCH 4/6] guests: Implement developer flavor

2017-10-19 Thread Andrea Bolognani
The developer is given key-based SSH access to the guest and granted passwordless sudo privilege for maximum convenience. Signed-off-by: Andrea Bolognani --- guests/group_vars/all/main.yml | 4 +++- guests/host_vars/libvirt-freebsd-10/main.yml | 1 +

[libvirt] [libvirt-jenkins-ci PATCH 5/6] guests: Hand root password location over to Ansible

2017-10-19 Thread Andrea Bolognani
Instead of hard-coding the location in the playbook, we hand it over at runtime when calling ansible-playbook, ensuring better separation of concerns. Signed-off-by: Andrea Bolognani --- guests/lcitool| 2 +- guests/tasks/base.yml | 2 +- 2 files changed, 2

[libvirt] [libvirt-jenkins-ci PATCH 1/6] guests: Open vault on demand

2017-10-19 Thread Andrea Bolognani
By storing the vault out of the inventory, we can open it on demand rather than automatically. This will eventually make it possible to use the playbooks even without knowing the vault password. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-centos-6/main.yml

[libvirt] [PATCH] util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function.

2017-10-19 Thread Julio Faracco
The function virEventRegisterImpl() checks the attempt to replace the registered events. But there is a duplicate variable inside the IF statement. The variable 'removeHandleImpl' was wrongly repeated. One of them needs to be replaced by 'removeTimeoutImpl'. Signed-off-by: Julio Faracco

[libvirt] [PATCH 4/5] qemu: Relocate qemuDomainSecretInfoPtr to qemuDomainStorageSourcePrivate

2017-10-19 Thread Peter Krempa
From: John Ferlan Since the secret information is really virStorageSource specific piece of data, let's manage the privateData from there instead of at the Disk level. Signed-off-by: John Ferlan Signed-off-by: Peter Krempa ---

[libvirt] [PATCH 2/5] util: storage: Introduce privateData for _virStorageSource

2017-10-19 Thread Peter Krempa
From: John Ferlan Introduce the bare necessities to add privateData to _virStorageSource. Signed-off-by: John Ferlan Signed-off-by: Peter Krempa --- src/util/virstoragefile.c | 1 + src/util/virstoragefile.h | 3 +++ 2 files

Re: [libvirt] [PATCH v1 01/14] conf: Fix virDomainDeviceGetInfo const correctness

2017-10-19 Thread Michal Privoznik
On 10/19/2017 11:55 AM, Martin Kletzander wrote: > On Thu, Oct 19, 2017 at 10:10:56AM +0200, Michal Privoznik wrote: >> This function is not changing passed domain definition. >> Therefore, mark the argument as 'const'. >> > > Is there any other reason for this then just your new code using

[libvirt] [PATCH 3/5] qemu: Introduce privateData object for virStorageSource

2017-10-19 Thread Peter Krempa
From: John Ferlan Add the object definition and helpers to store security-related private data for virStorageSources. Signed-off-by: John Ferlan Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 43

Re: [libvirt] [PATCH v1 07/14] conf: Parse user supplied aliases

2017-10-19 Thread Michal Privoznik
On 10/19/2017 11:55 AM, Martin Kletzander wrote: > On Thu, Oct 19, 2017 at 10:11:02AM +0200, Michal Privoznik wrote: >> If driver that is calling the parse supports user supplied >> aliases, they can be parsed even for inactive XMLs. However, to >> avoid any clashes with aliases that libvirt

[libvirt] [PATCH 5/5] qemu: Move encinfo from private disk to private disk src

2017-10-19 Thread Peter Krempa
From: John Ferlan Since the encryption information can also be disk source specific move it from qemuDomainDiskPrivate to qemuDomainStorageSourcePrivate Since the last allocated element from qemuDomainDiskPrivate is removed, that means we no longer need

[libvirt] [PATCH 1/5] qemu: Add missing encinfo cleanup

2017-10-19 Thread Peter Krempa
From: John Ferlan When commit id 'da86c6c22' added support for diskPriv->encinfo in qemuDomainSecretDiskPrepare a change to qemuDomainSecretDiskDestroy to was missed. Although qemuDomainDiskPrivateDispose probably would do the trick. Signed-off-by: John Ferlan

[libvirt] [PATCH 0/5] qemu: Refactor placement of per-storage-source data (blockdev-add saga)

2017-10-19 Thread Peter Krempa
These patches are part of John's original series located here: https://www.redhat.com/archives/libvir-list/2017-October/msg00228.html The patches are reordered and fixed to make more sense. Patch 1/5 is originally 5/16, without any modification. Patches 2/5 and 3/5 are split from patch 2/16

Re: [libvirt] [libvirt-jenkins-ci PATCH 0/4] guests: Fixes and improvements

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 04:59:37PM +0200, Andrea Bolognani wrote: > First of probably several batches :) > > Andrea Bolognani (4): > guests: preseed: Fix root partition size > guests: lcitool: Don't disable USB controller > guests: libvirt: Install dwarves > guests: jenkins: Always

Re: [libvirt] [PATCH REPOST 0/8] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #3)

2017-10-19 Thread John Ferlan
ping? Tks - John On 10/06/2017 10:42 AM, John Ferlan wrote: > Since the original series (19 patches): > > https://www.redhat.com/archives/libvir-list/2017-September/msg00594.html > > didn't garner any attention, I'm going with smaller patch piles to make > forward progress. > > This is the

[libvirt] [libvirt-jenkins-ci PATCH 4/4] guests: jenkins: Always download freshest agent

2017-10-19 Thread Andrea Bolognani
Make sure that a newer Jenkins agent is downloaded if it's available on the server. Signed-off-by: Andrea Bolognani --- guests/tasks/jenkins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/tasks/jenkins.yml b/guests/tasks/jenkins.yml index 9c8eda1..a1b8f46

[libvirt] [libvirt-jenkins-ci PATCH 3/4] guests: libvirt: Install dwarves

2017-10-19 Thread Andrea Bolognani
It can optionally be used during build. Signed-off-by: Andrea Bolognani --- guests/vars/mappings.yml | 5 + guests/vars/projects/libvirt.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index

[libvirt] [libvirt-jenkins-ci PATCH 1/4] guests: preseed: Fix root partition size

2017-10-19 Thread Andrea Bolognani
The existing configuration didn't succeed in causing the root partition to use up all disk space not assigned to swap. Signed-off-by: Andrea Bolognani --- guests/preseed.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guests/preseed.cfg

[libvirt] [libvirt-jenkins-ci PATCH 0/4] guests: Fixes and improvements

2017-10-19 Thread Andrea Bolognani
First of probably several batches :) Andrea Bolognani (4): guests: preseed: Fix root partition size guests: lcitool: Don't disable USB controller guests: libvirt: Install dwarves guests: jenkins: Always download freshest agent guests/lcitool | 1 - guests/preseed.cfg

[libvirt] [libvirt-jenkins-ci PATCH 2/4] guests: lcitool: Don't disable USB controller

2017-10-19 Thread Andrea Bolognani
Some version of virt-install enable USB input devices despite the fact neither a USB controller or a graphical display are available, resulting in installation failures. Let's just leave the USB controller enabled, it doesn't cause any issue anyway. Signed-off-by: Andrea Bolognani

Re: [libvirt] [PATCH v3] interfaces: Convert virInterfaceObjList to virObjectRWLockable

2017-10-19 Thread John Ferlan
On 10/19/2017 10:07 AM, Erik Skultety wrote: > On Fri, Oct 13, 2017 at 07:45:01AM -0400, John Ferlan wrote: >> Rather than a forward linked list, let's use the ObjectRWLockable object >> in order to manage the data. >> >> Requires numerous changes from List to Object management similar to >>

Re: [libvirt] [PATCH] qemu-ns: Detect /dev/* mount point duplicates better

2017-10-19 Thread Erik Skultety
On Thu, Oct 19, 2017 at 03:34:34PM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1495511 > > When creating new /dev for domain ran in namespace we try to > preserve all sub-mounts of /dev. Well, not quite all. For > instance if /dev/foo/bar and /dev/foo are both

Re: [libvirt] [PATCH v3] interfaces: Convert virInterfaceObjList to virObjectRWLockable

2017-10-19 Thread Erik Skultety
On Fri, Oct 13, 2017 at 07:45:01AM -0400, John Ferlan wrote: > Rather than a forward linked list, let's use the ObjectRWLockable object > in order to manage the data. > > Requires numerous changes from List to Object management similar to > many other drivers/vir*obj.c modules > This patch should

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 0/6] Unattended guest installation and more

2017-10-19 Thread Pavel Hrdina
On Wed, Oct 18, 2017 at 07:11:45PM +0200, Andrea Bolognani wrote: > Changes from [v1]: > > * guest changes > - set root password to a user-provided value > - only allow key-based SSH login for root > - configure serial console for emergency access > - disable audio, video and USB > -

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 03:53:48PM +0200, Andrea Bolognani wrote: > On Thu, 2017-10-19 at 14:53 +0200, Pavel Hrdina wrote: > > > So if your only argument against it is that you don't like it very > > > much, my reply is that I do like it quite a bit and, well, I get to > > > name the programs I

[libvirt] [PATCH 5/7] qemu: Don't misuse "ret" in qemuMigrationRun

2017-10-19 Thread Jiri Denemark
The "ret" variable is used for storing the return value of a function and should not be used as a temporary variable. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH 0/7] Preparation for new QEMU migration states

2017-10-19 Thread Jiri Denemark
Mostly refactoring of the horrible mess in qemuMigrationRun. Jiri Denemark (7): qemu: Use switch in qemuMigrationCompleted qemu: Refactor qemuMigrationRun a bit qemu: Split cleanup and error code in qemuMigrationRun qemu: Unite error handling in qemuMigrationRun qemu: Don't misuse "ret"

[libvirt] [PATCH 7/7] qemu: Set correct job status when qemuMigrationRun fails

2017-10-19 Thread Jiri Denemark
Instead of enumerating all states which need to be turned into QEMU_DOMAIN_JOB_STATUS_FAILED (and failing to add all of them), it's better to mention just the one which needs to be left alone. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 4 +--- 1 file

[libvirt] [PATCH 2/7] qemu: Refactor qemuMigrationRun a bit

2017-10-19 Thread Jiri Denemark
Some code which was supposed to be executed only when migration succeeded was buried inside the cleanup code. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 63 +++ 1 file changed, 36 insertions(+), 27 deletions(-)

[libvirt] [PATCH 6/7] qemu: Consistently use exit_monitor in qemuMigrationRun

2017-10-19 Thread Jiri Denemark
Almost every failure in qemuMigrationRun while we are talking to QEMU monitor results in a jump to exit_monitor label. The only exception is removed by this patch. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 +-- 1 file changed, 1 insertion(+), 2

[libvirt] [PATCH 3/7] qemu: Split cleanup and error code in qemuMigrationRun

2017-10-19 Thread Jiri Denemark
Let cleanup only do things common to both failure and success paths and move error handling code inside the new "error" section. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 79 --- 1 file changed, 40

[libvirt] [PATCH 1/7] qemu: Use switch in qemuMigrationCompleted

2017-10-19 Thread Jiri Denemark
When adding a new job state it's useful to let the compiler complain about places where we need to think about what to do with the new state. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 23 ++- 1 file changed, 18 insertions(+), 5

[libvirt] [REPOST PATCH 3/4] storage: Allow creation of a LUKS using logical volume

2017-10-19 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1427049 Use virStorageBackendCreateVolUsingQemuImg to apply the LUKS information to the logical volume just created. As part of the processing of the lvcreate command add 2MB to the capacity to account for the LUKS header when it's determined that the

[libvirt] [REPOST PATCH 2/4] storage: Introduce virStorageBackendCreateVolUsingQemuImg

2017-10-19 Thread John Ferlan
Create a shim that will allow other backends to make use of qemu-img functionality to create or possibly modify the volume. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 42 ++ src/storage/storage_util.h | 8 2

[libvirt] [PATCH 4/7] qemu: Unite error handling in qemuMigrationRun

2017-10-19 Thread Jiri Denemark
Merge cancel and cancelPostCopy sections with the generic error section, where we can easily decide whether canceling the ongoing migration is required. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 61 ++- 1 file

[libvirt] [REPOST PATCH 0/4] Add the ability to LUKS encrypt during LV creation

2017-10-19 Thread John Ferlan
Repost to address merge conflict from commit id '0a294a8e2' which used if (virStorageSourceHasBacking(>target)) instead of if (vol->target.backingStore). Original series: https://www.redhat.com/archives/libvir-list/2017-October/msg00340.html John Ferlan (4): storage: Extract out the LVCREATE

[libvirt] [REPOST PATCH 4/4] docs: Add news article

2017-10-19 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/news.xml | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index ff36c800a4..cb59359d76 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -42,6 +42,19 @@ + + +

[libvirt] [REPOST PATCH 1/4] storage: Extract out the LVCREATE

2017-10-19 Thread John Ferlan
Refactor to extract out the LVCREATE command. This also removes the need for the local @created since the error path can now only be reached after the creation of the logical volume. Signed-off-by: John Ferlan --- src/storage/storage_backend_logical.c | 65

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Andrea Bolognani
On Thu, 2017-10-19 at 14:53 +0200, Pavel Hrdina wrote: > > So if your only argument against it is that you don't like it very > > much, my reply is that I do like it quite a bit and, well, I get to > > name the programs I write :) > > Well, yes and no :) you can name the program but you also need

Re: [libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)

2017-10-19 Thread Ján Tomko
On Thu, Oct 19, 2017 at 03:16:32PM +0200, Peter Krempa wrote: A lot of code was copypasted into the three disk attaching functions which are (almost) identical (one was forgotten), without refactoring it first. Let's reduce two copies of the ugly code. BTW this adds support for disk encryption

[libvirt] [PATCH] qemu-ns: Detect /dev/* mount point duplicates better

2017-10-19 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1495511 When creating new /dev for domain ran in namespace we try to preserve all sub-mounts of /dev. Well, not quite all. For instance if /dev/foo/bar and /dev/foo are both mount points, only /dev/foo needs preserving. /dev/foo/bar is preserved with it

Re: [libvirt] [PATCH v1 00/14] Never ending story of user supplied aliases

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 10:10:55AM +0200, Michal Privoznik wrote: > As discussed earlier [1], we should allow users to set device > aliases at the define time. While the discussed approach calls > for generating missing aliases too, I'm saving that for another > patch set. There are couple of

[libvirt] [PATCH 2/6] qemu: hotplug: Remove wrong check for empty disks

2017-10-19 Thread Peter Krempa
The check if the disk is empty is wrong and would spuriously reject NBD sources. Remove it. --- src/qemu/qemu_hotplug.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1a0844701..6bec69a5d 100644 --- a/src/qemu/qemu_hotplug.c +++

[libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)

2017-10-19 Thread Peter Krempa
A lot of code was copypasted into the three disk attaching functions which are (almost) identical (one was forgotten), without refactoring it first. Let's reduce two copies of the ugly code. BTW this adds support for disk encryption and storage source authentication for USB disks. Peter Krempa

[libvirt] [PATCH 5/6] qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in qemuDomainAttachSCSIDisk

2017-10-19 Thread Peter Krempa
Get rid of the first copy of the mess. --- src/qemu/qemu_hotplug.c | 127 ++-- 1 file changed, 5 insertions(+), 122 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f251af904..299e25845 100644 ---

[libvirt] [PATCH 1/6] qemu: address: Remove dead code when un-reserving PCI address

2017-10-19 Thread Peter Krempa
The code can't fail so having error handling is pointless. --- src/conf/domain_addr.c | 3 +-- src/conf/domain_addr.h | 4 ++-- src/qemu/qemu_domain_address.c | 7 ++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_addr.c

[libvirt] [PATCH 6/6] qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in qemuDomainAttachUSBMassStorageDevice

2017-10-19 Thread Peter Krempa
Apart from killing a lot of code this also "implements" authentication and encryption for USB disks. --- src/qemu/qemu_hotplug.c | 84 + 1 file changed, 7 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCH 3/6] qemu: hotplug: Use disk target in debug/warning messages where appropriate

2017-10-19 Thread Peter Krempa
Some messages deal with the disk itself thus using the disk target is better than using the disk source name which can be NULL in some cases. --- src/qemu/qemu_hotplug.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCH 4/6] qemu: hotplug: extract disk hotplug worker code

2017-10-19 Thread Peter Krempa
This horrible piece of spaghetti code is copy-past(ae)d in the SCSI and USB disk hotplug code with minimal changes. Extract it for further reuse. --- src/qemu/qemu_hotplug.c | 50 ++--- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git

Re: [libvirt] [PATCH 12/12] qemu: implement input device hotunplug

2017-10-19 Thread Ján Tomko
On Thu, Oct 19, 2017 at 08:11:39AM -0400, John Ferlan wrote: On 10/17/2017 11:04 AM, Ján Tomko wrote: [...] @@ -4430,6 +4430,31 @@ qemuDomainRemoveWatchdog(virQEMUDriverPtr driver, } +static int +qemuDomainRemoveInputDevice(virDomainObjPtr vm, +

Re: [libvirt] [PATCH 04/12] Move qemuCheckCCWS390AddressSupport to qemu_domain

2017-10-19 Thread Ján Tomko
On Thu, Oct 19, 2017 at 08:08:34AM -0400, John Ferlan wrote: On 10/17/2017 11:04 AM, Ján Tomko wrote: Let it be reused in qemu_domain_address. Alternatively you could have added "#include qemu_command.h" to qemu_domain_address.c, right? The function does not deal directly with the

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 02:42:15PM +0200, Andrea Bolognani wrote: > On Thu, 2017-10-19 at 14:04 +0200, Pavel Hrdina wrote: > > > > This script replaces the existing Makefile, and will be extended > > > > to provide more functionality in future commits. > > > > > > > > It also takes over ownership

[libvirt] [PATCH] fix error message spacing in qemuDomainDetachNetDevice

2017-10-19 Thread Ján Tomko
Move the space after the colon. --- Pushed as trivial, suggested by John in review: https://www.redhat.com/archives/libvir-list/2017-October/msg00833.html src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCH v1 09/14] virDomainDeviceInfoCheckABIStability: Check for alias too

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 01:27:11PM +0100, Daniel P. Berrange wrote: On Thu, Oct 19, 2017 at 02:16:41PM +0200, Martin Kletzander wrote: On Thu, Oct 19, 2017 at 10:11:04AM +0200, Michal Privoznik wrote: > Since we'll be passing user's input onto qemu command line, we > have to make sure aliases

Re: [libvirt] libvirt not wanting to read back its own interface XML

2017-10-19 Thread Marc Haber
On Thu, Oct 19, 2017 at 01:37:45PM +0200, Michal Privoznik wrote: > Aha! the thing is, you're using netcf backend while I'm using the udev > one. This error message comes from netcf. It's a netcf's bug. CCing > Laine who should know more. Where can I read up about the different backends

Re: [libvirt] How can I tell if I'm using qemu-kvm or qemu-kvm-ev from libvirt Python binding?

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 11:43:44AM +0200, Pavel Hrdina wrote: On Thu, Oct 19, 2017 at 10:22:59AM +0200, Martin Kletzander wrote: On Thu, Oct 19, 2017 at 10:34:21AM +0300, Yaniv Kaul wrote: > I'm trying to (optionally) use iothreads, which only exist on qemu-kvm-ev. > I was hoping to see it in

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Andrea Bolognani
On Thu, 2017-10-19 at 14:04 +0200, Pavel Hrdina wrote: > > > This script replaces the existing Makefile, and will be extended > > > to provide more functionality in future commits. > > > > > > It also takes over ownership of the Ansible vault password, which > > > is now expected to be stored in

Re: [libvirt] [PATCH v1 09/14] virDomainDeviceInfoCheckABIStability: Check for alias too

2017-10-19 Thread Daniel P. Berrange
On Thu, Oct 19, 2017 at 02:16:41PM +0200, Martin Kletzander wrote: > On Thu, Oct 19, 2017 at 10:11:04AM +0200, Michal Privoznik wrote: > > Since we'll be passing user's input onto qemu command line, we > > have to make sure aliases don't change during migration and all > > the other places where

Re: [libvirt] [PATCH 2/2] qemu: remove pointless address validation on hot unplug

2017-10-19 Thread John Ferlan
On 10/18/2017 09:55 AM, Ján Tomko wrote: > Back in the times of using 'pci_del', unplugging a device without > a PCI address was not wired up. > > After completely removing support for qemu without QEMU_CAPS_DEVICE, > aliases are used to uniquely identify devices in all cases. > > Remove the

Re: [libvirt] [PATCH 1/2] qemuIsMultiFunctionDevice: return early for non-PCI addresses

2017-10-19 Thread John Ferlan
On 10/18/2017 09:55 AM, Ján Tomko wrote: > There is no point in iterating over all devices if none of them > could possibly match. > --- > src/qemu/qemu_hotplug.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Reviewed-by: John Ferlan John --

Re: [libvirt] [PATCH v1 09/14] virDomainDeviceInfoCheckABIStability: Check for alias too

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 10:11:04AM +0200, Michal Privoznik wrote: Since we'll be passing user's input onto qemu command line, we have to make sure aliases don't change during migration and all the other places where ABI is checked. Aliases are part of ABI now. I don't see how change of an

Re: [libvirt] [PATCH 00/12] qemu: input device hotplug

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1379603 > > Ján Tomko (12): > conf: audit passthrough input devices at domain startup > qemuDomainAttachControllerDevice: remove dead code > qemuDomainAttachRNGDevice: do not access source.file randomly

Re: [libvirt] [PATCH 12/12] qemu: implement input device hotunplug

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > Allow unplugging USB and virtio USB devices. > > https://bugzilla.redhat.com/show_bug.cgi?id=1379603 > --- > src/qemu/qemu_driver.c | 4 ++- > src/qemu/qemu_hotplug.c | 76 > + >

Re: [libvirt] [PATCH 10/12] Introduce qemuBuildInputDevStr

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > A function that builds the -device string for input devices. > --- > src/qemu/qemu_command.c | 42 +- > src/qemu/qemu_command.h | 7 +++ > 2 files changed, 36 insertions(+), 13 deletions(-) > [...] > diff

Re: [libvirt] [PATCH 09/12] split out qemuAssignDeviceInputAlias

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > Move assignment of input device alias into a separate function, > for reuse on hotplug. > --- > src/qemu/qemu_alias.c | 24 +++- > src/qemu/qemu_alias.h | 3 +++ > 2 files changed, 26 insertions(+), 1 deletion(-) > [...] > diff

Re: [libvirt] [PATCH 05/12] Split out qemuDomainEnsureVirtioAddress

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > Split out the common code responsible for reserving/assigning > PCI/CCW addresses for virtio disks into a helper function > for reuse by other virtio devices. > --- > src/qemu/qemu_domain_address.c | 45 > ++ >

Re: [libvirt] [PATCH 04/12] Move qemuCheckCCWS390AddressSupport to qemu_domain

2017-10-19 Thread John Ferlan
On 10/17/2017 11:04 AM, Ján Tomko wrote: > Let it be reused in qemu_domain_address. Alternatively you could have added "#include qemu_command.h" to qemu_domain_address.c, right? IDC about moving, but if you do > --- > src/qemu/qemu_command.c | 40

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 01:40:39PM +0200, Andrea Bolognani wrote: > On Wed, 2017-10-18 at 19:11 +0200, Andrea Bolognani wrote: > > This script replaces the existing Makefile, and will be extended > > to provide more functionality in future commits. > > > > It also takes over ownership of the

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 2/6] guests: Introduce lcitool

2017-10-19 Thread Andrea Bolognani
On Wed, 2017-10-18 at 19:11 +0200, Andrea Bolognani wrote: > This script replaces the existing Makefile, and will be extended > to provide more functionality in future commits. > > It also takes over ownership of the Ansible vault password, which > is now expected to be stored in lcitool's own

Re: [libvirt] libvirt not wanting to read back its own interface XML

2017-10-19 Thread Michal Privoznik
On 10/19/2017 12:10 PM, Marc Haber wrote: > On Thu, Oct 19, 2017 at 11:52:34AM +0200, Michal Privoznik wrote: >> On 10/18/2017 04:48 PM, Marc Haber wrote: >>> Hi, >>> >>> I'm trying to give libvirt knowlegde of a VLAN interface that is >>> configured by a different means and not by libvirt. To

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 5/6] guests: Configure bootloaders

2017-10-19 Thread Pavel Hrdina
On Wed, Oct 18, 2017 at 07:11:50PM +0200, Andrea Bolognani wrote: > Both GRUB and the FreeBSD bootloader need some tweaking to make > sure the OS will display boot messages and provide a login prompt > on the serial console, which is useful when SSH access can't be > used for whatever reason. > >

Re: [libvirt] [PATCH v6 5/9] nodedev: udev: Unlock the private data before setting up 'system' node

2017-10-19 Thread John Ferlan
On 10/19/2017 02:54 AM, Erik Skultety wrote: > On Wed, Oct 18, 2017 at 05:13:41PM -0400, John Ferlan wrote: >> >> >> On 10/18/2017 09:52 AM, Erik Skultety wrote: >>> udevSetupSystemDev only needs the udev data lock to be locked because of >>> calling udevGetDMIData which accesses some protected

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 4/6] guests: Add unattended installation support

2017-10-19 Thread Pavel Hrdina
On Wed, Oct 18, 2017 at 07:11:49PM +0200, Andrea Bolognani wrote: > The lcitool script can now be used to install most known guests > without requiring user interaction. > > Signed-off-by: Andrea Bolognani > --- [...] > diff --git a/guests/kickstart.cfg

Re: [libvirt] libvirt not wanting to read back its own interface XML

2017-10-19 Thread Marc Haber
On Thu, Oct 19, 2017 at 11:52:34AM +0200, Michal Privoznik wrote: > On 10/18/2017 04:48 PM, Marc Haber wrote: > > Hi, > > > > I'm trying to give libvirt knowlegde of a VLAN interface that is > > configured by a different means and not by libvirt. To figure out the > > syntax, I created a VLAN

Re: [libvirt] [PATCH 00/14] introduce virDomainSetLifecycleAction() API

2017-10-19 Thread Pavel Hrdina
On Wed, Oct 18, 2017 at 04:39:10PM -0400, John Ferlan wrote: > > > On 10/16/2017 07:06 AM, Pavel Hrdina wrote: > > Pavel Hrdina (14): > > conf: rename lifecycle enum values to correspond with typedef keyword > > conf: rename virDomainLifecycleAction enum functions > > conf: introduce

Re: [libvirt] [PATCH v1 04/14] qemu: Move device alias assignment to separate functions

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 10:10:59AM +0200, Michal Privoznik wrote: Let's move all the virAsprintf()-s into separate functions for better structure of the code. Later, when somebody wants to generate a device alias, all they need is to expose the function. I'm just waiting for these functions

Re: [libvirt] [PATCH v1 07/14] conf: Parse user supplied aliases

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 10:11:02AM +0200, Michal Privoznik wrote: If driver that is calling the parse supports user supplied aliases, they can be parsed even for inactive XMLs. However, to avoid any clashes with aliases that libvirt generates, the user ones have to have "ua-" prefix.

Re: [libvirt] [PATCH v1 01/14] conf: Fix virDomainDeviceGetInfo const correctness

2017-10-19 Thread Martin Kletzander
On Thu, Oct 19, 2017 at 10:10:56AM +0200, Michal Privoznik wrote: This function is not changing passed domain definition. Therefore, mark the argument as 'const'. Is there any other reason for this then just your new code using const? I don't see any pointer that's passed through your later

Re: [libvirt] libvirt not wanting to read back its own interface XML

2017-10-19 Thread Michal Privoznik
On 10/18/2017 04:48 PM, Marc Haber wrote: > Hi, > > I'm trying to give libvirt knowlegde of a VLAN interface that is > configured by a different means and not by libvirt. To figure out the > syntax, I created a VLAN interface through virt-manager and dumped out > the XML: > > > > >

Re: [libvirt] How can I tell if I'm using qemu-kvm or qemu-kvm-ev from libvirt Python binding?

2017-10-19 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 10:22:59AM +0200, Martin Kletzander wrote: > On Thu, Oct 19, 2017 at 10:34:21AM +0300, Yaniv Kaul wrote: > > I'm trying to (optionally) use iothreads, which only exist on qemu-kvm-ev. > > I was hoping to see it in the domcapabilities, but I don't see it there. > > How do I

[libvirt] [PATCH] bhyve: Fix build

2017-10-19 Thread Jiri Denemark
Commit v3.8.0-95-gfd885a06a dropped nmodels parameter from several APIs in src/cpu/cpu.h, but failed to update all callers. Signed-off-by: Jiri Denemark --- Pushed under the build-breaker rule. src/bhyve/bhyve_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [libvirt] [libvirt-jenkins-ci PATCH v2 0/6] Unattended guest installation and more

2017-10-19 Thread Daniel P. Berrange
On Thu, Oct 19, 2017 at 11:10:21AM +0200, Martin Kletzander wrote: > On Wed, Oct 18, 2017 at 07:11:45PM +0200, Andrea Bolognani wrote: > > Changes from [v1]: > > > > * guest changes > > - set root password to a user-provided value > > - only allow key-based SSH login for root > > - configure

  1   2   >