Re: [libvirt] [PATCH] apparmor: add dnsmasq ptrace rule to libvirtd profile
On 10/06/2017 04:04 PM, Guido Günther wrote: Hi, On Fri, Oct 06, 2017 at 02:58:10PM -0600, Jim Fehlig wrote: Commit b482925c added ptrace rule for the apparmor profiles, but one was missed in the libvirtd profile for dnsmasq. It was overlooked since the test machine did not have an active libvirt network requiring dnsmasq that was also set to autostart. With one active and set to autostart, the following denial is observed in audit.log when restarting libvirtd type=AVC msg=audit(1507320136.306:298): apparmor="DENIED" \ operation="ptrace" profile="/usr/sbin/libvirtd" pid=5472 \ comm="libvirtd" requested_mask="trace" denied_mask="trace" \ peer="/usr/sbin/dnsmasq" With an active network, I suspect a libvirtd restart causes access to /proc//*, hence the resulting denial. As a nasty side affect of the denial, libvirtd thinks it needs to spawn a dnsmasq process even though one is already running for the network. E.g. after two libvirtd restarts dnsmasq 1683 0.0 0.0 51188 2612 ?S12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 1684 0.0 0.0 51160 576 ?S12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4706 0.0 0.0 51188 2572 ?S13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4707 0.0 0.0 51160 572 ?S13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4791 0.0 0.0 51188 2580 ?S13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4792 0.0 0.0 51160 572 ?S13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper A simple fix is to add a ptrace rule for dnsmasq. Signed-off-by: Jim Fehlig--- examples/apparmor/usr.sbin.libvirtd | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd index fa4ebb355..819068ffc 100644 --- a/examples/apparmor/usr.sbin.libvirtd +++ b/examples/apparmor/usr.sbin.libvirtd @@ -39,6 +39,7 @@ ptrace (trace) peer=unconfined, ptrace (trace) peer=/usr/sbin/libvirtd, + ptrace (trace) peer=/usr/sbin/dnsmasq, ptrace (trace) peer=libvirt-*, # Very lenient profile for libvirtd since we want to first focus on confining Reviewed-By: Guido Günther Thanks, pushed. Regards, Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] apparmor: add dnsmasq ptrace rule to libvirtd profile
Hi, On Fri, Oct 06, 2017 at 02:58:10PM -0600, Jim Fehlig wrote: > Commit b482925c added ptrace rule for the apparmor profiles, > but one was missed in the libvirtd profile for dnsmasq. It was > overlooked since the test machine did not have an active libvirt > network requiring dnsmasq that was also set to autostart. With > one active and set to autostart, the following denial is observed > in audit.log when restarting libvirtd > > type=AVC msg=audit(1507320136.306:298): apparmor="DENIED" \ > operation="ptrace" profile="/usr/sbin/libvirtd" pid=5472 \ > comm="libvirtd" requested_mask="trace" denied_mask="trace" \ > peer="/usr/sbin/dnsmasq" > > With an active network, I suspect a libvirtd restart causes access > to /proc//*, hence the resulting denial. As a nasty > side affect of the denial, libvirtd thinks it needs to spawn a > dnsmasq process even though one is already running for the network. > E.g. after two libvirtd restarts > > dnsmasq 1683 0.0 0.0 51188 2612 ?S12:03 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > root 1684 0.0 0.0 51160 576 ?S12:03 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > dnsmasq 4706 0.0 0.0 51188 2572 ?S13:54 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > root 4707 0.0 0.0 51160 572 ?S13:54 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > dnsmasq 4791 0.0 0.0 51188 2580 ?S13:56 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > root 4792 0.0 0.0 51160 572 ?S13:56 0:00 \ > /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ > --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper > > A simple fix is to add a ptrace rule for dnsmasq. > > Signed-off-by: Jim Fehlig> --- > examples/apparmor/usr.sbin.libvirtd | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/examples/apparmor/usr.sbin.libvirtd > b/examples/apparmor/usr.sbin.libvirtd > index fa4ebb355..819068ffc 100644 > --- a/examples/apparmor/usr.sbin.libvirtd > +++ b/examples/apparmor/usr.sbin.libvirtd > @@ -39,6 +39,7 @@ > >ptrace (trace) peer=unconfined, >ptrace (trace) peer=/usr/sbin/libvirtd, > + ptrace (trace) peer=/usr/sbin/dnsmasq, >ptrace (trace) peer=libvirt-*, > ># Very lenient profile for libvirtd since we want to first focus on >confining Reviewed-By: Guido Günther > -- > 2.14.1 > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 5/5] docs: Add news article for bug fix
On 10/06/2017 02:13 PM, John Ferlan wrote: > Signed-off-by: John Ferlan> --- > docs/news.xml | 8 > 1 file changed, 8 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index ff36c800a4..116f4a76c9 100644 > --- a/docs/news.xml > +++ b/docs/news.xml > @@ -55,6 +55,14 @@ >way. > > > + > +Properly resize local LUKS encrypted volume > + > + > +Resizing of a local LUKS encrypted volume will now use qemu-img > +to resize the volume. This will require configuring a secret for > +the LUKS encrypted volume. > + > > > > Oh I messed this one up - so much for not running make CHECK after writing news articles ;-)... This should have been: + + + Properly resize local LUKS encrypted volume + + + Resizing of a local LUKS encrypted volume will now use qemu-img + to resize the volume. This will require configuring a secret for + the LUKS encrypted volume. + + John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 4/4] docs: Add news article
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 @@ + + + Allow a logical volume to be create using LUKS + + + A logical volume may be created using an encryption + element using "luks" format. This does require a previously created + secret to store the passphrase used to encrypt the + volume Adding the volume to a domain can then either provide the + secret or allow the consumer in the guest to provide the passphrase + in order to decrypt the volume. + + -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 2/4] storage: Introduce virStorageBackendCreateVolUsingQemuImg
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 files changed, 50 insertions(+) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index a10e4590f3..658dd8504f 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1409,6 +1409,48 @@ storageBackendCreateQemuImg(virConnectPtr conn, return ret; } + +/** + * virStorageBackendCreateVolUsingQemuImg + * @conn: Connection pointer + * @pool: Storage Pool Object + * @vol: Volume definition + * @inputvol: Volume to use for creation + * @flags: Flags for creation options + * + * A shim to storageBackendCreateQemuImg to allow other backends to + * utilize qemu-img processing in order to create or alter the volume. + * + * NB: If a volume target format is not supplied (per usual for some + * backends), temporarily adjust the format to be RAW. Once completed, + * reset the format back to NONE. + * + * Returns: 0 on success, -1 on failure. + */ +int +virStorageBackendCreateVolUsingQemuImg(virConnectPtr conn, + virStoragePoolObjPtr pool, + virStorageVolDefPtr vol, + virStorageVolDefPtr inputvol, + unsigned int flags) +{ +int ret = -1; +bool changeFormat = false; + +if (vol->target.format == VIR_STORAGE_FILE_NONE) { +vol->target.format = VIR_STORAGE_FILE_RAW; +changeFormat = true; +} + +ret = storageBackendCreateQemuImg(conn, pool, vol, inputvol, flags); + +if (changeFormat) +vol->target.format = VIR_STORAGE_FILE_NONE; + +return ret; +} + + virStorageBackendBuildVolFrom virStorageBackendGetBuildVolFromFunction(virStorageVolDefPtr vol, virStorageVolDefPtr inputvol) diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h index 00793ff3a4..dc7e62517b 100644 --- a/src/storage/storage_util.h +++ b/src/storage/storage_util.h @@ -27,6 +27,14 @@ # include "storage_backend.h" /* File creation/cloning functions used for cloning between backends */ + +int +virStorageBackendCreateVolUsingQemuImg(virConnectPtr conn, + virStoragePoolObjPtr pool, + virStorageVolDefPtr vol, + virStorageVolDefPtr inputvol, + unsigned int flags); + virStorageBackendBuildVolFrom virStorageBackendGetBuildVolFromFunction(virStorageVolDefPtr vol, virStorageVolDefPtr inputvol); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] apparmor: add dnsmasq ptrace rule to libvirtd profile
Commit b482925c added ptrace rule for the apparmor profiles, but one was missed in the libvirtd profile for dnsmasq. It was overlooked since the test machine did not have an active libvirt network requiring dnsmasq that was also set to autostart. With one active and set to autostart, the following denial is observed in audit.log when restarting libvirtd type=AVC msg=audit(1507320136.306:298): apparmor="DENIED" \ operation="ptrace" profile="/usr/sbin/libvirtd" pid=5472 \ comm="libvirtd" requested_mask="trace" denied_mask="trace" \ peer="/usr/sbin/dnsmasq" With an active network, I suspect a libvirtd restart causes access to /proc//*, hence the resulting denial. As a nasty side affect of the denial, libvirtd thinks it needs to spawn a dnsmasq process even though one is already running for the network. E.g. after two libvirtd restarts dnsmasq 1683 0.0 0.0 51188 2612 ?S12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 1684 0.0 0.0 51160 576 ?S12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4706 0.0 0.0 51188 2572 ?S13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4707 0.0 0.0 51160 572 ?S13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4791 0.0 0.0 51188 2580 ?S13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4792 0.0 0.0 51160 572 ?S13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper A simple fix is to add a ptrace rule for dnsmasq. Signed-off-by: Jim Fehlig--- examples/apparmor/usr.sbin.libvirtd | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd index fa4ebb355..819068ffc 100644 --- a/examples/apparmor/usr.sbin.libvirtd +++ b/examples/apparmor/usr.sbin.libvirtd @@ -39,6 +39,7 @@ ptrace (trace) peer=unconfined, ptrace (trace) peer=/usr/sbin/libvirtd, + ptrace (trace) peer=/usr/sbin/dnsmasq, ptrace (trace) peer=libvirt-*, # Very lenient profile for libvirtd since we want to first focus on confining -- 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 0/4] Add the ability to LUKS encrypt during LV creation
Patches should hopefully speak for themselves. John Ferlan (4): storage: Extract out the LVCREATE storage: Introduce virStorageBackendCreateVolUsingQemuImg storage: Allow creation of a LUKS using logical volume docs: Add news article docs/news.xml | 13 ++ src/storage/storage_backend_logical.c | 74 +++ src/storage/storage_util.c| 42 src/storage/storage_util.h| 8 4 files changed, 104 insertions(+), 33 deletions(-) -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 1/4] storage: Extract out the LVCREATE
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 +++ 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 0ad357729b..8d28be3adb 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -937,30 +937,11 @@ virStorageBackendLogicalDeleteVol(virConnectPtr conn ATTRIBUTE_UNUSED, static int -virStorageBackendLogicalCreateVol(virConnectPtr conn, - virStoragePoolObjPtr pool, - virStorageVolDefPtr vol) +virStorageBackendLogicalLVCreate(virStorageVolDefPtr vol, + virStoragePoolDefPtr def) { -int fd = -1; -virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +int ret; virCommandPtr cmd = NULL; -virErrorPtr err; -struct stat sb; -bool created = false; - -if (vol->target.encryption != NULL) { -virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - "%s", _("storage pool does not support encrypted " - "volumes")); -return -1; -} - -vol->type = VIR_STORAGE_VOL_BLOCK; - -VIR_FREE(vol->target.path); -if (virAsprintf(>target.path, "%s/%s", -def->target.path, vol->name) < 0) -return -1; cmd = virCommandNewArgList(LVCREATE, "--name", vol->name, @@ -981,12 +962,38 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, else virCommandAddArg(cmd, def->source.name); -if (virCommandRun(cmd, NULL) < 0) -goto error; - -created = true; +ret = virCommandRun(cmd, NULL); virCommandFree(cmd); -cmd = NULL; +return ret; +} + + +static int +virStorageBackendLogicalCreateVol(virConnectPtr conn, + virStoragePoolObjPtr pool, + virStorageVolDefPtr vol) +{ +int fd = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +virErrorPtr err; +struct stat sb; + +if (vol->target.encryption != NULL) { +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + "%s", _("storage pool does not support encrypted " + "volumes")); +return -1; +} + +vol->type = VIR_STORAGE_VOL_BLOCK; + +VIR_FREE(vol->target.path); +if (virAsprintf(>target.path, "%s/%s", +def->target.path, vol->name) < 0) +return -1; + +if (virStorageBackendLogicalLVCreate(vol, def) < 0) +return -1; if ((fd = virStorageBackendVolOpen(vol->target.path, , VIR_STORAGE_VOL_OPEN_DEFAULT)) < 0) @@ -1030,9 +1037,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, error: err = virSaveLastError(); VIR_FORCE_CLOSE(fd); -if (created) -virStorageBackendLogicalDeleteVol(conn, pool, vol, 0); -virCommandFree(cmd); +virStorageBackendLogicalDeleteVol(conn, pool, vol, 0); virSetError(err); virFreeError(err); return -1; -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 3/4] storage: Allow creation of a LUKS using logical volume
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 volume desires to use encryption. Signed-off-by: John Ferlan--- src/storage/storage_backend_logical.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 8d28be3adb..4e2775abb1 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -941,13 +941,14 @@ virStorageBackendLogicalLVCreate(virStorageVolDefPtr vol, virStoragePoolDefPtr def) { int ret; +unsigned long long capacity = vol->target.capacity; virCommandPtr cmd = NULL; cmd = virCommandNewArgList(LVCREATE, "--name", vol->name, NULL); virCommandAddArg(cmd, "-L"); -if (vol->target.capacity != vol->target.allocation) { +if (capacity != vol->target.allocation) { virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->target.allocation ? vol->target.allocation : 1, 1024)); @@ -955,8 +956,13 @@ virStorageBackendLogicalLVCreate(virStorageVolDefPtr vol, virCommandAddArg(cmd, "--virtualsize"); vol->target.sparse = true; } -virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->target.capacity, -1024)); + +/* If we're going to encrypt using LUKS, then we could need up to + * an extra 2MB for the LUKS header - so account for that now */ +if (vol->target.encryption && +vol->target.encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) +capacity += 2 * 1024 * 1024; +virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(capacity, 1024)); if (vol->target.backingStore) virCommandAddArgList(cmd, "-s", vol->target.backingStore->path, NULL); else @@ -978,13 +984,6 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, virErrorPtr err; struct stat sb; -if (vol->target.encryption != NULL) { -virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - "%s", _("storage pool does not support encrypted " - "volumes")); -return -1; -} - vol->type = VIR_STORAGE_VOL_BLOCK; VIR_FREE(vol->target.path); @@ -995,6 +994,10 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, if (virStorageBackendLogicalLVCreate(vol, def) < 0) return -1; +if (vol->target.encryption && +virStorageBackendCreateVolUsingQemuImg(conn, pool, vol, NULL, 0) < 0) +goto error; + if ((fd = virStorageBackendVolOpen(vol->target.path, , VIR_STORAGE_VOL_OPEN_DEFAULT)) < 0) goto error; -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 4/5] storage: Properly resize a local volume using LUKS
https://bugzilla.redhat.com/show_bug.cgi?id=1490279 Turns out the virStorageBackendVolResizeLocal did not differentiate whether the target volume was a LUKS volume or not and just blindly did the ftruncate() on the target volume. Follow the volume creation logic (in general) and create a qemu-img resize command to resize the target volume for LUKS ensuring that the --object secret is provided as well as the '--image-opts' used by the qemu-img resize logic to describe the path and secret ensuring that it's using the luks driver on the volume of course. Signed-off-by: John Ferlan--- src/storage/storage_util.c | 98 ++ 1 file changed, 90 insertions(+), 8 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index e6d2747e8d..e485fa5a95 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1143,6 +1143,37 @@ storageBackendCreateQemuImgSecretObject(virCommandPtr cmd, } +/* Add a --image-opts to the qemu-img resize command line: + *--image-opts driver=luks,file.filename=$volpath,key-secret=$secretAlias + * + *NB: format=raw is assumed + */ +static int +storageBackendResizeQemuImgImageOpts(virCommandPtr cmd, + const char *path, + const char *secretAlias) +{ +virBuffer buf = VIR_BUFFER_INITIALIZER; +char *commandStr = NULL; + +virBufferAsprintf(, "driver=luks,key-secret=%s,file.filename=", + secretAlias); +virQEMUBuildBufferEscapeComma(, path); + +if (virBufferCheckError() < 0) { +virBufferFreeAndReset(); +return -1; +} + +commandStr = virBufferContentAndReset(); + +virCommandAddArgList(cmd, "--image-opts", commandStr, NULL); + +VIR_FREE(commandStr); +return 0; +} + + /* Create a qemu-img virCommand from the supplied binary path, * volume definitions and imgformat */ @@ -2286,12 +2317,17 @@ virStorageBackendVolRefreshLocal(virConnectPtr conn, static int -storageBackendResizeQemuImg(virStorageVolDefPtr vol, +storageBackendResizeQemuImg(virConnectPtr conn, +virStoragePoolObjPtr pool, +virStorageVolDefPtr vol, unsigned long long capacity) { int ret = -1; -char *img_tool; +char *img_tool = NULL; virCommandPtr cmd = NULL; +const char *type; +char *secretPath = NULL; +char *secretAlias = NULL; img_tool = virFindFileInPath("qemu-img"); if (!img_tool) { @@ -2300,19 +2336,56 @@ storageBackendResizeQemuImg(virStorageVolDefPtr vol, return -1; } +if (vol->target.encryption) { +if (vol->target.format == VIR_STORAGE_FILE_RAW) +type = "luks"; +else +type = virStorageFileFormatTypeToString(vol->target.format); + +storageBackendLoadDefaultSecrets(conn, vol); + +if (storageBackendCreateQemuImgCheckEncryption(vol->target.format, + type, NULL, vol) < 0) +goto cleanup; + +if (!(secretPath = + storageBackendCreateQemuImgSecretPath(conn, pool, vol))) +goto cleanup; + +if (virAsprintf(, "%s_luks0", vol->name) < 0) +goto cleanup; +} + /* Round capacity as qemu-img resize errors out on sizes which are not * a multiple of 512 */ capacity = VIR_ROUND_UP(capacity, 512); cmd = virCommandNew(img_tool); -virCommandAddArgList(cmd, "resize", vol->target.path, NULL); +if (!vol->target.encryption) { +virCommandAddArgList(cmd, "resize", vol->target.path, NULL); +} else { +virCommandAddArgList(cmd, "resize", NULL); + +if (storageBackendCreateQemuImgSecretObject(cmd, secretPath, +secretAlias) < 0) +goto cleanup; + +if (storageBackendResizeQemuImgImageOpts(cmd, vol->target.path, + secretAlias) < 0) +goto cleanup; +} virCommandAddArgFormat(cmd, "%llu", capacity); ret = virCommandRun(cmd, NULL); + cleanup: VIR_FREE(img_tool); +if (secretPath) { +unlink(secretPath); +VIR_FREE(secretPath); +} +VIR_FREE(secretAlias); virCommandFree(cmd); - return ret; } @@ -2321,8 +2394,8 @@ storageBackendResizeQemuImg(virStorageVolDefPtr vol, * Resize a volume */ int -virStorageBackendVolResizeLocal(virConnectPtr conn ATTRIBUTE_UNUSED, -virStoragePoolObjPtr pool ATTRIBUTE_UNUSED, +virStorageBackendVolResizeLocal(virConnectPtr conn, +virStoragePoolObjPtr pool, virStorageVolDefPtr vol, unsigned long long capacity, unsigned int flags) @@ -2332,8
[libvirt] [PATCH 1/5] storage: Alter args to storageBackendResizeQemuImg
Rather than passing just the path, pass the virStorageVolDefPtr as we're going to need it shortly. Also fix the order of code and stack variables in the calling function virStorageBackendVolResizeLocal. Signed-off-by: John Ferlan--- src/storage/storage_util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index a10e4590f3..50db358dc4 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -2287,7 +2287,7 @@ virStorageBackendVolRefreshLocal(virConnectPtr conn, static int -storageBackendResizeQemuImg(const char *path, +storageBackendResizeQemuImg(virStorageVolDefPtr vol, unsigned long long capacity) { int ret = -1; @@ -2306,7 +2306,7 @@ storageBackendResizeQemuImg(const char *path, capacity = VIR_ROUND_UP(capacity, 512); cmd = virCommandNew(img_tool); -virCommandAddArgList(cmd, "resize", path, NULL); +virCommandAddArgList(cmd, "resize", vol->target.path, NULL); virCommandAddArgFormat(cmd, "%llu", capacity); ret = virCommandRun(cmd, NULL); @@ -2328,11 +2328,11 @@ virStorageBackendVolResizeLocal(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long long capacity, unsigned int flags) { +bool pre_allocate = flags & VIR_STORAGE_VOL_RESIZE_ALLOCATE; + virCheckFlags(VIR_STORAGE_VOL_RESIZE_ALLOCATE | VIR_STORAGE_VOL_RESIZE_SHRINK, -1); -bool pre_allocate = flags & VIR_STORAGE_VOL_RESIZE_ALLOCATE; - if (vol->target.format == VIR_STORAGE_FILE_RAW) { return virStorageFileResize(vol->target.path, capacity, pre_allocate); } else if (vol->target.format == VIR_STORAGE_FILE_PLOOP) { @@ -2345,7 +2345,7 @@ virStorageBackendVolResizeLocal(virConnectPtr conn ATTRIBUTE_UNUSED, return -1; } -return storageBackendResizeQemuImg(vol->target.path, capacity); +return storageBackendResizeQemuImg(vol, capacity); } } -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 3/5] storage: Alter storageBackendCreateQemuImgSecretObject args
Since all that was really needed was a couple of fields and building the object can be more generic, let's alter the args a bit. This will be useful shortly for adding the secret object for a volume resize operation on a luks volume that will need a secret object. Signed-off-by: John Ferlan--- src/storage/storage_util.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 561899a3d0..e6d2747e8d 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1120,17 +1120,14 @@ storageBackendCreateQemuImgSetOptions(virCommandPtr cmd, */ static int storageBackendCreateQemuImgSecretObject(virCommandPtr cmd, -virStorageVolDefPtr vol, -struct _virStorageBackendQemuImgInfo *info) +const char *secretPath, +const char *secretAlias) { virBuffer buf = VIR_BUFFER_INITIALIZER; char *commandStr = NULL; -if (virAsprintf(>secretAlias, "%s_luks0", vol->name) < 0) -return -1; - -virBufferAsprintf(, "secret,id=%s,file=", info->secretAlias); -virQEMUBuildBufferEscapeComma(, info->secretPath); +virBufferAsprintf(, "secret,id=%s,file=", secretAlias); +virQEMUBuildBufferEscapeComma(, secretPath); if (virBufferCheckError() < 0) { virBufferFreeAndReset(); @@ -1261,7 +1258,10 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPtr conn, if (info.format == VIR_STORAGE_FILE_RAW && vol->target.encryption != NULL && vol->target.encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) { -if (storageBackendCreateQemuImgSecretObject(cmd, vol, ) < 0) +if (virAsprintf(, "%s_luks0", vol->name) < 0) +goto error; +if (storageBackendCreateQemuImgSecretObject(cmd, info.secretPath, +info.secretAlias) < 0) goto error; enc = >target.encryption->encinfo; } -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 5/5] docs: Add news article for bug fix
Signed-off-by: John Ferlan--- docs/news.xml | 8 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index ff36c800a4..116f4a76c9 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -55,6 +55,14 @@ way. + +Properly resize local LUKS encrypted volume + + +Resizing of a local LUKS encrypted volume will now use qemu-img +to resize the volume. This will require configuring a secret for +the LUKS encrypted volume. + -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 0/5] Properly resize a local LUKS encrypted volume
The patches hopefully speak for themselves. John Ferlan (5): storage: Alter args to storageBackendResizeQemuImg storage: Add error path for virStorageBackendCreateQemuImgCmdFromVol storage: Alter storageBackendCreateQemuImgSecretObject args storage: Properly resize a local volume using LUKS docs: Add news article for bug fix docs/news.xml | 8 +++ src/storage/storage_util.c | 133 - 2 files changed, 115 insertions(+), 26 deletions(-) -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] gnulib tests in libvirt broken by newer glibc 2.26
Daniel P. Berrange wrote: > From my own F28 rawhide install with glibc-2.26.90-16.fc28.x86_64 > > > > > 1) The output of > > $ nm test-getopt-posix | grep getopt > > $ nm test-getopt-posix | grep getopt > U getopt@@GLIBC_2.2.5 > 00400ab0 t getopt_loop.constprop.0 > 00400c50 t test_getopt > > > > 2) The output of > > $ gcc -DHAVE_CONFIG_H -DGNULIB_STRICT_CHECKING=1 -I. -I.. -I../gllib > > -g -O2 -E test-getopt-posix.c > > Attached in the file 'question-2.txt' > > > > > 3) The output of > > $ gcc -DHAVE_CONFIG_H -DGNULIB_STRICT_CHECKING=1 -I. -I.. -I../gllib > > -g -O2 -E -dM test-getopt-posix.c > > Attached in the file 'question-3.txt' Thanks. From this, I can see that getopt-pfx-core.h does not get included at all. Please try this patch (or, if you don't want to re-run configure, just remove the "&& !defined __GLIBC__" from the generated unistd.h). diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 748112f..b5b6e0e 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -134,9 +134,8 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT +/* Get getopt(), optarg, optind, opterr, optopt. */ +#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT # include # include #endif -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On Fri, Oct 6, 2017 at 7:47 AM, Eric Blakewrote: > On 10/05/2017 06:07 AM, Pino Toscano wrote: >> The majority of the syntax check is taylored for C sources, so some of >> the checks already cause false positives for non-C sources (and thus >> there are exclusion regexps in place). >> >> Instead, just exclude more non-C files from all the checks: >> - pot files: they are templates for po files (already excluded), and >> they are automatically generated from sources >> - pl files: Perl sources, which have own APIs, style, etc; they are >> helper scripts, not "real" sources >> - spec/spec.in files: RPM packaging files >> - js/woff/html.in files: files for web pages >> - diff/patch files: patches >> - stp files: SystemTap scripts >> - syms files: linker symbols files >> - conf files: generic configuration files >> - data/cpuinfo files: procinfo/cpuinfo files > > There are still some useful syntax checks for performing on ALL files > (for example, prohibit_doubled_word). So I'm not quite sure that > blindly exempting these files from all possible checks makes sense. > > Maybe it's worth teaching upstream gnulib syntax-check to make it easier > to auto-exclude non-C files from checks that ARE specific to the C > language, without weakening the global checks that are good on all > files. Maybe even something as simple as adding some sort of language= > tag to feed to $(_sc_search_regexp (if not specified, run on all files, > but if specified as C, the syntax-check is specific to C-like files, so > it limits to .h, .c. .y). > > I'm adding the gnulib list to get feedback on the idea; maybe Jim > Meyering has an opinion as one of the original syntax-check authors. Hi Eric, Is there some reason not to use a directive like this in a rule applying exclusively to version-controlled C-like files? in_vc_files='\.[chly]$$' I looked at libvirt's cfg.mk, and if you add that line to the sc_prohibit_sprintf rule, you can then remove the lines that exempt files with unrelated suffixes from that rule: exclude_file_name_regexp--sc_prohibit_sprintf = \ ^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$ Another rule that can catch things in any non-binary file is sc_prohibit_undesirable_word_seq, even if it's only for pet peeves like detecting "can not". ... >> # Files that should never cause syntax check failures. >> VC_LIST_ALWAYS_EXCLUDE_REGEX = \ >> - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ >> + >> \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 2/5] storage: Add error path for virStorageBackendCreateQemuImgCmdFromVol
Rather than inline the various free's and return NULL, just create an error label. Signed-off-by: John Ferlan--- src/storage/storage_util.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 50db358dc4..561899a3d0 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1261,19 +1261,13 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPtr conn, if (info.format == VIR_STORAGE_FILE_RAW && vol->target.encryption != NULL && vol->target.encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) { -if (storageBackendCreateQemuImgSecretObject(cmd, vol, ) < 0) { -VIR_FREE(info.secretAlias); -virCommandFree(cmd); -return NULL; -} +if (storageBackendCreateQemuImgSecretObject(cmd, vol, ) < 0) +goto error; enc = >target.encryption->encinfo; } -if (storageBackendCreateQemuImgSetOptions(cmd, imgformat, enc, info) < 0) { -VIR_FREE(info.secretAlias); -virCommandFree(cmd); -return NULL; -} +if (storageBackendCreateQemuImgSetOptions(cmd, imgformat, enc, info) < 0) +goto error; VIR_FREE(info.secretAlias); if (info.inputPath) @@ -1283,6 +1277,11 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPtr conn, virCommandAddArgFormat(cmd, "%lluK", info.size_arg); return cmd; + + error: +VIR_FREE(info.secretAlias); +virCommandFree(cmd); +return NULL; } -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On 10/06/2017 12:07 PM, Jim Meyering wrote: > On Fri, Oct 6, 2017 at 7:47 AM, Eric Blakewrote: >> On 10/05/2017 06:07 AM, Pino Toscano wrote: >>> The majority of the syntax check is taylored for C sources, so some of >>> the checks already cause false positives for non-C sources (and thus >>> there are exclusion regexps in place). >>> >>> Instead, just exclude more non-C files from all the checks: >> Maybe it's worth teaching upstream gnulib syntax-check to make it easier >> to auto-exclude non-C files from checks that ARE specific to the C >> language, without weakening the global checks that are good on all >> files. Maybe even something as simple as adding some sort of language= >> tag to feed to $(_sc_search_regexp (if not specified, run on all files, >> but if specified as C, the syntax-check is specific to C-like files, so >> it limits to .h, .c. .y). >> >> I'm adding the gnulib list to get feedback on the idea; maybe Jim >> Meyering has an opinion as one of the original syntax-check authors. > > Hi Eric, > Is there some reason not to use a directive like this in a rule > applying exclusively to version-controlled C-like files? > > in_vc_files='\.[chly]$$' So we already have the mechanism - we just have to use it in the right places ;) Some of the existing maint.mk rules don't use it (for a quick example, sc_cast_of_x_alloc_return_value, sc_cast_of_alloca_return_value) - but it may also be a question of how often these rules are firing on non-C files to let us know that we even have false positives. > > I looked at libvirt's cfg.mk, and if you add that line to the > sc_prohibit_sprintf rule, you can then remove the lines that exempt > files with unrelated suffixes from that rule: Indeed, that's probably the best fix for libvirt: for any rule in cfg.mk that we want to run only on C files, use in_vc_files= to make it obvious. > > exclude_file_name_regexp--sc_prohibit_sprintf = \ > ^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$ > > Another rule that can catch things in any non-binary file is > sc_prohibit_undesirable_word_seq, even if it's only for pet peeves > like detecting "can not". And sc_space_tab is globally useful, etc. > > ... >>> # Files that should never cause syntax check failures. >>> VC_LIST_ALWAYS_EXCLUDE_REGEX = \ >>> - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ >>> + >>> \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ > There ARE some files that are always worth excluding: the list of graphic binary files (such as .png) makes obvious sense. But it's a high bar to globally exclude a file from all syntax checks, especially when it's relatively easy to write specific checks to be language specific. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v4 1/5] numa: rename function virDomainNumaDefCPUFormat
On 09/08/2017 08:47 AM, Wim Ten Have wrote: From: Wim ten HaveThis patch renames virDomainNumaDefCPUFormat(), by adding XML, into virDomainNumaDefCPUFormatXML(). So that it meets its peer Parse sibling virDomainNumaDefCPUParseXML() and matches vir*XML() function naming conventions. Signed-off-by: Wim ten Have --- Changes on v3: - Cleanup by putting this change under a separate patch in series. --- src/conf/cpu_conf.c | 2 +- src/conf/numa_conf.c | 4 ++-- src/conf/numa_conf.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index c21d11d..8d804a1 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -642,7 +642,7 @@ virCPUDefFormatBufFull(virBufferPtr buf, if (virCPUDefFormatBuf(, def, updateCPU) < 0) goto cleanup; -if (virDomainNumaDefCPUFormat(, numa) < 0) +if (virDomainNumaDefCPUFormatXML(, numa) < 0) goto cleanup; if (virBufferCheckError() < 0 || diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index bfd3703..b71dc01 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -801,8 +801,8 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def, int -virDomainNumaDefCPUFormat(virBufferPtr buf, - virDomainNumaPtr def) +virDomainNumaDefCPUFormatXML(virBufferPtr buf, + virDomainNumaPtr def) { virDomainMemoryAccess memAccess; char *cpustr; diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h index b6a5354..378b772 100644 --- a/src/conf/numa_conf.h +++ b/src/conf/numa_conf.h @@ -151,7 +151,7 @@ bool virDomainNumatuneNodeSpecified(virDomainNumaPtr numatune, int cellid); int virDomainNumaDefCPUParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt); -int virDomainNumaDefCPUFormat(virBufferPtr buf, virDomainNumaPtr def); +int virDomainNumaDefCPUFormatXML(virBufferPtr buf, virDomainNumaPtr def); unsigned int virDomainNumaGetCPUCountTotal(virDomainNumaPtr numa); Name symmetry between the other vir*{Format,Parse}XML functions seems sane to me. Reviewed-by: Jim Fehlig This one can be pushed independent of the series, and I'll do so shortly after rewording the commit message a bit. Regards, Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1] build: isolate core libvirt libs deps from xen runtime
On 10/06/2017 06:16 AM, Wim Ten Have wrote: From: Wim ten HaveGenerating libvirt packages per make rpm, "with-libxl=1" and "with-xen=1", adds strict runtime dependencies per libxenlight for xen-libs package from core libvirt-libs package. This is not necessary and unfortunate since those dependencies set demand to "xen-libs" package even when there's no need for libvirt xen or libxl driver components. This patch is to have two separate xenconfig lib tool libraries: one for core libvirt (without XL), and a another that contains xl for libxl driver (libvirt_driver_libxl_impl.la) which when loading the driver, loads the remaining symbols (xen{Format,Parse}XL. For the user/sysadmin, this means the xen dependencies are moved into libxl driver, instead of core libvirt. Signed-off-by: Joao Martins Signed-off-by: Wim ten Have --- src/Makefile.am | 23 +-- src/libvirt_xenxlconfig.syms | 12 2 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 src/libvirt_xenxlconfig.syms diff --git a/src/Makefile.am b/src/Makefile.am index 173fba1e6..b74856ba7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1197,7 +1197,8 @@ XENCONFIG_SOURCES = \ xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h \ xenconfig/xen_xm.c xenconfig/xen_xm.h if WITH_LIBXL -XENCONFIG_SOURCES += \ +XENCONFIG_LIBXL_SOURCES = \ + $(XENCONFIG_SOURCES)\ xenconfig/xen_xl.c xenconfig/xen_xl.h endif WITH_LIBXL @@ -1258,10 +1259,17 @@ endif WITH_VMX if WITH_XENCONFIG noinst_LTLIBRARIES += libvirt_xenconfig.la libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la -libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS) libvirt_xenconfig_la_CFLAGS = \ - -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS) + -I$(srcdir)/conf $(AM_CFLAGS) libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES) + +if WITH_LIBXL +noinst_LTLIBRARIES += libvirt_xenconfig_libxl.la +libvirt_xenconfig_libxl_la_LIBADD = $(LIBXL_LIBS) +libvirt_xenconfig_libxl_la_CFLAGS = \ + -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS) +libvirt_xenconfig_libxl_la_SOURCES = $(XENCONFIG_LIBXL_SOURCES) +endif WITH_LIBXL endif WITH_XENCONFIG @@ -1417,7 +1425,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = \ $(AM_CFLAGS) libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS) libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \ - libvirt_xenconfig.la \ + libvirt_xenconfig_libxl.la \ libvirt_secret.la libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES) @@ -2045,6 +2053,7 @@ EXTRA_DIST += \ $(VBOX_DRIVER_EXTRA_DIST) \ $(VMWARE_DRIVER_SOURCES)\ $(XENCONFIG_SOURCES)\ + $(XENCONFIG_LIBXL_SOURCES) \ $(ACCESS_DRIVER_POLKIT_POLICY) check-local: check-augeas @@ -2228,12 +2237,6 @@ else ! WITH_XENCONFIG SYM_FILES += $(srcdir)/libvirt_xenconfig.syms endif ! WITH_XENCONFIG -if WITH_LIBXL -USED_SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms -else ! WITH_LIBXL -SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms -endif ! WITH_LIBXL - if WITH_SASL USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms else ! WITH_SASL diff --git a/src/libvirt_xenxlconfig.syms b/src/libvirt_xenxlconfig.syms deleted file mode 100644 index dbe43aac7..0 --- a/src/libvirt_xenxlconfig.syms +++ /dev/null @@ -1,12 +0,0 @@ -# -# These symbols are dependent upon --with-libxl via WITH_LIBXL. -# - -#xenconfig/xen_xl.h -xenFormatXL; -xenParseXL; - -# Let emacs know we want case-insensitive sorting -# Local Variables: -# sort-fold-case: t -# End: I tested with all combinations of {with,without}-{xen,libxl} plus 'make dist' and didn't notice any issues, hence Reviewed-by: Jim Fehlig I'll push the patch shortly, along with adding a note to my todo list to move the files in xenconfig to the libxl driver when removing the legacy xen driver. Regards, Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvit-jenkins-ci PATCH v2 00/16] Ansible all the things!
On Fri, Oct 06, 2017 at 02:29:44PM +0100, Daniel P. Berrange wrote: > On Fri, Oct 06, 2017 at 02:48:36PM +0200, Andrea Bolognani wrote: > > Changes from [v1]: > > > > * drop support for building projects; > > * reduce redundancy by using mappings; > > * add FreeBSD 10 support. > > > > [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg00035.html > > BTW, what's your thoughts on what we should do with this once committed ? > > Do you have plans to rebuild all our current CI VMs from scratch > using these recipes ? It would probably nice todo this so we get > them into a known good state, as well as helping us move the > Fedora vms onto current versions. Yes, we are planning to do that, actually I'll be the one who will rebuild all the VMs. I'm also planning to prepare template kickstart for Fedora to automate it even more. Pavel signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 3/8] storage: Use virStoragePoolObjGetDef accessor for RBD backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_rbd.c | 64 +-- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c index 6731677851..7f9597cabe 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -210,10 +210,11 @@ static int virStorageBackendRBDOpenIoCTX(virStorageBackendRBDStatePtr ptr, virStoragePoolObjPtr pool) { -int r = rados_ioctx_create(ptr->cluster, pool->def->source.name, >ioctx); +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +int r = rados_ioctx_create(ptr->cluster, def->source.name, >ioctx); if (r < 0) { virReportSystemError(-r, _("failed to create the RBD IoCTX. Does the pool '%s' exist?"), - pool->def->source.name); + def->source.name); } return r; } @@ -255,11 +256,12 @@ virStorageBackendRBDNewState(virConnectPtr conn, virStoragePoolObjPtr pool) { virStorageBackendRBDStatePtr ptr; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); if (VIR_ALLOC(ptr) < 0) return NULL; -if (virStorageBackendRBDOpenRADOSConn(ptr, conn, >def->source) < 0) +if (virStorageBackendRBDOpenRADOSConn(ptr, conn, >source) < 0) goto error; if (virStorageBackendRBDOpenIoCTX(ptr, pool) < 0) @@ -359,6 +361,7 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol, virStorageBackendRBDStatePtr ptr) { int ret = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); int r = 0; rbd_image_t image = NULL; rbd_image_info_t info; @@ -388,7 +391,7 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol, if (volStorageBackendRBDUseFastDiff(features)) { VIR_DEBUG("RBD image %s/%s has fast-diff feature enabled. " "Querying for actual allocation", - pool->def->source.name, vol->name); + def->source.name, vol->name); if (virStorageBackendRBDSetAllocation(vol, image, ) < 0) goto cleanup; @@ -398,19 +401,17 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol, VIR_DEBUG("Refreshed RBD image %s/%s (capacity: %llu allocation: %llu " "obj_size: %"PRIu64" num_objs: %"PRIu64")", - pool->def->source.name, vol->name, vol->target.capacity, + def->source.name, vol->name, vol->target.capacity, vol->target.allocation, info.obj_size, info.num_objs); VIR_FREE(vol->target.path); if (virAsprintf(>target.path, "%s/%s", -pool->def->source.name, -vol->name) < 0) +def->source.name, vol->name) < 0) goto cleanup; VIR_FREE(vol->key); if (virAsprintf(>key, "%s/%s", -pool->def->source.name, -vol->name) < 0) +def->source.name, vol->name) < 0) goto cleanup; ret = 0; @@ -430,6 +431,7 @@ virStorageBackendRBDRefreshPool(virConnectPtr conn, int len = -1; int r = 0; char *name, *names = NULL; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStorageBackendRBDStatePtr ptr = NULL; struct rados_cluster_stat_t clusterstat; struct rados_pool_stat_t poolstat; @@ -444,17 +446,17 @@ virStorageBackendRBDRefreshPool(virConnectPtr conn, if ((r = rados_ioctx_pool_stat(ptr->ioctx, )) < 0) { virReportSystemError(-r, _("failed to stat the RADOS pool '%s'"), - pool->def->source.name); + def->source.name); goto cleanup; } -pool->def->capacity = clusterstat.kb * 1024; -pool->def->available = clusterstat.kb_avail * 1024; -pool->def->allocation = poolstat.num_bytes; +def->capacity = clusterstat.kb * 1024; +def->available = clusterstat.kb_avail * 1024; +def->allocation = poolstat.num_bytes; VIR_DEBUG("Utilization of RBD pool %s: (kb: %"PRIu64" kb_avail: %"PRIu64 " num_bytes: %"PRIu64")", - pool->def->source.name, clusterstat.kb, clusterstat.kb_avail, + def->source.name, clusterstat.kb, clusterstat.kb_avail, poolstat.num_bytes); while (true) { @@ -514,7 +516,7 @@ virStorageBackendRBDRefreshPool(virConnectPtr conn, } VIR_DEBUG("Found %zu images in RBD pool %s", - virStoragePoolObjGetVolumesCount(pool), pool->def->source.name); + virStoragePoolObjGetVolumesCount(pool), def->source.name); ret = 0; @@ -610,12 +612,13 @@ virStorageBackendRBDDeleteVol(virConnectPtr conn, { int ret = -1; int r = 0; +virStoragePoolDefPtr def =
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On 10/06/2017 08:23 AM, Michal Privoznik wrote: >>> .spec is not in the repo, so it's never checked. And then, we perhaps >>> want to check .spec.in? For instance for space at EOF. >> >> .spec is generated from .spec.in, so for a builddir==srcdir build, >> syntax-check will find both; hence, IMHO both ought to be either >> skipped or checked, but together. > > Is that right? I always thought that syntax-check runs only over the > files that are in the git and not generated ones: Many checks run only on checked-in files, but some checks also run on in-tree files. It depends whether the check was written with in_vc_files, in_files, or something else. In fact, many builtin rules in maint.mk use: in_vc_files='\.[chly]$$' to limit to C-like files; I think part of the problem is that there are syntax-check rules that forget to use this limiting filter, and end up getting applied to too many files. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On 10/05/2017 06:07 AM, Pino Toscano wrote: > The majority of the syntax check is taylored for C sources, so some of > the checks already cause false positives for non-C sources (and thus > there are exclusion regexps in place). > > Instead, just exclude more non-C files from all the checks: > - pot files: they are templates for po files (already excluded), and > they are automatically generated from sources > - pl files: Perl sources, which have own APIs, style, etc; they are > helper scripts, not "real" sources > - spec/spec.in files: RPM packaging files > - js/woff/html.in files: files for web pages > - diff/patch files: patches > - stp files: SystemTap scripts > - syms files: linker symbols files > - conf files: generic configuration files > - data/cpuinfo files: procinfo/cpuinfo files There are still some useful syntax checks for performing on ALL files (for example, prohibit_doubled_word). So I'm not quite sure that blindly exempting these files from all possible checks makes sense. Maybe it's worth teaching upstream gnulib syntax-check to make it easier to auto-exclude non-C files from checks that ARE specific to the C language, without weakening the global checks that are good on all files. Maybe even something as simple as adding some sort of language= tag to feed to $(_sc_search_regexp (if not specified, run on all files, but if specified as C, the syntax-check is specific to C-like files, so it limits to .h, .c. .y). I'm adding the gnulib list to get feedback on the idea; maybe Jim Meyering has an opinion as one of the original syntax-check authors. > > Python files (.py) are left allowed, since there is at least one syntax > check specifically for them. > > Signed-off-by: Pino Toscano> --- > cfg.mk | 29 + > 1 file changed, 13 insertions(+), 16 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index 0f4065b98..44a19594e 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -91,7 +91,7 @@ endif > > # Files that should never cause syntax check failures. > VC_LIST_ALWAYS_EXCLUDE_REGEX = \ > - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ > + > \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 7/8] storage: Use virStoragePoolObjGetDef accessor for new driver events
Missed from merge from commit id 'b0652192' into commit id 'bfcd8fc92' were a couple of obj->def-> references. Signed-off-by: John Ferlan--- src/storage/storage_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index b0edf9f885..2b7a299706 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -994,8 +994,8 @@ storagePoolBuild(virStoragePoolPtr pool, backend->buildPool(pool->conn, obj, flags) < 0) goto cleanup; -event = virStoragePoolEventLifecycleNew(obj->def->name, -obj->def->uuid, +event = virStoragePoolEventLifecycleNew(def->name, +def->uuid, VIR_STORAGE_POOL_EVENT_CREATED, 0); @@ -1128,8 +1128,8 @@ storagePoolDelete(virStoragePoolPtr pool, if (backend->deletePool(pool->conn, obj, flags) < 0) goto cleanup; -event = virStoragePoolEventLifecycleNew(obj->def->name, -obj->def->uuid, +event = virStoragePoolEventLifecycleNew(def->name, +def->uuid, VIR_STORAGE_POOL_EVENT_DELETED, 0); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v4 2/5] numa: describe siblings distances within cells
On 09/08/2017 08:47 AM, Wim Ten Have wrote: From: Wim ten HaveAdd libvirtd NUMA cell domain administration functionality to describe underlying cell id sibling distances in full fashion when configuring HVM guests. May I suggest wording this paragraph as: Add support for describing sibling vCPU distances within a domain's vNUMA cell configuration. Schema updates are made to docs/schemas/cputypes.rng enforcing domain administration to follow the syntax below the numa cell id and docs/schemas/basictypes.rng to add "numaDistanceValue". I'm not sure this paragraph is needed in the commit message. A minimum value of 10 representing the LOCAL_DISTANCE as 0-9 are reserved values and can not be used as System Locality Distance Information. A value of 20 represents the default setting of REMOTE_DISTANCE where a maximum value of 255 represents UNREACHABLE. Effectively any cell sibling can be assigned a distance value where practically 'LOCAL_DISTANCE <= value <= UNREACHABLE'. [below is an example of a 4 node setup] How would this look when having more than one cpu in a cell? I suppose something like In the V3 thread you mentioned "And to reduce even more we could also remove LOCAL_DISTANCES as they make a constant factor where; (cell_id == sibling_id)". In the above example cell_id 1 == sibling_id 1, but it is not LOCAL_DISTANCE. Whenever a sibling id the cell LOCAL_DISTANCE does apply and for any sibling id not being covered a default of REMOTE_DISTANCE is used for internal computations. I'm having a hard time understanding this sentence... I didn't look closely at the patch since I'd like to understand how multi-cpu cells are handled before doing so. Regards, Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 8/8] storage: Privatize virStoragePoolObj and virStorageVolDefList
Move the structures into virstorageobj so that both are known within virstorageobj.c. Signed-off-by: John Ferlan--- src/conf/storage_conf.h | 4 src/conf/virstorageobj.c | 20 src/conf/virstorageobj.h | 15 --- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 8ac6796a61..b349783d26 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -75,10 +75,6 @@ struct _virStorageVolDef { typedef struct _virStorageVolDefList virStorageVolDefList; typedef virStorageVolDefList *virStorageVolDefListPtr; -struct _virStorageVolDefList { -size_t count; -virStorageVolDefPtr *objs; -}; VIR_ENUM_DECL(virStorageVol) diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index ff04c9efe4..50dbd7bf4d 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -37,6 +37,26 @@ VIR_LOG_INIT("conf.virstorageobj"); +struct _virStorageVolDefList { +size_t count; +virStorageVolDefPtr *objs; +}; + +struct _virStoragePoolObj { +virMutex lock; + +char *configFile; +char *autostartLink; +bool active; +bool autostart; +unsigned int asyncjobs; + +virStoragePoolDefPtr def; +virStoragePoolDefPtr newDef; + +virStorageVolDefList volumes; +}; + virStoragePoolObjPtr virStoragePoolObjNew(void) { diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h index cf7ee06cd1..69e737226b 100644 --- a/src/conf/virstorageobj.h +++ b/src/conf/virstorageobj.h @@ -27,21 +27,6 @@ typedef struct _virStoragePoolObj virStoragePoolObj; typedef virStoragePoolObj *virStoragePoolObjPtr; -struct _virStoragePoolObj { -virMutex lock; - -char *configFile; -char *autostartLink; -bool active; -bool autostart; -unsigned int asyncjobs; - -virStoragePoolDefPtr def; -virStoragePoolDefPtr newDef; - -virStorageVolDefList volumes; -}; - typedef struct _virStoragePoolObjList virStoragePoolObjList; typedef virStoragePoolObjList *virStoragePoolObjListPtr; struct _virStoragePoolObjList { -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 4/8] storage: Use virStoragePoolObjGetDef accessor for SCSI backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_scsi.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 02fd4b643c..ee79ad72f5 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -139,6 +139,7 @@ virStoragePoolFCRefreshThread(void *opaque) const char *fchost_name = cbdata->fchost_name; const unsigned char *pool_uuid = cbdata->pool_uuid; virStoragePoolObjPtr pool = NULL; +virStoragePoolDefPtr def; unsigned int host; int found = 0; int tries = 2; @@ -149,14 +150,15 @@ virStoragePoolFCRefreshThread(void *opaque) /* Let's see if the pool still exists - */ if (!(pool = virStoragePoolObjFindPoolByUUID(pool_uuid))) break; +def = virStoragePoolObjGetDef(pool); /* Return with pool lock, if active, we can get the host number, * successfully, rescan, and find LUN's, then we are happy */ VIR_DEBUG("Attempt FC Refresh for pool='%s' name='%s' tries='%d'", - pool->def->name, fchost_name, tries); + def->name, fchost_name, tries); -pool->def->allocation = pool->def->capacity = pool->def->available = 0; +def->allocation = def->capacity = def->available = 0; if (virStoragePoolObjIsActive(pool) && virSCSIHostGetNumber(fchost_name, ) == 0 && @@ -371,6 +373,7 @@ static int virStorageBackendSCSICheckPool(virStoragePoolObjPtr pool, bool *isActive) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *path = NULL; char *name = NULL; unsigned int host; @@ -378,13 +381,12 @@ virStorageBackendSCSICheckPool(virStoragePoolObjPtr pool, *isActive = false; -if (!(name = getAdapterName(>def->source.adapter))) { +if (!(name = getAdapterName(>source.adapter))) { /* It's normal for the pool with "fc_host" type source * adapter fails to get the adapter name, since the vHBA * the adapter based on might be not created yet. */ -if (pool->def->source.adapter.type == -VIR_STORAGE_ADAPTER_TYPE_FC_HOST) { +if (def->source.adapter.type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) { virResetLastError(); return 0; } else { @@ -412,13 +414,14 @@ static int virStorageBackendSCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *name = NULL; unsigned int host; int ret = -1; -pool->def->allocation = pool->def->capacity = pool->def->available = 0; +def->allocation = def->capacity = def->available = 0; -if (!(name = getAdapterName(>def->source.adapter))) +if (!(name = getAdapterName(>source.adapter))) return -1; if (virSCSIHostGetNumber(name, ) < 0) @@ -443,11 +446,12 @@ static int virStorageBackendSCSIStartPool(virConnectPtr conn, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); const char *configFile = virStoragePoolObjGetConfigFile(pool); -if (pool->def->source.adapter.type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) -return createVport(conn, pool->def, configFile, - >def->source.adapter.data.fchost); +if (def->source.adapter.type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) +return createVport(conn, def, configFile, + >source.adapter.data.fchost); return 0; } @@ -457,9 +461,11 @@ static int virStorageBackendSCSIStopPool(virConnectPtr conn, virStoragePoolObjPtr pool) { -if (pool->def->source.adapter.type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); + +if (def->source.adapter.type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) return virNodeDeviceDeleteVport(conn, - >def->source.adapter.data.fchost); +>source.adapter.data.fchost); return 0; } -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 2/8] storage: Use virStoragePoolObjGetDef accessor for MPATH backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_mpath.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c index 46818ef2cc..4bc39c24eb 100644 --- a/src/storage/storage_backend_mpath.c +++ b/src/storage/storage_backend_mpath.c @@ -48,6 +48,7 @@ virStorageBackendMpathNewVol(virStoragePoolObjPtr pool, const int devnum, const char *dev) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStorageVolDefPtr vol; int ret = -1; @@ -74,8 +75,8 @@ virStorageBackendMpathNewVol(virStoragePoolObjPtr pool, if (virStoragePoolObjAddVol(pool, vol) < 0) goto cleanup; -pool->def->capacity += vol->target.capacity; -pool->def->allocation += vol->target.allocation; +def->capacity += vol->target.capacity; +def->allocation += vol->target.allocation; ret = 0; cleanup: @@ -259,10 +260,11 @@ virStorageBackendMpathRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { int retval = 0; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); VIR_DEBUG("conn=%p, pool=%p", conn, pool); -pool->def->allocation = pool->def->capacity = pool->def->available = 0; +def->allocation = def->capacity = def->available = 0; virWaitForDevices(); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 0/8] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #3)
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 last half of the storage backends plus one missed merge (because I broke things up ) John Ferlan (8): storage: Use virStoragePoolObjGetDef accessor for iSCSI backend storage: Use virStoragePoolObjGetDef accessor for MPATH backend storage: Use virStoragePoolObjGetDef accessor for RBD backend storage: Use virStoragePoolObjGetDef accessor for SCSI backend storage: Use virStoragePoolObjGetDef accessor for VSTORAGE backend storage: Use virStoragePoolObjGetDef accessor for ZFS backend storage: Use virStoragePoolObjGetDef accessor for new driver events storage: Privatize virStoragePoolObj and virStorageVolDefList src/conf/storage_conf.h| 4 --- src/conf/virstorageobj.c | 20 +++ src/conf/virstorageobj.h | 15 src/storage/storage_backend_iscsi.c| 41 -- src/storage/storage_backend_mpath.c| 8 +++-- src/storage/storage_backend_rbd.c | 64 ++ src/storage/storage_backend_scsi.c | 30 +--- src/storage/storage_backend_vstorage.c | 31 src/storage/storage_backend_zfs.c | 39 - src/storage/storage_driver.c | 8 ++--- 10 files changed, 144 insertions(+), 116 deletions(-) -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvit-jenkins-ci PATCH v2 00/16] Ansible all the things!
On Fri, 2017-10-06 at 14:29 +0100, Daniel P. Berrange wrote: > On Fri, Oct 06, 2017 at 02:48:36PM +0200, Andrea Bolognani wrote: > > Changes from [v1]: > > > > * drop support for building projects; > > * reduce redundancy by using mappings; > > * add FreeBSD 10 support. > > > > [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg00035.html > > BTW, what's your thoughts on what we should do with this once committed ? > > Do you have plans to rebuild all our current CI VMs from scratch > using these recipes ? It would probably nice todo this so we get > them into a known good state, as well as helping us move the > Fedora vms onto current versions. Definitely. The idea would be to build a Fedora 26 worker, set it up using the Ansible automation and add it to the Jenkins setup; there might be some minor kinks to iron out before all jobs can run successfully. Once that's done, we can start replacing existing workers one by one, and finally expand the test matrix to its fullest potential. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 6/8] storage: Use virStoragePoolObjGetDef accessor for ZFS backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_zfs.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c index c2662815a1..198c788aca 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -86,10 +86,11 @@ static int virStorageBackendZFSCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED, bool *isActive) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *devpath; if (virAsprintf(, "/dev/zvol/%s", -pool->def->source.name) < 0) +def->source.name) < 0) return -1; *isActive = virFileIsDir(devpath); VIR_FREE(devpath); @@ -109,6 +110,7 @@ virStorageBackendZFSParseVol(virStoragePoolObjPtr pool, char *vol_name; bool is_new_vol = false; virStorageVolDefPtr volume = NULL; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); if (!(tokens = virStringSplitCount(volume_string, "\t", 0, ))) return -1; @@ -142,7 +144,7 @@ virStorageBackendZFSParseVol(virStoragePoolObjPtr pool, if (volume->target.path == NULL) { if (virAsprintf(>target.path, "%s/%s", -pool->def->target.path, volume->name) < 0) +def->target.path, volume->name) < 0) goto cleanup; } @@ -178,6 +180,7 @@ static int virStorageBackendZFSFindVols(virStoragePoolObjPtr pool, virStorageVolDefPtr vol) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = NULL; char *volumes_list = NULL; char **lines = NULL; @@ -199,7 +202,7 @@ virStorageBackendZFSFindVols(virStoragePoolObjPtr pool, "list", "-Hp", "-t", "volume", "-r", "-o", "name,volsize,refreservation", - pool->def->source.name, + def->source.name, NULL); virCommandSetOutputBuffer(cmd, _list); if (virCommandRun(cmd, NULL) < 0) @@ -228,6 +231,7 @@ static int virStorageBackendZFSRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool ATTRIBUTE_UNUSED) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = NULL; char *zpool_props = NULL; char **lines = NULL; @@ -247,7 +251,7 @@ virStorageBackendZFSRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, cmd = virCommandNewArgList(ZPOOL, "get", "-Hp", "health,size,free,allocated", - pool->def->source.name, + def->source.name, NULL); virCommandSetOutputBuffer(cmd, _props); if (virCommandRun(cmd, NULL) < 0) @@ -279,11 +283,11 @@ virStorageBackendZFSRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, goto cleanup; if (STREQ(prop_name, "free")) -pool->def->available = value; +def->available = value; else if (STREQ(prop_name, "size")) -pool->def->capacity = value; +def->capacity = value; else if (STREQ(prop_name, "allocated")) -pool->def->allocation = value; +def->allocation = value; } } @@ -305,6 +309,7 @@ virStorageBackendZFSCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool, virStorageVolDefPtr vol) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = NULL; int ret = -1; int volmode_needed = -1; @@ -320,7 +325,7 @@ virStorageBackendZFSCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, VIR_FREE(vol->target.path); if (virAsprintf(>target.path, "%s/%s", -pool->def->target.path, vol->name) < 0) +def->target.path, vol->name) < 0) return -1; if (VIR_STRDUP(vol->key, vol->target.path) < 0) @@ -356,8 +361,7 @@ virStorageBackendZFSCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, virCommandAddArg(cmd, "-V"); virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->target.capacity, 1024)); -virCommandAddArgFormat(cmd, "%s/%s", - pool->def->source.name, vol->name); +virCommandAddArgFormat(cmd, "%s/%s", def->source.name, vol->name); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -379,6 +383,7 @@ virStorageBackendZFSDeleteVol(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned int flags)
[libvirt] [PATCH REPOST 5/8] storage: Use virStoragePoolObjGetDef accessor for VSTORAGE backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_vstorage.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_backend_vstorage.c index fb06138538..2dc26af387 100644 --- a/src/storage/storage_backend_vstorage.c +++ b/src/storage/storage_backend_vstorage.c @@ -41,33 +41,34 @@ virStorageBackendVzPoolStart(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { int ret = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = NULL; char *grp_name = NULL; char *usr_name = NULL; char *mode = NULL; /* Check the permissions */ -if (pool->def->target.perms.mode == (mode_t) - 1) -pool->def->target.perms.mode = VIR_STORAGE_DEFAULT_POOL_PERM_MODE; -if (pool->def->target.perms.uid == (uid_t) -1) -pool->def->target.perms.uid = geteuid(); -if (pool->def->target.perms.gid == (gid_t) -1) -pool->def->target.perms.gid = getegid(); +if (def->target.perms.mode == (mode_t) - 1) +def->target.perms.mode = VIR_STORAGE_DEFAULT_POOL_PERM_MODE; +if (def->target.perms.uid == (uid_t) -1) +def->target.perms.uid = geteuid(); +if (def->target.perms.gid == (gid_t) -1) +def->target.perms.gid = getegid(); /* Convert ids to names because vstorage uses names */ -if (!(grp_name = virGetGroupName(pool->def->target.perms.gid))) +if (!(grp_name = virGetGroupName(def->target.perms.gid))) goto cleanup; -if (!(usr_name = virGetUserName(pool->def->target.perms.uid))) +if (!(usr_name = virGetUserName(def->target.perms.uid))) goto cleanup; -if (virAsprintf(, "%o", pool->def->target.perms.mode) < 0) +if (virAsprintf(, "%o", def->target.perms.mode) < 0) goto cleanup; cmd = virCommandNewArgList(VSTORAGE_MOUNT, - "-c", pool->def->source.name, - pool->def->target.path, + "-c", def->source.name, + def->target.path, "-m", mode, "-g", grp_name, "-u", usr_name, NULL); @@ -89,12 +90,13 @@ static int virStorageBackendVzIsMounted(virStoragePoolObjPtr pool) { int ret = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); FILE *mtab; struct mntent ent; char buf[1024]; char *cluster = NULL; -if (virAsprintf(, "vstorage://%s", pool->def->source.name) < 0) +if (virAsprintf(, "vstorage://%s", def->source.name) < 0) return -1; if ((mtab = fopen(_PATH_MOUNTED, "r")) == NULL) { @@ -106,7 +108,7 @@ virStorageBackendVzIsMounted(virStoragePoolObjPtr pool) while ((getmntent_r(mtab, , buf, sizeof(buf))) != NULL) { -if (STREQ(ent.mnt_dir, pool->def->target.path) && +if (STREQ(ent.mnt_dir, def->target.path) && STREQ(ent.mnt_fsname, cluster)) { ret = 1; goto cleanup; @@ -126,6 +128,7 @@ static int virStorageBackendVzPoolStop(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = NULL; int ret = -1; int rc; @@ -134,7 +137,7 @@ virStorageBackendVzPoolStop(virConnectPtr conn ATTRIBUTE_UNUSED, if ((rc = virStorageBackendVzIsMounted(pool)) != 1) return rc; -cmd = virCommandNewArgList(UMOUNT, pool->def->target.path, NULL); +cmd = virCommandNewArgList(UMOUNT, def->target.path, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 1/8] storage: Use virStoragePoolObjGetDef accessor for iSCSI backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_iscsi.c | 41 + 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 14f3e09a8f..b0c5096adb 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -83,7 +83,8 @@ static char * virStorageBackendISCSISession(virStoragePoolObjPtr pool, bool probe) { -return virISCSIGetSession(pool->def->source.devices[0].path, probe); +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +return virISCSIGetSession(def->source.devices[0].path, probe); } @@ -235,25 +236,26 @@ static int virStorageBackendISCSICheckPool(virStoragePoolObjPtr pool, bool *isActive) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *session = NULL; int ret = -1; *isActive = false; -if (pool->def->source.nhost != 1) { +if (def->source.nhost != 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Expected exactly 1 host for the storage pool")); return -1; } -if (pool->def->source.hosts[0].name == NULL) { +if (def->source.hosts[0].name == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source host")); return -1; } -if (pool->def->source.ndevice != 1 || -pool->def->source.devices[0].path == NULL) { +if (def->source.ndevice != 1 || +def->source.devices[0].path == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source device")); return -1; @@ -327,44 +329,45 @@ static int virStorageBackendISCSIStartPool(virConnectPtr conn, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *portal = NULL; char *session = NULL; int ret = -1; -if (pool->def->source.nhost != 1) { +if (def->source.nhost != 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Expected exactly 1 host for the storage pool")); return -1; } -if (pool->def->source.hosts[0].name == NULL) { +if (def->source.hosts[0].name == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source host")); return -1; } -if (pool->def->source.ndevice != 1 || -pool->def->source.devices[0].path == NULL) { +if (def->source.ndevice != 1 || +def->source.devices[0].path == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source device")); return -1; } if ((session = virStorageBackendISCSISession(pool, true)) == NULL) { -if ((portal = virStorageBackendISCSIPortal(>def->source)) == NULL) +if ((portal = virStorageBackendISCSIPortal(>source)) == NULL) goto cleanup; /* Create a static node record for the IQN target. Must be done * in order for login to the target */ -if (virISCSINodeNew(portal, pool->def->source.devices[0].path) < 0) +if (virISCSINodeNew(portal, def->source.devices[0].path) < 0) goto cleanup; -if (virStorageBackendISCSISetAuth(portal, conn, >def->source) < 0) +if (virStorageBackendISCSISetAuth(portal, conn, >source) < 0) goto cleanup; if (virISCSIConnectionLogin(portal, -pool->def->source.initiator.iqn, -pool->def->source.devices[0].path) < 0) +def->source.initiator.iqn, +def->source.devices[0].path) < 0) goto cleanup; } ret = 0; @@ -379,9 +382,10 @@ static int virStorageBackendISCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *session = NULL; -pool->def->allocation = pool->def->capacity = pool->def->available = 0; +def->allocation = def->capacity = def->available = 0; if ((session = virStorageBackendISCSISession(pool, false)) == NULL) goto cleanup; @@ -403,6 +407,7 @@ static int virStorageBackendISCSIStopPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *portal; char *session; int ret = -1; @@ -411,12 +416,12 @@ virStorageBackendISCSIStopPool(virConnectPtr conn ATTRIBUTE_UNUSED, return 0; VIR_FREE(session); -if ((portal =
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On 10/06/2017 02:56 PM, Pino Toscano wrote: > On Friday, 6 October 2017 12:32:28 CEST Michal Privoznik wrote: >> On 10/05/2017 01:07 PM, Pino Toscano wrote: >>> The majority of the syntax check is taylored for C sources, so some of >>> the checks already cause false positives for non-C sources (and thus >>> there are exclusion regexps in place). >>> >>> Instead, just exclude more non-C files from all the checks: >>> - pot files: they are templates for po files (already excluded), and >>> they are automatically generated from sources >>> - pl files: Perl sources, which have own APIs, style, etc; they are >>> helper scripts, not "real" sources >>> - spec/spec.in files: RPM packaging files >>> - js/woff/html.in files: files for web pages >>> - diff/patch files: patches >>> - stp files: SystemTap scripts >>> - syms files: linker symbols files >>> - conf files: generic configuration files >>> - data/cpuinfo files: procinfo/cpuinfo files >>> >>> Python files (.py) are left allowed, since there is at least one syntax >>> check specifically for them. >>> >>> Signed-off-by: Pino Toscano>>> --- >>> cfg.mk | 29 + >>> 1 file changed, 13 insertions(+), 16 deletions(-) >>> >>> diff --git a/cfg.mk b/cfg.mk >>> index 0f4065b98..44a19594e 100644 >>> --- a/cfg.mk >>> +++ b/cfg.mk >>> @@ -91,7 +91,7 @@ endif >>> >>> # Files that should never cause syntax check failures. >>> VC_LIST_ALWAYS_EXCLUDE_REGEX = \ >>> - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ >>> + >>> \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ >> >> .spec is not in the repo, so it's never checked. And then, we perhaps >> want to check .spec.in? For instance for space at EOF. > > .spec is generated from .spec.in, so for a builddir==srcdir build, > syntax-check will find both; hence, IMHO both ought to be either > skipped or checked, but together. Is that right? I always thought that syntax-check runs only over the files that are in the git and not generated ones: libvirt.git $ git clean -fxd; mkdir _build && cd _build && \ ../autogen.sh --prefix=${PWD} && echo "" >> libvirt.spec && \ make syntax-check ; echo $? 0 Whereas: libvirt.git $ git clean -fxd; mkdir _build && cd _build && \ ../autogen.sh --prefix=${PWD} && echo "" >> ../libvirt.spec.in && \ make syntax-check ; echo $? ../libvirt.spec.in maint.mk: empty line(s) or no newline at EOF make: *** [../maint.mk:929: sc_prohibit_empty_lines_at_EOF] Error 1 2 Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvit-jenkins-ci PATCH v2 00/16] Ansible all the things!
On Fri, Oct 06, 2017 at 02:48:36PM +0200, Andrea Bolognani wrote: > Changes from [v1]: > > * drop support for building projects; > * reduce redundancy by using mappings; > * add FreeBSD 10 support. > > [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg00035.html BTW, what's your thoughts on what we should do with this once committed ? Do you have plans to rebuild all our current CI VMs from scratch using these recipes ? It would probably nice todo this so we get them into a known good state, as well as helping us move the Fedora vms onto current versions. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH REPOST 0/6] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #2)
On 10/06/2017 01:23 PM, 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 series is the first half of the storage backend changes to use > the virStoragePoolObjGetDef accessor. > > The next/last series will be the next half, plus the change to move > virStoragePoolObj and virStorageVolDefList into virstoragepoolobj.c. > > After that adjustments to virstoragepoolobj similar to other drivers > and perhaps even generating a virStorageVolObjPtr - e.g. a hash table > of volume defs rather than a linked list of defs. > > John Ferlan (6): > storage: Use virStoragePoolObjGetDef accessor for storage_util > storage: Use virStoragePoolObjGetDef accessor for Disk backend > storage: Use virStoragePoolObjGetDef accessor for Logical backend > storage: Use virStoragePoolObjGetDef accessor for Sheepdog backend > storage: Use virStoragePoolObjGetDef accessor for FS backend > storage: Use virStoragePoolObjGetDef accessor for Gluster backend > > src/storage/storage_backend_disk.c | 98 > src/storage/storage_backend_fs.c | 90 + > src/storage/storage_backend_gluster.c | 20 +++--- > src/storage/storage_backend_logical.c | 63 ++ > src/storage/storage_backend_sheepdog.c | 23 --- > src/storage/storage_util.c | 116 > ++--- > 6 files changed, 230 insertions(+), 180 deletions(-) > ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On Friday, 6 October 2017 12:32:28 CEST Michal Privoznik wrote: > On 10/05/2017 01:07 PM, Pino Toscano wrote: > > The majority of the syntax check is taylored for C sources, so some of > > the checks already cause false positives for non-C sources (and thus > > there are exclusion regexps in place). > > > > Instead, just exclude more non-C files from all the checks: > > - pot files: they are templates for po files (already excluded), and > > they are automatically generated from sources > > - pl files: Perl sources, which have own APIs, style, etc; they are > > helper scripts, not "real" sources > > - spec/spec.in files: RPM packaging files > > - js/woff/html.in files: files for web pages > > - diff/patch files: patches > > - stp files: SystemTap scripts > > - syms files: linker symbols files > > - conf files: generic configuration files > > - data/cpuinfo files: procinfo/cpuinfo files > > > > Python files (.py) are left allowed, since there is at least one syntax > > check specifically for them. > > > > Signed-off-by: Pino Toscano> > --- > > cfg.mk | 29 + > > 1 file changed, 13 insertions(+), 16 deletions(-) > > > > diff --git a/cfg.mk b/cfg.mk > > index 0f4065b98..44a19594e 100644 > > --- a/cfg.mk > > +++ b/cfg.mk > > @@ -91,7 +91,7 @@ endif > > > > # Files that should never cause syntax check failures. > > VC_LIST_ALWAYS_EXCLUDE_REGEX = \ > > - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ > > + > > \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ > > .spec is not in the repo, so it's never checked. And then, we perhaps > want to check .spec.in? For instance for space at EOF. .spec is generated from .spec.in, so for a builddir==srcdir build, syntax-check will find both; hence, IMHO both ought to be either skipped or checked, but together. Jirka, you are the one working on the packaging side: what do you think about the changes above (at least from the .spec point of view)? Thanks, -- Pino Toscano signature.asc Description: This is a digitally signed message part. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 16/16] ansible: Install and configure Jenkins agent
The agent is downloaded and configured to start at boot. The secrets needed to prove the workers' identity to the Jenkins server are stored inside Ansible vaults. Signed-off-by: Andrea Bolognani--- ansible/ansible.cfg| 1 + ansible/group_vars/all/main.yml| 2 + ansible/host_vars/libvirt-centos-6/main.yml| 3 ++ ansible/host_vars/libvirt-centos-6/vault.yml | 10 ansible/host_vars/libvirt-centos-7/main.yml| 3 ++ ansible/host_vars/libvirt-centos-7/vault.yml | 10 ansible/host_vars/libvirt-debian-8/main.yml| 3 ++ ansible/host_vars/libvirt-debian-8/vault.yml | 10 ansible/host_vars/libvirt-debian-9/main.yml| 3 ++ ansible/host_vars/libvirt-debian-9/vault.yml | 10 ansible/host_vars/libvirt-fedora-25/main.yml | 3 ++ ansible/host_vars/libvirt-fedora-25/vault.yml | 10 ansible/host_vars/libvirt-fedora-26/main.yml | 3 ++ ansible/host_vars/libvirt-fedora-26/vault.yml | 10 ansible/host_vars/libvirt-fedora-rawhide/main.yml | 3 ++ ansible/host_vars/libvirt-fedora-rawhide/vault.yml | 10 ansible/host_vars/libvirt-freebsd-10/main.yml | 3 ++ ansible/host_vars/libvirt-freebsd-10/vault.yml | 10 ansible/host_vars/libvirt-freebsd-11/main.yml | 3 ++ ansible/host_vars/libvirt-freebsd-11/vault.yml | 10 ansible/host_vars/libvirt-ubuntu-12/main.yml | 3 ++ ansible/host_vars/libvirt-ubuntu-12/vault.yml | 8 +++ ansible/host_vars/libvirt-ubuntu-14/main.yml | 3 ++ ansible/host_vars/libvirt-ubuntu-14/vault.yml | 8 +++ ansible/host_vars/libvirt-ubuntu-16/main.yml | 3 ++ ansible/host_vars/libvirt-ubuntu-16/vault.yml | 8 +++ ansible/site.yml | 7 +++ ansible/tasks/jenkins.yml | 59 ++ ansible/templates/jenkins.service.j2 | 14 + ansible/vars/mappings.yml | 8 +++ ansible/vars/projects/jenkins.yml | 3 ++ 31 files changed, 244 insertions(+) create mode 100644 ansible/host_vars/libvirt-centos-6/vault.yml create mode 100644 ansible/host_vars/libvirt-centos-7/vault.yml create mode 100644 ansible/host_vars/libvirt-debian-8/vault.yml create mode 100644 ansible/host_vars/libvirt-debian-9/vault.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/vault.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/vault.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/vault.yml create mode 100644 ansible/host_vars/libvirt-freebsd-10/vault.yml create mode 100644 ansible/host_vars/libvirt-freebsd-11/vault.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-12/vault.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/vault.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/vault.yml create mode 100644 ansible/tasks/jenkins.yml create mode 100644 ansible/templates/jenkins.service.j2 create mode 100644 ansible/vars/projects/jenkins.yml diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index ca02677..2055540 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -6,3 +6,4 @@ log_path = ./log nocows = 1 pipelining = True squash_actions = package +vault_password_file = ~/.ansible/libvirt-jenkins-ci.vault-password diff --git a/ansible/group_vars/all/main.yml b/ansible/group_vars/all/main.yml index e8d3cb6..81b7d43 100644 --- a/ansible/group_vars/all/main.yml +++ b/ansible/group_vars/all/main.yml @@ -1,6 +1,8 @@ --- ansible_user: root +jenkins_url: https://ci.centos.org/computer/{{ inventory_hostname }}/slave-agent.jnlp + # Paths to various command. Can be overridden on a per-host basis bash: /bin/bash java: /usr/bin/java diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/ansible/host_vars/libvirt-centos-6/main.yml index e959ecc..f6b64f3 100644 --- a/ansible/host_vars/libvirt-centos-6/main.yml +++ b/ansible/host_vars/libvirt-centos-6/main.yml @@ -1,7 +1,10 @@ --- projects: - base + - jenkins - libvirt - libvirt-cim - libvirt-perl - libvirt-python + +jenkins_secret: '{{ vault_jenkins_secret }}' diff --git a/ansible/host_vars/libvirt-centos-6/vault.yml b/ansible/host_vars/libvirt-centos-6/vault.yml new file mode 100644 index 000..2522a28 --- /dev/null +++ b/ansible/host_vars/libvirt-centos-6/vault.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +33376164643732313335383930346630343432643939303864313631353063636663663634616638 +3062306563323630653033656231373634363932336331620a383065336664343663346562353862 +64616131656633653338316232303562363632643530313961316130303335626235653430326530 +3566363365323830660a363063623035333231396337393537626161363634313637323563643161 +36613030333563363630363730656238646138306236643937623266646639616130343734313566 +61356165383464323434333836333030336464326436373731313439626161653931626431343665
[libvirt] [libvirt-jenkins-ci PATCH v2 12/16] ansible: Add osinfo-db project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/vars/projects/osinfo-db.yml | 4 8 files changed, 11 insertions(+) create mode 100644 ansible/vars/projects/osinfo-db.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 39707f6..bfe7649 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - osinfo-db diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index eb79aeb..08e35d3 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 7a42e2b..88de6e5 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 7a42e2b..88de6e5 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 7a42e2b..88de6e5 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 868a0db..dd5302d 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -16,3 +16,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-tck + - osinfo-db diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 868a0db..dd5302d 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -16,3 +16,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-tck + - osinfo-db diff --git a/ansible/vars/projects/osinfo-db.yml b/ansible/vars/projects/osinfo-db.yml new file mode 100644 index 000..d9320a4 --- /dev/null +++ b/ansible/vars/projects/osinfo-db.yml @@ -0,0 +1,4 @@ +--- +packages: + - intltool + - xmllint -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 11/16] ansible: Add libvirt-tck project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 81 +++ ansible/vars/projects/libvirt-tck.yml | 21 ++ 11 files changed, 111 insertions(+) create mode 100644 ansible/vars/projects/libvirt-tck.yml diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 2525b10..a9e2160 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-tck diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 929ab1f..eb79aeb 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - libvirt-tck diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 39707f6..7a42e2b 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - libvirt-tck diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 39707f6..7a42e2b 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - libvirt-tck diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 39707f6..7a42e2b 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - libvirt-tck diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index cd3a373..868a0db 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -15,3 +15,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-tck diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index cd3a373..868a0db 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -15,3 +15,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-tck diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index ab712b2..809c9fd 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-perl - libvirt-python + - libvirt-tck diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 929ab1f..eb79aeb 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-sandbox + - libvirt-tck diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 6713d58..ccdfd9d 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -390,11 +390,77 @@ mappings: rpm: perl-CPAN-Changes CentOS6: + perl-Config-Record: +deb: libconfig-record-perl +pkg: p5-Config-Record +Fedora: perl-Config-Record + + perl-Digest: +deb: libdigest-perl +pkg: p5-Digest +rpm: perl-Digest +CentOS6: + + perl-Digest-MD5: +deb: libdigest-perl-md5-perl +pkg: p5-Digest-MD5 +rpm: perl-Digest-MD5 +CentOS6: +Ubuntu14: + perl-ExtUtils-MakeMaker: deb: perl-modules pkg: p5-ExtUtils-MakeMaker rpm: perl-ExtUtils-MakeMaker + perl-File-Slurp: +deb: libfile-slurp-perl +pkg: p5-File-Slurp +rpm: perl-File-Slurp + + perl-IO-Compress-Bzip2: +deb: libio-compress-perl +pkg: p5-IO-Compress +rpm: perl-IO-Compress-Bzip2 + + perl-IO-String: +deb: libio-string-perl +pkg: p5-IO-String +rpm: perl-IO-String + + perl-Module-Build: +deb: libmodule-build-perl +pkg: p5-Module-Build
[libvirt] [libvirt-jenkins-ci PATCH v2 09/16] ansible: Add libvirt-python project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-6/main.yml | 1 + ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 30 +++ ansible/vars/projects/libvirt-python.yml | 8 ++ 13 files changed, 49 insertions(+) create mode 100644 ansible/vars/projects/libvirt-python.yml diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/ansible/host_vars/libvirt-centos-6/main.yml index 61c8376..e959ecc 100644 --- a/ansible/host_vars/libvirt-centos-6/main.yml +++ b/ansible/host_vars/libvirt-centos-6/main.yml @@ -4,3 +4,4 @@ projects: - libvirt - libvirt-cim - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 80b95f5..e4489ac 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 1c2ecb5..2525b10 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 1c2ecb5..2525b10 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 80b95f5..e4489ac 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 80b95f5..e4489ac 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 80b95f5..e4489ac 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 68dbbb2..cd3a373 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -14,3 +14,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 68dbbb2..cd3a373 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -14,3 +14,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index 49ee186..ab712b2 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-perl + - libvirt-python diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 1c2ecb5..2525b10 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-go - libvirt-go-xml - libvirt-perl + - libvirt-python diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 736251b..30176f1 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -423,6 +423,36 @@ mappings: pkg: polkit rpm: polkit-devel + python2-devel: +deb: python-dev +pkg: python27 +rpm: python2-devel + + python2-lxml: +
[libvirt] [libvirt-jenkins-ci PATCH v2 08/16] ansible: Add libvirt-perl project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-6/main.yml | 1 + ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 33 +++ ansible/vars/projects/libvirt-perl.yml| 8 ++ 13 files changed, 52 insertions(+) create mode 100644 ansible/vars/projects/libvirt-perl.yml diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/ansible/host_vars/libvirt-centos-6/main.yml index f6fe574..61c8376 100644 --- a/ansible/host_vars/libvirt-centos-6/main.yml +++ b/ansible/host_vars/libvirt-centos-6/main.yml @@ -3,3 +3,4 @@ projects: - base - libvirt - libvirt-cim + - libvirt-perl diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index fcb44ec..80b95f5 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 83e787e..1c2ecb5 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 83e787e..1c2ecb5 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index fcb44ec..80b95f5 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index fcb44ec..80b95f5 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index fcb44ec..80b95f5 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index c8baf43..68dbbb2 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -13,3 +13,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index c8baf43..68dbbb2 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -13,3 +13,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index 7508f19..49ee186 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-perl diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 83e787e..1c2ecb5 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-perl diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index a08e8aa..736251b 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -380,6 +380,39 @@ mappings: default: perl FreeBSD: perl5 + perl-CPAN-Changes: +deb: libcpan-changes-perl +pkg: p5-CPAN-Changes +rpm: perl-CPAN-Changes +CentOS6: + +
[libvirt] [libvirt-jenkins-ci PATCH v2 05/16] ansible: Add libvirt-glib project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/projects/libvirt-glib.yml| 8 10 files changed, 17 insertions(+) create mode 100644 ansible/vars/projects/libvirt-glib.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index ec2e50f..87b39f3 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-cim + - libvirt-glib diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 7508f19..06aed9d 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-glib diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 7508f19..06aed9d 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-glib diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index ec2e50f..87b39f3 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-cim + - libvirt-glib diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index ec2e50f..87b39f3 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-cim + - libvirt-glib diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index ec2e50f..87b39f3 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-cim + - libvirt-glib diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index a8766a0..1acdd66 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -10,3 +10,4 @@ projects: - base - libosinfo - libvirt + - libvirt-glib diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index a8766a0..1acdd66 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -10,3 +10,4 @@ projects: - base - libosinfo - libvirt + - libvirt-glib diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 7508f19..06aed9d 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-glib diff --git a/ansible/vars/projects/libvirt-glib.yml b/ansible/vars/projects/libvirt-glib.yml new file mode 100644 index 000..13a5128 --- /dev/null +++ b/ansible/vars/projects/libvirt-glib.yml @@ -0,0 +1,8 @@ +--- +packages: + - glib2 + - gobject-introspection + - gtk-doc + - intltool + - libxml2 + - vala -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 14/16] ansible: Add virt-manager project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 20 ansible/vars/projects/virt-manager.yml| 7 +++ 12 files changed, 37 insertions(+) create mode 100644 ansible/vars/projects/virt-manager.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index eaaa1cd..970839d 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-sandbox - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 4199dfd..5d300e8 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-python - libvirt-tck - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 82b7cb8..4640d87 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 9a42421..265e7ca 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -13,3 +13,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 9a42421..265e7ca 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -13,3 +13,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 9a42421..265e7ca 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -13,3 +13,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 93eaca7..563a254 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -18,3 +18,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 93eaca7..563a254 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -18,3 +18,4 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index 7711c5c..f77a167 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -7,3 +7,4 @@ projects: - libvirt-python - libvirt-tck - osinfo-db-tools + - virt-manager diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index fb05515..04191bc 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-sandbox - libvirt-tck - osinfo-db-tools + - virt-manager diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 2a0f3ef..792d0aa 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -518,6 +518,21 @@ mappings: pkg: python27 rpm: python2-devel + python2-gi: +deb: python-gi +pkg: py27-gobject3 +rpm: python-gobject +CentOS6: + + python2-ipaddr: +default: python-ipaddr +FreeBSD: py27-ipaddr + + python2-libxml2: +default: python-libxml2 +pkg: py27-libxml2 +CentOS: libxml2-python + python2-lxml: default: python-lxml Fedora: python2-lxml @@ -528,6 +543,11 @@ mappings: Fedora: python2-nose FreeBSD: py27-nose + python2-requests: +default: python-requests +
[libvirt] [libvirt-jenkins-ci PATCH v2 10/16] ansible: Add libvirt-sandbox project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 20 ansible/vars/projects/libvirt-sandbox.yml | 14 ++ 8 files changed, 40 insertions(+) create mode 100644 ansible/vars/projects/libvirt-sandbox.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index e4489ac..39707f6 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 2525b10..929ab1f 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index e4489ac..39707f6 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index e4489ac..39707f6 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index e4489ac..39707f6 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 2525b10..929ab1f 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-go-xml - libvirt-perl - libvirt-python + - libvirt-sandbox diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 30176f1..6713d58 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -107,6 +107,10 @@ mappings: deb: libc6-dev rpm: glibc-devel + glibc-static: +deb: libc6-dev +rpm: glibc-static + glusterfs: deb: glusterfs-client pkg: glusterfs @@ -516,6 +520,14 @@ mappings: default: libxslt deb: xsltproc + xz: +deb: liblzma-dev +rpm: xz-devel + + xz-static: +deb: liblzma-dev +Fedora: xz-static + yajl: deb: libyajl-dev pkg: yajl @@ -525,3 +537,11 @@ mappings: default: zfs-fuse CentOS: FreeBSD: + + zlib: +deb: zlib1g-dev +rpm: zlib-devel + + zlib-static: +deb: zlib1g-dev +rpm: zlib-static diff --git a/ansible/vars/projects/libvirt-sandbox.yml b/ansible/vars/projects/libvirt-sandbox.yml new file mode 100644 index 000..46b903f --- /dev/null +++ b/ansible/vars/projects/libvirt-sandbox.yml @@ -0,0 +1,14 @@ +--- +packages: + - glib2 + - glibc-static + - gobject-introspection + - gtk-doc + - intltool + - libcap-ng + - libselinux + - libxml2 + - xz + - xz-static + - zlib + - zlib-static -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 07/16] ansible: Add libvirt-go-xml project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/projects/libvirt-go-xml.yml | 3 +++ 10 files changed, 12 insertions(+) create mode 100644 ansible/vars/projects/libvirt-go-xml.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 728b6d5..fcb44ec 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-cim - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 6fa3e95..83e787e 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 6fa3e95..83e787e 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 728b6d5..fcb44ec 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-cim - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 728b6d5..fcb44ec 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-cim - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 728b6d5..fcb44ec 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-cim - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index c2b059e..c8baf43 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -12,3 +12,4 @@ projects: - libvirt - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index c2b059e..c8baf43 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -12,3 +12,4 @@ projects: - libvirt - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 6fa3e95..83e787e 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-glib - libvirt-go + - libvirt-go-xml diff --git a/ansible/vars/projects/libvirt-go-xml.yml b/ansible/vars/projects/libvirt-go-xml.yml new file mode 100644 index 000..c06b9bb --- /dev/null +++ b/ansible/vars/projects/libvirt-go-xml.yml @@ -0,0 +1,3 @@ +--- +packages: + - go -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 06/16] ansible: Add libvirt-go project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 7 +++ ansible/vars/projects/libvirt-go.yml | 3 +++ 11 files changed, 19 insertions(+) create mode 100644 ansible/vars/projects/libvirt-go.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 87b39f3..728b6d5 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-cim - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 06aed9d..6fa3e95 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 06aed9d..6fa3e95 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 87b39f3..728b6d5 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-cim - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 87b39f3..728b6d5 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-cim - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 87b39f3..728b6d5 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -5,3 +5,4 @@ projects: - libvirt - libvirt-cim - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 1acdd66..c2b059e 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -11,3 +11,4 @@ projects: - libosinfo - libvirt - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 1acdd66..c2b059e 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -11,3 +11,4 @@ projects: - libosinfo - libvirt - libvirt-glib + - libvirt-go diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 06aed9d..6fa3e95 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -4,3 +4,4 @@ projects: - libosinfo - libvirt - libvirt-glib + - libvirt-go diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 4d4be6e..a08e8aa 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -122,6 +122,13 @@ mappings: Ubuntu12: libgnutls-dev Ubuntu14: libgnutls-dev + go: +default: golang +FreeBSD: go +CentOS6: +Ubuntu12: +Ubuntu14: + gobject-introspection: deb: libgirepository1.0-dev pkg: gobject-introspection diff --git a/ansible/vars/projects/libvirt-go.yml b/ansible/vars/projects/libvirt-go.yml new file mode 100644 index 000..c06b9bb --- /dev/null +++ b/ansible/vars/projects/libvirt-go.yml @@ -0,0 +1,3 @@ +--- +packages: + - go -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 03/16] ansible: Add libvirt project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-6/main.yml | 1 + ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-12/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/site.yml | 1 + ansible/tasks/compat.yml | 31 +++ ansible/vars/mappings.yml | 296 ++ ansible/vars/projects/libvirt.yml | 78 ++ 16 files changed, 418 insertions(+) create mode 100644 ansible/tasks/compat.yml create mode 100644 ansible/vars/projects/libvirt.yml diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/ansible/host_vars/libvirt-centos-6/main.yml index 1602406..4d53bb3 100644 --- a/ansible/host_vars/libvirt-centos-6/main.yml +++ b/ansible/host_vars/libvirt-centos-6/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libvirt diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 81e362d..a8766a0 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -9,3 +9,4 @@ sudo: /usr/local/bin/sudo projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 81e362d..a8766a0 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -9,3 +9,4 @@ sudo: /usr/local/bin/sudo projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-ubuntu-12/main.yml b/ansible/host_vars/libvirt-ubuntu-12/main.yml index 1602406..4d53bb3 100644 --- a/ansible/host_vars/libvirt-ubuntu-12/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-12/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libvirt diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index a40cb4c..7508f19 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -2,3 +2,4 @@ projects: - base - libosinfo + - libvirt diff --git a/ansible/site.yml b/ansible/site.yml index c6e6152..907a35b 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -8,6 +8,7 @@ #
[libvirt] [libvit-jenkins-ci PATCH v2 00/16] Ansible all the things!
Changes from [v1]: * drop support for building projects; * reduce redundancy by using mappings; * add FreeBSD 10 support. [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg00035.html Andrea Bolognani (16): ansible: Initial support ansible: Add libosinfo project ansible: Add libvirt project ansible: Add libvirt-cim project ansible: Add libvirt-glib project ansible: Add libvirt-go project ansible: Add libvirt-go-xml project ansible: Add libvirt-perl project ansible: Add libvirt-python project ansible: Add libvirt-sandbox project ansible: Add libvirt-tck project ansible: Add osinfo-db project ansible: Add osinfo-db-tools project ansible: Add virt-manager project ansible: Add virt-viewer project ansible: Install and configure Jenkins agent ansible/.gitignore | 3 + ansible/Makefile | 12 + ansible/README.markdown| 60 ++ ansible/ansible.cfg| 9 + ansible/bootstrap.yml | 15 + ansible/group_vars/all/main.yml| 10 + ansible/host_vars/libvirt-centos-6/main.yml| 10 + ansible/host_vars/libvirt-centos-6/vault.yml | 10 + ansible/host_vars/libvirt-centos-7/main.yml| 19 + ansible/host_vars/libvirt-centos-7/vault.yml | 10 + ansible/host_vars/libvirt-debian-8/main.yml| 17 + ansible/host_vars/libvirt-debian-8/vault.yml | 10 + ansible/host_vars/libvirt-debian-9/main.yml| 19 + ansible/host_vars/libvirt-debian-9/vault.yml | 10 + ansible/host_vars/libvirt-fedora-25/main.yml | 20 + ansible/host_vars/libvirt-fedora-25/vault.yml | 10 + ansible/host_vars/libvirt-fedora-26/main.yml | 20 + ansible/host_vars/libvirt-fedora-26/vault.yml | 10 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 20 + ansible/host_vars/libvirt-fedora-rawhide/vault.yml | 10 + ansible/host_vars/libvirt-freebsd-10/main.yml | 25 + ansible/host_vars/libvirt-freebsd-10/vault.yml | 10 + ansible/host_vars/libvirt-freebsd-11/main.yml | 25 + ansible/host_vars/libvirt-freebsd-11/vault.yml | 10 + ansible/host_vars/libvirt-ubuntu-12/main.yml | 7 + ansible/host_vars/libvirt-ubuntu-12/vault.yml | 8 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 14 + ansible/host_vars/libvirt-ubuntu-14/vault.yml | 8 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 18 + ansible/host_vars/libvirt-ubuntu-16/vault.yml | 8 + ansible/inventory | 9 + ansible/site.yml | 27 + ansible/tasks/base.yml | 108 ansible/tasks/bootstrap.yml| 22 + ansible/tasks/compat.yml | 31 + ansible/tasks/jenkins.yml | 59 ++ ansible/tasks/packages.yml | 66 ++ ansible/templates/jenkins.service.j2 | 14 + ansible/vars/mappings.yml | 684 + ansible/vars/projects/base.yml | 17 + ansible/vars/projects/jenkins.yml | 3 + ansible/vars/projects/libosinfo.yml| 15 + ansible/vars/projects/libvirt-cim.yml | 8 + ansible/vars/projects/libvirt-glib.yml | 8 + ansible/vars/projects/libvirt-go-xml.yml | 3 + ansible/vars/projects/libvirt-go.yml | 3 + ansible/vars/projects/libvirt-perl.yml | 8 + ansible/vars/projects/libvirt-python.yml | 8 + ansible/vars/projects/libvirt-sandbox.yml | 14 + ansible/vars/projects/libvirt-tck.yml | 21 + ansible/vars/projects/libvirt.yml | 78 +++ ansible/vars/projects/osinfo-db-tools.yml | 8 + ansible/vars/projects/osinfo-db.yml| 4 + ansible/vars/projects/virt-manager.yml | 7 + ansible/vars/projects/virt-viewer.yml | 10 + 55 files changed, 1672 insertions(+) create mode 100644 ansible/.gitignore create mode 100644 ansible/Makefile create mode 100644 ansible/README.markdown create mode 100644 ansible/ansible.cfg create mode 100644 ansible/bootstrap.yml create mode 100644 ansible/group_vars/all/main.yml create mode 100644 ansible/host_vars/libvirt-centos-6/main.yml create mode 100644 ansible/host_vars/libvirt-centos-6/vault.yml create mode 100644 ansible/host_vars/libvirt-centos-7/main.yml create mode 100644 ansible/host_vars/libvirt-centos-7/vault.yml create mode 100644 ansible/host_vars/libvirt-debian-8/main.yml create mode 100644 ansible/host_vars/libvirt-debian-8/vault.yml create mode 100644 ansible/host_vars/libvirt-debian-9/main.yml create mode 100644 ansible/host_vars/libvirt-debian-9/vault.yml create mode 100644
Re: [libvirt] [PATCH 2/2] qemu: format vgamem_mb on QEMU command line for cirrus video
On Fri, Oct 06, 2017 at 02:00:23PM +0200, Gerd Hoffmann wrote: > On Fri, 2017-10-06 at 13:18 +0200, Pavel Hrdina wrote: > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1447831 > > NACK. (guest visible) cirrus video memory is 4MB. It's not > configurable. vgamem_mb property exists for live migration > compatibility reasons only and should not be touched by libvirt. Thanks for confirmation, I was suspecting that :) but I thought that there is no harm of setting it by libvirt. I'll go with the other option and remove the "vram" from XML for cirrus video device. Pavel > > cheers, > Gerd > signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v1] build: isolate core libvirt libs deps from xen runtime
From: Wim ten HaveGenerating libvirt packages per make rpm, "with-libxl=1" and "with-xen=1", adds strict runtime dependencies per libxenlight for xen-libs package from core libvirt-libs package. This is not necessary and unfortunate since those dependencies set demand to "xen-libs" package even when there's no need for libvirt xen or libxl driver components. This patch is to have two separate xenconfig lib tool libraries: one for core libvirt (without XL), and a another that contains xl for libxl driver (libvirt_driver_libxl_impl.la) which when loading the driver, loads the remaining symbols (xen{Format,Parse}XL. For the user/sysadmin, this means the xen dependencies are moved into libxl driver, instead of core libvirt. Signed-off-by: Joao Martins Signed-off-by: Wim ten Have --- src/Makefile.am | 23 +-- src/libvirt_xenxlconfig.syms | 12 2 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 src/libvirt_xenxlconfig.syms diff --git a/src/Makefile.am b/src/Makefile.am index 173fba1e6..b74856ba7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1197,7 +1197,8 @@ XENCONFIG_SOURCES = \ xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h \ xenconfig/xen_xm.c xenconfig/xen_xm.h if WITH_LIBXL -XENCONFIG_SOURCES += \ +XENCONFIG_LIBXL_SOURCES = \ + $(XENCONFIG_SOURCES)\ xenconfig/xen_xl.c xenconfig/xen_xl.h endif WITH_LIBXL @@ -1258,10 +1259,17 @@ endif WITH_VMX if WITH_XENCONFIG noinst_LTLIBRARIES += libvirt_xenconfig.la libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la -libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS) libvirt_xenconfig_la_CFLAGS = \ - -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS) + -I$(srcdir)/conf $(AM_CFLAGS) libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES) + +if WITH_LIBXL +noinst_LTLIBRARIES += libvirt_xenconfig_libxl.la +libvirt_xenconfig_libxl_la_LIBADD = $(LIBXL_LIBS) +libvirt_xenconfig_libxl_la_CFLAGS = \ + -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS) +libvirt_xenconfig_libxl_la_SOURCES = $(XENCONFIG_LIBXL_SOURCES) +endif WITH_LIBXL endif WITH_XENCONFIG @@ -1417,7 +1425,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = \ $(AM_CFLAGS) libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS) libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \ - libvirt_xenconfig.la \ + libvirt_xenconfig_libxl.la \ libvirt_secret.la libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES) @@ -2045,6 +2053,7 @@ EXTRA_DIST += \ $(VBOX_DRIVER_EXTRA_DIST) \ $(VMWARE_DRIVER_SOURCES)\ $(XENCONFIG_SOURCES)\ + $(XENCONFIG_LIBXL_SOURCES) \ $(ACCESS_DRIVER_POLKIT_POLICY) check-local: check-augeas @@ -2228,12 +2237,6 @@ else ! WITH_XENCONFIG SYM_FILES += $(srcdir)/libvirt_xenconfig.syms endif ! WITH_XENCONFIG -if WITH_LIBXL -USED_SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms -else ! WITH_LIBXL -SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms -endif ! WITH_LIBXL - if WITH_SASL USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms else ! WITH_SASL diff --git a/src/libvirt_xenxlconfig.syms b/src/libvirt_xenxlconfig.syms deleted file mode 100644 index dbe43aac7..0 --- a/src/libvirt_xenxlconfig.syms +++ /dev/null @@ -1,12 +0,0 @@ -# -# These symbols are dependent upon --with-libxl via WITH_LIBXL. -# - -#xenconfig/xen_xl.h -xenFormatXL; -xenParseXL; - -# Let emacs know we want case-insensitive sorting -# Local Variables: -# sort-fold-case: t -# End: -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 15/16] ansible: Add virt-viewer project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 23 +++ ansible/vars/projects/virt-viewer.yml | 10 ++ 12 files changed, 43 insertions(+) create mode 100644 ansible/vars/projects/virt-viewer.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 970839d..fe33bcd 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -13,3 +13,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 5d300e8..42bf6c3 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-tck - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 4640d87..ff28698 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -13,3 +13,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 265e7ca..8d3b26f 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -14,3 +14,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 265e7ca..8d3b26f 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -14,3 +14,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 265e7ca..8d3b26f 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -14,3 +14,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index 563a254..69b172c 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -19,3 +19,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index 563a254..69b172c 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -19,3 +19,4 @@ projects: - osinfo-db - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index f77a167..18b013d 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -8,3 +8,4 @@ projects: - libvirt-tck - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 04191bc..7baecf7 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-tck - osinfo-db-tools - virt-manager + - virt-viewer diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 792d0aa..b775dfc 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -139,10 +139,22 @@ mappings: rpm: gobject-introspection-devel CentOS6: + gtk3: +deb: libgtk-3-dev +pkg: gtk3 +rpm: gtk3-devel +CentOS6: + gtk-doc: default: gtk-doc deb: gtk-doc-tools + gtk-vnc: +deb: libgtk-vnc-2.0-dev +pkg: gtk-vnc +rpm: gtk-vnc2-devel +CentOS6: + hal: FreeBSD: hal Ubuntu12: libhal-dev @@ -197,6 +209,11 @@ mappings: pkg: dbus rpm: dbus-devel + libgovirt: +Debian: libgovirt-dev +Fedora: libgovirt-devel +Debian8: + libnl: CentOS6:
[libvirt] [libvirt-jenkins-ci PATCH v2 13/16] ansible: Add osinfo-db-tools project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 5 + ansible/vars/projects/osinfo-db-tools.yml | 8 12 files changed, 23 insertions(+) create mode 100644 ansible/vars/projects/osinfo-db-tools.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index bfe7649..eaaa1cd 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-python - libvirt-sandbox - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index a9e2160..4199dfd 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -9,3 +9,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-tck + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 08e35d3..82b7cb8 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -11,3 +11,4 @@ projects: - libvirt-sandbox - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 88de6e5..9a42421 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-sandbox - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 88de6e5..9a42421 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-sandbox - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 88de6e5..9a42421 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -12,3 +12,4 @@ projects: - libvirt-sandbox - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index dd5302d..93eaca7 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -17,3 +17,4 @@ projects: - libvirt-python - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index dd5302d..93eaca7 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -17,3 +17,4 @@ projects: - libvirt-python - libvirt-tck - osinfo-db + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index 809c9fd..7711c5c 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -6,3 +6,4 @@ projects: - libvirt-perl - libvirt-python - libvirt-tck + - osinfo-db-tools diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index eb79aeb..fb05515 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -10,3 +10,4 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db-tools diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index ccdfd9d..2a0f3ef 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -158,6 +158,11 @@ mappings: deb: libacl1-dev rpm: libacl-devel + libarchive: +deb: libarchive-dev +pkg: libarchive +rpm: libarchive-devel + libattr: deb: libattr1-dev rpm: libattr-devel diff --git a/ansible/vars/projects/osinfo-db-tools.yml b/ansible/vars/projects/osinfo-db-tools.yml new file mode 100644 index 000..54d8006 --- /dev/null +++ b/ansible/vars/projects/osinfo-db-tools.yml @@ -0,0 +1,8 @@ +--- +packages: + - glib2 + - gnome-common + - intltool + - libarchive + - libxml2 + - libxslt -- 2.13.6
[libvirt] [libvirt-jenkins-ci PATCH v2 04/16] ansible: Add libvirt-cim project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-6/main.yml | 1 + ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/vars/mappings.yml | 16 ansible/vars/projects/libvirt-cim.yml | 8 7 files changed, 29 insertions(+) create mode 100644 ansible/vars/projects/libvirt-cim.yml diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/ansible/host_vars/libvirt-centos-6/main.yml index 4d53bb3..f6fe574 100644 --- a/ansible/host_vars/libvirt-centos-6/main.yml +++ b/ansible/host_vars/libvirt-centos-6/main.yml @@ -2,3 +2,4 @@ projects: - base - libvirt + - libvirt-cim diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 7508f19..ec2e50f 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-cim diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 7508f19..ec2e50f 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-cim diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 7508f19..ec2e50f 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-cim diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 7508f19..ec2e50f 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -3,3 +3,4 @@ projects: - base - libosinfo - libvirt + - libvirt-cim diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index 0230047..4d4be6e 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -163,6 +163,14 @@ mappings: deb: libcap-ng-dev rpm: libcap-ng-devel + libcmpiutil: +rpm: libcmpiutil-devel + + libconfig: +deb: libconfig-dev +pkg: libconfig +rpm: libconfig-devel + libcurl: deb: libcurl4-gnutls-dev pkg: curl @@ -240,6 +248,11 @@ mappings: deb: libudev-dev rpm: libudev-devel + libuuid: +deb: uuid-dev +pkg: e2fsprogs-libuuid +rpm: libuuid-devel + libxml2: deb: libxml2-dev pkg: libxml2 @@ -412,6 +425,9 @@ mappings: deb: valac CentOS6: + wget: +default: wget + wireshark: deb: wireshark-dev Fedora: wireshark-devel diff --git a/ansible/vars/projects/libvirt-cim.yml b/ansible/vars/projects/libvirt-cim.yml new file mode 100644 index 000..d5a7cd7 --- /dev/null +++ b/ansible/vars/projects/libvirt-cim.yml @@ -0,0 +1,8 @@ +--- +packages: + - libcmpiutil + - libconfig + - libuuid + - libxml2 + - libxslt + - wget -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [libvirt-jenkins-ci PATCH v2 01/16] ansible: Initial support
This commit adds just enough to bootstrap Jenkins workers and install packages required to build any project, such as gcc and make. Ubuntu 12-16 are supported, even though they're not actually used in libvirt CI, because there's a lot of overlap between this and Travis CI, which only supports Ubuntu instead. Signed-off-by: Andrea Bolognani--- ansible/.gitignore| 3 + ansible/Makefile | 12 +++ ansible/README.markdown | 60 ansible/ansible.cfg | 8 ++ ansible/bootstrap.yml | 15 +++ ansible/group_vars/all/main.yml | 8 ++ ansible/host_vars/libvirt-centos-6/main.yml | 3 + ansible/host_vars/libvirt-centos-7/main.yml | 3 + ansible/host_vars/libvirt-debian-8/main.yml | 3 + ansible/host_vars/libvirt-debian-9/main.yml | 3 + ansible/host_vars/libvirt-fedora-25/main.yml | 3 + ansible/host_vars/libvirt-fedora-26/main.yml | 3 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 3 + ansible/host_vars/libvirt-freebsd-10/main.yml | 10 ++ ansible/host_vars/libvirt-freebsd-11/main.yml | 10 ++ ansible/host_vars/libvirt-ubuntu-12/main.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 3 + ansible/inventory | 9 ++ ansible/site.yml | 19 ansible/tasks/base.yml| 108 ++ ansible/tasks/bootstrap.yml | 22 + ansible/tasks/packages.yml| 66 + ansible/vars/mappings.yml | 88 ++ ansible/vars/projects/base.yml| 17 25 files changed, 485 insertions(+) create mode 100644 ansible/.gitignore create mode 100644 ansible/Makefile create mode 100644 ansible/README.markdown create mode 100644 ansible/ansible.cfg create mode 100644 ansible/bootstrap.yml create mode 100644 ansible/group_vars/all/main.yml create mode 100644 ansible/host_vars/libvirt-centos-6/main.yml create mode 100644 ansible/host_vars/libvirt-centos-7/main.yml create mode 100644 ansible/host_vars/libvirt-debian-8/main.yml create mode 100644 ansible/host_vars/libvirt-debian-9/main.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/main.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/main.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/main.yml create mode 100644 ansible/host_vars/libvirt-freebsd-10/main.yml create mode 100644 ansible/host_vars/libvirt-freebsd-11/main.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-12/main.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/main.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/main.yml create mode 100644 ansible/inventory create mode 100644 ansible/site.yml create mode 100644 ansible/tasks/base.yml create mode 100644 ansible/tasks/bootstrap.yml create mode 100644 ansible/tasks/packages.yml create mode 100644 ansible/vars/mappings.yml create mode 100644 ansible/vars/projects/base.yml diff --git a/ansible/.gitignore b/ansible/.gitignore new file mode 100644 index 000..4a271f2 --- /dev/null +++ b/ansible/.gitignore @@ -0,0 +1,3 @@ +*.retry +*.swp +log diff --git a/ansible/Makefile b/ansible/Makefile new file mode 100644 index 000..39ebe52 --- /dev/null +++ b/ansible/Makefile @@ -0,0 +1,12 @@ +all: + +site: + @ansible-playbook site.yml + +bootstrap: + @ansible-playbook --ask-pass bootstrap.yml + +clean: + @rm -f *.retry log + +.PHONY: all site bootstrap clean diff --git a/ansible/README.markdown b/ansible/README.markdown new file mode 100644 index 000..4d464e1 --- /dev/null +++ b/ansible/README.markdown @@ -0,0 +1,60 @@ +Ansible playbooks for libvirt CI + + +These can be used to turn a freshly installed machine into a worker for +the Jenkins-based libvirt CI. + +There are two main playbooks: + +* `bootstrap.yml`, used to perform the bootstrapping phase, that is, getting + guests to the point where Ansible can manage them fully and prompting the + user for a password is no longer required; + +* `site.yml`, used for the remaining configuration steps. + +Although you can use the playbooks directly, it's much more convenient to +call either `make bootstrap` or `make site` instead. + +Each guest only needs to be bootstrapped once; that said, both playbooks are +idempotent so there's no harm in applying them over and over again. + + +Requirements + + +SSH must be running in the guest, and root login must be permitted. + + +CI use +-- + +After you have reinstalled a Jenkins worker, run `make bootstrap` followed +by `make site` and a reboot to get it ready for CI use. No
[libvirt] [libvirt-jenkins-ci PATCH v2 02/16] ansible: Add libosinfo project
Signed-off-by: Andrea Bolognani--- ansible/host_vars/libvirt-centos-7/main.yml | 1 + ansible/host_vars/libvirt-debian-8/main.yml | 1 + ansible/host_vars/libvirt-debian-9/main.yml | 1 + ansible/host_vars/libvirt-fedora-25/main.yml | 1 + ansible/host_vars/libvirt-fedora-26/main.yml | 1 + ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + ansible/host_vars/libvirt-freebsd-10/main.yml | 1 + ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + ansible/vars/mappings.yml | 57 +++ ansible/vars/projects/libosinfo.yml | 15 ++ 12 files changed, 82 insertions(+) create mode 100644 ansible/vars/projects/libosinfo.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/ansible/host_vars/libvirt-centos-7/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-centos-7/main.yml +++ b/ansible/host_vars/libvirt-centos-7/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/ansible/host_vars/libvirt-debian-8/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-debian-8/main.yml +++ b/ansible/host_vars/libvirt-debian-8/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/ansible/host_vars/libvirt-debian-9/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-debian-9/main.yml +++ b/ansible/host_vars/libvirt-debian-9/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/ansible/host_vars/libvirt-fedora-25/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-fedora-25/main.yml +++ b/ansible/host_vars/libvirt-fedora-25/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/ansible/host_vars/libvirt-fedora-26/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-fedora-26/main.yml +++ b/ansible/host_vars/libvirt-fedora-26/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/ansible/host_vars/libvirt-fedora-rawhide/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-fedora-rawhide/main.yml +++ b/ansible/host_vars/libvirt-fedora-rawhide/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/ansible/host_vars/libvirt-freebsd-10/main.yml index d405d58..81e362d 100644 --- a/ansible/host_vars/libvirt-freebsd-10/main.yml +++ b/ansible/host_vars/libvirt-freebsd-10/main.yml @@ -8,3 +8,4 @@ sudo: /usr/local/bin/sudo projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/ansible/host_vars/libvirt-freebsd-11/main.yml index d405d58..81e362d 100644 --- a/ansible/host_vars/libvirt-freebsd-11/main.yml +++ b/ansible/host_vars/libvirt-freebsd-11/main.yml @@ -8,3 +8,4 @@ sudo: /usr/local/bin/sudo projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/ansible/host_vars/libvirt-ubuntu-14/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-ubuntu-14/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-14/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/ansible/host_vars/libvirt-ubuntu-16/main.yml index 1602406..a40cb4c 100644 --- a/ansible/host_vars/libvirt-ubuntu-16/main.yml +++ b/ansible/host_vars/libvirt-ubuntu-16/main.yml @@ -1,3 +1,4 @@ --- projects: - base + - libosinfo diff --git a/ansible/vars/mappings.yml b/ansible/vars/mappings.yml index e9639eb..f76816b 100644 --- a/ansible/vars/mappings.yml +++ b/ansible/vars/mappings.yml @@ -45,6 +45,10 @@ mappings: default: ccache CentOS: + check: +default: check +rpm: check-devel + cppi: Fedora: cppi FreeBSD: cppi @@ -56,10 +60,36 @@ mappings: gettext: default: gettext + glib2: +deb: libglib2.0-dev +pkg: glib +rpm: glib2-devel + glibc: deb: libc6-dev rpm: glibc-devel + gnome-common: +default: gnome-common + + gobject-introspection: +deb: libgirepository1.0-dev +pkg: gobject-introspection +rpm: gobject-introspection-devel +CentOS6: + + gtk-doc: +default: gtk-doc +deb: gtk-doc-tools + + intltool: +default: intltool + + libsoup: +deb: libsoup2.4-dev +pkg: libsoup +rpm: libsoup-devel + libtool: default: libtool Debian: libtool-bin @@ -68,6 +98,16 @@ mappings: libtoolize: default: libtool + libxml2: +deb: libxml2-dev +pkg: libxml2 +rpm: libxml2-devel + + libxslt: +
[libvirt] [PATCH REPOST 4/6] storage: Use virStoragePoolObjGetDef accessor for Sheepdog backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_sheepdog.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c index e72dcda9c8..3d9c341a11 100644 --- a/src/storage/storage_backend_sheepdog.c +++ b/src/storage/storage_backend_sheepdog.c @@ -96,13 +96,14 @@ void virStorageBackendSheepdogAddHostArg(virCommandPtr cmd, virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); const char *address = "localhost"; int port = 7000; -if (pool->def->source.nhost > 0) { -if (pool->def->source.hosts[0].name != NULL) -address = pool->def->source.hosts[0].name; -if (pool->def->source.hosts[0].port) -port = pool->def->source.hosts[0].port; +if (def->source.nhost > 0) { +if (def->source.hosts[0].name != NULL) +address = def->source.hosts[0].name; +if (def->source.hosts[0].port) +port = def->source.hosts[0].port; } virCommandAddArg(cmd, "-a"); virCommandAddArgFormat(cmd, "%s", address); @@ -202,7 +203,8 @@ virStorageBackendSheepdogRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, if (virCommandRun(cmd, NULL) < 0) goto cleanup; -if (virStorageBackendSheepdogParseNodeInfo(pool->def, output) < 0) +if (virStorageBackendSheepdogParseNodeInfo(virStoragePoolObjGetDef(pool), + output) < 0) goto cleanup; ret = virStorageBackendSheepdogRefreshAllVol(conn, pool); @@ -236,6 +238,8 @@ virStorageBackendSheepdogCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool, virStorageVolDefPtr vol) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); + if (vol->target.encryption != NULL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("storage pool does not support encrypted " @@ -247,7 +251,7 @@ virStorageBackendSheepdogCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, VIR_FREE(vol->key); if (virAsprintf(>key, "%s/%s", -pool->def->source.name, vol->name) < 0) +def->source.name, vol->name) < 0) return -1; VIR_FREE(vol->target.path); @@ -356,8 +360,9 @@ virStorageBackendSheepdogRefreshVol(virConnectPtr conn ATTRIBUTE_UNUSED, { int ret; char *output = NULL; - +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = virCommandNewArgList(SHEEPDOGCLI, "vdi", "list", vol->name, "-r", NULL); + virStorageBackendSheepdogAddHostArg(cmd, pool); virCommandSetOutputBuffer(cmd, ); ret = virCommandRun(cmd, NULL); @@ -372,7 +377,7 @@ virStorageBackendSheepdogRefreshVol(virConnectPtr conn ATTRIBUTE_UNUSED, VIR_FREE(vol->key); if (virAsprintf(>key, "%s/%s", -pool->def->source.name, vol->name) < 0) +def->source.name, vol->name) < 0) goto cleanup; VIR_FREE(vol->target.path); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 2/6] storage: Use virStoragePoolObjGetDef accessor for Disk backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_disk.c | 98 +- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c index a0f94512e3..44c135d807 100644 --- a/src/storage/storage_backend_disk.c +++ b/src/storage/storage_backend_disk.c @@ -59,6 +59,7 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool, char **const groups, virStorageVolDefPtr vol) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *tmp, *devpath, *partname; /* Prepended path will be same for all partitions, so we can @@ -114,8 +115,7 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool, * our deletion will fail because the name we generated is wrong. * Check for our conditions and see if the generated name is the * same as StablePath returns and has the 'p' in it */ -if (pool->def->source.devices[0].part_separator == -VIR_TRISTATE_BOOL_YES && +if (def->source.devices[0].part_separator == VIR_TRISTATE_BOOL_YES && !virIsDevMapperDevice(vol->target.path) && STREQ(groups[0], vol->target.path) && (tmp = strrchr(groups[0], 'p'))) { @@ -158,7 +158,7 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool, } if (VIR_STRDUP(vol->source.extents[0].path, - pool->def->source.devices[0].path) < 0) + def->source.devices[0].path) < 0) return -1; } @@ -212,9 +212,9 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool, } if (STRNEQ(groups[2], "metadata")) -pool->def->allocation += vol->target.allocation; -if (vol->source.extents[0].end > pool->def->capacity) -pool->def->capacity = vol->source.extents[0].end; +def->allocation += vol->target.allocation; +if (vol->source.extents[0].end > def->capacity) +def->capacity = vol->source.extents[0].end; return 0; } @@ -223,7 +223,8 @@ static int virStorageBackendDiskMakeFreeExtent(virStoragePoolObjPtr pool, char **const groups) { -virStoragePoolSourceDevicePtr dev = >def->source.devices[0]; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +virStoragePoolSourceDevicePtr dev = >source.devices[0]; if (VIR_REALLOC_N(dev->freeExtents, dev->nfreeExtent + 1) < 0) @@ -253,11 +254,10 @@ virStorageBackendDiskMakeFreeExtent(virStoragePoolObjPtr pool, if (dev->freeExtents[dev->nfreeExtent].start == 0) dev->freeExtents[dev->nfreeExtent].start = SECTOR_SIZE; -pool->def->available += -(dev->freeExtents[dev->nfreeExtent].end - - dev->freeExtents[dev->nfreeExtent].start); -if (dev->freeExtents[dev->nfreeExtent].end > pool->def->capacity) -pool->def->capacity = dev->freeExtents[dev->nfreeExtent].end; +def->available += (dev->freeExtents[dev->nfreeExtent].end - + dev->freeExtents[dev->nfreeExtent].start); +if (dev->freeExtents[dev->nfreeExtent].end > def->capacity) +def->capacity = dev->freeExtents[dev->nfreeExtent].end; dev->nfreeExtent++; @@ -339,6 +339,7 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool, * */ +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *parthelper_path; virCommandPtr cmd; struct virStorageBackendDiskPoolVolData cbdata = { @@ -353,7 +354,7 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool, return -1; cmd = virCommandNewArgList(parthelper_path, - pool->def->source.devices[0].path, + def->source.devices[0].path, NULL); /* Check for the presence of the part_separator='yes'. Pass this @@ -362,16 +363,15 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool, * the generated device name for a source device which ends with * a non-numeric value (e.g. mpatha would generate mpathap#). */ -if (pool->def->source.devices[0].part_separator == -VIR_TRISTATE_BOOL_YES) +if (def->source.devices[0].part_separator == VIR_TRISTATE_BOOL_YES) virCommandAddArg(cmd, "-p"); /* If a volume is passed, virStorageBackendDiskMakeVol only updates the * pool allocation for that single volume. */ if (!vol) -pool->def->allocation = 0; -pool->def->capacity = pool->def->available = 0; +def->allocation = 0; +def->capacity = def->available = 0; ret = virCommandRunNul(cmd, 6, @@ -388,7 +388,8 @@ virStorageBackendDiskMakePoolGeometry(size_t ntok
[libvirt] [PATCH REPOST 0/6] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #2)
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 series is the first half of the storage backend changes to use the virStoragePoolObjGetDef accessor. The next/last series will be the next half, plus the change to move virStoragePoolObj and virStorageVolDefList into virstoragepoolobj.c. After that adjustments to virstoragepoolobj similar to other drivers and perhaps even generating a virStorageVolObjPtr - e.g. a hash table of volume defs rather than a linked list of defs. John Ferlan (6): storage: Use virStoragePoolObjGetDef accessor for storage_util storage: Use virStoragePoolObjGetDef accessor for Disk backend storage: Use virStoragePoolObjGetDef accessor for Logical backend storage: Use virStoragePoolObjGetDef accessor for Sheepdog backend storage: Use virStoragePoolObjGetDef accessor for FS backend storage: Use virStoragePoolObjGetDef accessor for Gluster backend src/storage/storage_backend_disk.c | 98 src/storage/storage_backend_fs.c | 90 + src/storage/storage_backend_gluster.c | 20 +++--- src/storage/storage_backend_logical.c | 63 ++ src/storage/storage_backend_sheepdog.c | 23 --- src/storage/storage_util.c | 116 ++--- 6 files changed, 230 insertions(+), 180 deletions(-) -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/2] qemu: format vgamem_mb on QEMU command line for cirrus video
On Fri, 2017-10-06 at 13:18 +0200, Pavel Hrdina wrote: > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1447831 NACK. (guest visible) cirrus video memory is 4MB. It's not configurable. vgamem_mb property exists for live migration compatibility reasons only and should not be touched by libvirt. cheers, Gerd -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 0/2] format vgamem_mb on QEMU command line for cirrus video
Pavel Hrdina (2): qemu: caps: add QEMU_CAPS_CIRRUS_VGAMEM capability qemu: format vgamem_mb on QEMU command line for cirrus video src/qemu/qemu_capabilities.c | 8 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c| 3 + .../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 58 ++ .../qemucapabilitiesdata/caps_1.3.1.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.4.2.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 44 ++- .../caps_2.10.0.x86_64.replies | 91 -- tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 67 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 69 +++- tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 + .../caps_2.6.0-gicv2.aarch64.replies | 44 ++- .../caps_2.6.0-gicv3.aarch64.replies | 44 ++- .../caps_2.6.0.ppc64le.replies | 44 ++- .../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 69 +++- tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 40 ++ .../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 74 +- tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 44 ++- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 74 +- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 + .../caps_2.9.0.ppc64le.replies | 44 ++- .../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 44 ++- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 91 -- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + .../qemuxml2argv-video-cirrus-vgamem.args | 22 ++ .../qemuxml2argv-video-cirrus-vgamem.xml | 22 ++ tests/qemuxml2argvtest.c | 4 + 41 files changed, 999 insertions(+), 387 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 6/6] storage: Use virStoragePoolObjGetDef accessor for Gluster backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_gluster.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index 05e7bff638..eac771b42f 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -74,8 +74,9 @@ static virStorageBackendGlusterStatePtr virStorageBackendGlusterOpen(virStoragePoolObjPtr pool) { virStorageBackendGlusterStatePtr ret = NULL; -const char *name = pool->def->source.name; -const char *dir = pool->def->source.dir; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +const char *name = def->source.name; +const char *dir = def->source.dir; bool trailing_slash = true; /* Volume name must not contain '/'; optional path allows use of a @@ -112,11 +113,11 @@ virStorageBackendGlusterOpen(virStoragePoolObjPtr pool) goto error; if (VIR_STRDUP(ret->uri->scheme, "gluster") < 0) goto error; -if (VIR_STRDUP(ret->uri->server, pool->def->source.hosts[0].name) < 0) +if (VIR_STRDUP(ret->uri->server, def->source.hosts[0].name) < 0) goto error; if (virAsprintf(>uri->path, "/%s%s", ret->volname, ret->dir) < 0) goto error; -ret->uri->port = pool->def->source.hosts[0].port; +ret->uri->port = def->source.hosts[0].port; /* Actually connect to glfs */ if (!(ret->vol = glfs_new(ret->volname))) { @@ -343,6 +344,7 @@ virStorageBackendGlusterRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { int ret = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStorageBackendGlusterStatePtr state = NULL; struct { struct dirent ent; @@ -401,11 +403,11 @@ virStorageBackendGlusterRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED, goto cleanup; } -pool->def->capacity = ((unsigned long long)sb.f_frsize * - (unsigned long long)sb.f_blocks); -pool->def->available = ((unsigned long long)sb.f_bfree * -(unsigned long long)sb.f_frsize); -pool->def->allocation = pool->def->capacity - pool->def->available; +def->capacity = ((unsigned long long)sb.f_frsize * + (unsigned long long)sb.f_blocks); +def->available = ((unsigned long long)sb.f_bfree * + (unsigned long long)sb.f_frsize); +def->allocation = def->capacity - def->available; ret = 0; cleanup: -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 3/6] storage: Use virStoragePoolObjGetDef accessor for Logical backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_logical.c | 63 --- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 7bfe211c2d..0ad357729b 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -53,10 +53,11 @@ virStorageBackendLogicalSetActive(virStoragePoolObjPtr pool, int on) { int ret; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virCommandPtr cmd = virCommandNewArgList(VGCHANGE, on ? "-aly" : "-aln", - pool->def->source.name, + def->source.name, NULL); ret = virCommandRun(cmd, NULL); @@ -266,6 +267,7 @@ virStorageBackendLogicalMakeVol(char **const groups, { struct virStorageBackendLogicalPoolVolData *data = opaque; virStoragePoolObjPtr pool = data->pool; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStorageVolDefPtr vol = NULL; bool is_new_vol = false; int ret = -1; @@ -309,7 +311,7 @@ virStorageBackendLogicalMakeVol(char **const groups, if (vol->target.path == NULL) { if (virAsprintf(>target.path, "%s/%s", -pool->def->target.path, vol->name) < 0) +def->target.path, vol->name) < 0) goto cleanup; } @@ -334,7 +336,7 @@ virStorageBackendLogicalMakeVol(char **const groups, goto cleanup; if (virAsprintf(>target.backingStore->path, "%s/%s", -pool->def->target.path, groups[1]) < 0) +def->target.path, groups[1]) < 0) goto cleanup; vol->target.backingStore->format = VIR_STORAGE_POOL_LOGICAL_LVM2; @@ -433,6 +435,7 @@ virStorageBackendLogicalFindLVs(virStoragePoolObjPtr pool, }; int ret = -1; virCommandPtr cmd; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); struct virStorageBackendLogicalPoolVolData cbdata = { .pool = pool, .vol = vol, @@ -446,7 +449,7 @@ virStorageBackendLogicalFindLVs(virStoragePoolObjPtr pool, "--nosuffix", "--options", "lv_name,origin,uuid,devices,segtype,stripes,seg_size,vg_extent_size,size,lv_attr", - pool->def->source.name, + def->source.name, NULL); if (virCommandRunRegex(cmd, 1, @@ -469,11 +472,13 @@ virStorageBackendLogicalRefreshPoolFunc(char **const groups, void *data) { virStoragePoolObjPtr pool = data; -if (virStrToLong_ull(groups[0], NULL, 10, >def->capacity) < 0) +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); + +if (virStrToLong_ull(groups[0], NULL, 10, >capacity) < 0) return -1; -if (virStrToLong_ull(groups[1], NULL, 10, >def->available) < 0) +if (virStrToLong_ull(groups[1], NULL, 10, >available) < 0) return -1; -pool->def->allocation = pool->def->capacity - pool->def->available; +def->allocation = def->capacity - def->available; return 0; } @@ -631,6 +636,7 @@ virStorageBackendLogicalFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, static bool virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStoragePoolSourceList sourceList; virStoragePoolSource *thisSource = NULL; size_t i, j; @@ -646,14 +652,14 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool) /* Search the pvs output for this pool's source.name */ for (i = 0; i < sourceList.nsources; i++) { thisSource = [i]; -if (STREQ(thisSource->name, pool->def->source.name)) +if (STREQ(thisSource->name, def->source.name)) break; } if (i == sourceList.nsources) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("cannot find logical volume group name '%s'"), - pool->def->source.name); + def->source.name); goto cleanup; } @@ -661,7 +667,7 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool) * they match as well; otherwise, matching can only occur on the * pool's name. */ -if (!pool->def->source.ndevice) { + if (!def->source.ndevice) { ret = true; goto cleanup; } @@ -669,9 +675,9 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool) /* Let's make sure the pool's device(s) match what the pvs output has * for volume
[libvirt] [PATCH REPOST 5/6] storage: Use virStoragePoolObjGetDef accessor for FS backend
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_backend_fs.c | 90 ++-- 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 847dbc9e02..f54759983c 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -222,25 +222,27 @@ virStorageBackendFileSystemNetFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSE static int virStorageBackendFileSystemIsValid(virStoragePoolObjPtr pool) { -if (pool->def->type == VIR_STORAGE_POOL_NETFS) { -if (pool->def->source.nhost != 1) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); + +if (def->type == VIR_STORAGE_POOL_NETFS) { +if (def->source.nhost != 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("expected exactly 1 host for the storage pool")); return -1; } -if (pool->def->source.hosts[0].name == NULL) { +if (def->source.hosts[0].name == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source host")); return -1; } -if (pool->def->source.dir == NULL) { +if (def->source.dir == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source path")); return -1; } } else { -if (pool->def->source.ndevice != 1) { -if (pool->def->source.ndevice == 0) +if (def->source.ndevice != 1) { +if (def->source.ndevice == 0) virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing source device")); else @@ -264,22 +266,23 @@ virStorageBackendFileSystemIsValid(virStoragePoolObjPtr pool) static char * virStorageBackendFileSystemGetPoolSource(virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *src = NULL; -if (pool->def->type == VIR_STORAGE_POOL_NETFS) { -if (pool->def->source.format == VIR_STORAGE_POOL_NETFS_CIFS) { +if (def->type == VIR_STORAGE_POOL_NETFS) { +if (def->source.format == VIR_STORAGE_POOL_NETFS_CIFS) { if (virAsprintf(, "//%s/%s", -pool->def->source.hosts[0].name, -pool->def->source.dir) < 0) +def->source.hosts[0].name, +def->source.dir) < 0) return NULL; } else { if (virAsprintf(, "%s:%s", -pool->def->source.hosts[0].name, -pool->def->source.dir) < 0) +def->source.hosts[0].name, +def->source.dir) < 0) return NULL; } } else { -if (VIR_STRDUP(src, pool->def->source.devices[0].path) < 0) +if (VIR_STRDUP(src, def->source.devices[0].path) < 0) return NULL; } return src; @@ -297,6 +300,7 @@ static int virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool) { int ret = -1; +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *src = NULL; FILE *mtab; struct mntent ent; @@ -317,8 +321,7 @@ virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool) /* compare both mount destinations and sources to be sure the mounted * FS pool is really the one we're looking for */ -if ((rc1 = virFileComparePaths(ent.mnt_dir, - pool->def->target.path)) < 0 || +if ((rc1 = virFileComparePaths(ent.mnt_dir, def->target.path)) < 0 || (rc2 = virFileComparePaths(ent.mnt_fsname, src)) < 0) goto cleanup; @@ -349,16 +352,17 @@ virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool) static int virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); char *src = NULL; /* 'mount -t auto' doesn't seem to auto determine nfs (or cifs), * while plain 'mount' does. We have to craft separate argvs to * accommodate this */ -bool netauto = (pool->def->type == VIR_STORAGE_POOL_NETFS && -pool->def->source.format == VIR_STORAGE_POOL_NETFS_AUTO); -bool glusterfs = (pool->def->type == VIR_STORAGE_POOL_NETFS && - pool->def->source.format == VIR_STORAGE_POOL_NETFS_GLUSTERFS); -bool cifsfs = (pool->def->type == VIR_STORAGE_POOL_NETFS && - pool->def->source.format == VIR_STORAGE_POOL_NETFS_CIFS); +bool netauto = (def->type == VIR_STORAGE_POOL_NETFS && +def->source.format == VIR_STORAGE_POOL_NETFS_AUTO); +bool glusterfs = (def->type
[libvirt] [PATCH 2/2] qemu: format vgamem_mb on QEMU command line for cirrus video
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1447831 Signed-off-by: Pavel Hrdina--- src/qemu/qemu_command.c| 3 +++ .../qemuxml2argv-video-cirrus-vgamem.args | 22 ++ .../qemuxml2argv-video-cirrus-vgamem.xml | 22 ++ tests/qemuxml2argvtest.c | 4 4 files changed, 51 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9c8bde49a8..96381e8751 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4610,6 +4610,9 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, virQEMUCapsGet(qemuCaps, QEMU_CAPS_VMWARE_SVGA_VGAMEM { virBufferAsprintf(, ",vgamem_mb=%u", video->vram / 1024); +} else if (video->type == VIR_DOMAIN_VIDEO_TYPE_CIRRUS) { +if (video->vram && virQEMUCapsGet(qemuCaps, QEMU_CAPS_CIRRUS_VGAMEM)) +virBufferAsprintf(, ",vgamem_mb=%u", video->vram / 1024); } if (qemuBuildDeviceAddressStr(, def, >info, qemuCaps) < 0) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args b/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args new file mode 100644 index 00..883165b7c1 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i686 \ +-name QEMUGuest1 \ +-S \ +-M pc \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-nographic \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline \ +-no-acpi \ +-boot c \ +-usb \ +-device cirrus-vga,id=video0,vgamem_mb=16,bus=pci.0,addr=0x2 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml b/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml new file mode 100644 index 00..9f6f97d3eb --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + +hvm + + + + destroy + restart + destroy + +/usr/bin/qemu-system-i686 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a505864b87..19f662ece9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1861,6 +1861,10 @@ mymain(void) QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); +DO_TEST("video-cirrus-vgamem", +QEMU_CAPS_DEVICE_CIRRUS_VGA, +QEMU_CAPS_CIRRUS_VGAMEM, +QEMU_CAPS_DEVICE_VIDEO_PRIMARY); DO_TEST("video-vga-nodevice", QEMU_CAPS_DEVICE_VGA); DO_TEST("video-vga-device", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH REPOST 1/6] storage: Use virStoragePoolObjGetDef accessor for storage_util
In preparation for privatizing the object, use the accessor. Signed-off-by: John Ferlan--- src/storage/storage_util.c | 116 - 1 file changed, 63 insertions(+), 53 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index b23b6dd1d1..a10e4590f3 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -396,6 +396,7 @@ storageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED, virStorageVolDefPtr inputvol, unsigned int flags) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); int ret = -1; int fd = -1; int operation_flags; @@ -431,7 +432,7 @@ storageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED, } operation_flags = VIR_FILE_OPEN_FORCE_MODE | VIR_FILE_OPEN_FORCE_OWNER; -if (pool->def->type == VIR_STORAGE_POOL_NETFS) +if (def->type == VIR_STORAGE_POOL_NETFS) operation_flags |= VIR_FILE_OPEN_FORK; if (vol->target.perms->mode != (mode_t) -1) @@ -597,6 +598,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool, virStorageVolDefPtr vol, virCommandPtr cmd) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); struct stat st; gid_t gid; uid_t uid; @@ -606,7 +608,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool, bool filecreated = false; int ret = -1; -if ((pool->def->type == VIR_STORAGE_POOL_NETFS) +if ((def->type == VIR_STORAGE_POOL_NETFS) && (((geteuid() == 0) && (vol->target.perms->uid != (uid_t) -1) && (vol->target.perms->uid != 0)) @@ -1029,6 +1031,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolObjPtr pool, virStorageVolDefPtr inputvol, struct _virStorageBackendQemuImgInfo *info) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); int accessRetCode = -1; char *absolutePath = NULL; @@ -1071,7 +1074,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolObjPtr pool, * validation. */ if ('/' != *(info->backingPath) && -virAsprintf(, "%s/%s", pool->def->target.path, +virAsprintf(, "%s/%s", def->target.path, info->backingPath) < 0) return -1; accessRetCode = access(absolutePath ? absolutePath : @@ -1921,7 +1924,7 @@ virStorageBackendPoolPathIsStable(const char *path) /* * Given a volume path directly in /dev/XXX, iterate over the - * entries in the directory pool->def->target.path and find the + * entries in the directory def->target.path and find the * first symlink pointing to the volume path. * * If, the target.path is /dev/, then return the original volume @@ -1940,6 +1943,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool, const char *devpath, bool loop) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); DIR *dh; struct dirent *dent; char *stablepath; @@ -1948,8 +1952,8 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool, int direrr; /* Logical pools are under /dev but already have stable paths */ -if (pool->def->type == VIR_STORAGE_POOL_LOGICAL || -!virStorageBackendPoolPathIsStable(pool->def->target.path)) +if (def->type == VIR_STORAGE_POOL_LOGICAL || +!virStorageBackendPoolPathIsStable(def->target.path)) goto ret_strdup; /* We loop here because /dev/disk/by-{id,path} may not have existed @@ -1957,7 +1961,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool, * get created. */ reopen: -if (virDirOpenQuiet(, pool->def->target.path) < 0) { +if (virDirOpenQuiet(, def->target.path) < 0) { opentries++; if (loop && errno == ENOENT && opentries < 50) { usleep(100 * 1000); @@ -1965,7 +1969,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool, } virReportSystemError(errno, _("cannot read dir '%s'"), - pool->def->target.path); + def->target.path); return NULL; } @@ -1981,8 +1985,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool, retry: while ((direrr = virDirRead(dh, , NULL)) > 0) { if (virAsprintf(, "%s/%s", -pool->def->target.path, -dent->d_name) < 0) { +def->target.path, dent->d_name) < 0) { VIR_DIR_CLOSE(dh); return NULL; } @@ -2020,6 +2023,7 @@ createFileDir(virConnectPtr conn ATTRIBUTE_UNUSED, virStorageVolDefPtr inputvol, unsigned int flags) { +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
Re: [libvirt] [PATCH] build: exclude more files from all the syntax checks
On 10/05/2017 01:07 PM, Pino Toscano wrote: > The majority of the syntax check is taylored for C sources, so some of > the checks already cause false positives for non-C sources (and thus > there are exclusion regexps in place). > > Instead, just exclude more non-C files from all the checks: > - pot files: they are templates for po files (already excluded), and > they are automatically generated from sources > - pl files: Perl sources, which have own APIs, style, etc; they are > helper scripts, not "real" sources > - spec/spec.in files: RPM packaging files > - js/woff/html.in files: files for web pages > - diff/patch files: patches > - stp files: SystemTap scripts > - syms files: linker symbols files > - conf files: generic configuration files > - data/cpuinfo files: procinfo/cpuinfo files > > Python files (.py) are left allowed, since there is at least one syntax > check specifically for them. > > Signed-off-by: Pino Toscano> --- > cfg.mk | 29 + > 1 file changed, 13 insertions(+), 16 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index 0f4065b98..44a19594e 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -91,7 +91,7 @@ endif > > # Files that should never cause syntax check failures. > VC_LIST_ALWAYS_EXCLUDE_REGEX = \ > - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ > + > \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$ .spec is not in the repo, so it's never checked. And then, we perhaps want to check .spec.in? For instance for space at EOF. ACK if you leave those two out from the list. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 1/2] qemu: caps: add QEMU_CAPS_CIRRUS_VGAMEM capability
Signed-off-by: Pavel Hrdina--- src/qemu/qemu_capabilities.c | 8 ++ src/qemu/qemu_capabilities.h | 1 + .../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 58 ++ .../qemucapabilitiesdata/caps_1.3.1.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.4.2.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 62 +++ tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 44 ++- .../caps_2.10.0.x86_64.replies | 91 -- tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 67 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 69 +++- tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 + .../caps_2.6.0-gicv2.aarch64.replies | 44 ++- .../caps_2.6.0-gicv3.aarch64.replies | 44 ++- .../caps_2.6.0.ppc64le.replies | 44 ++- .../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 69 +++- tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 40 ++ .../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 74 +- tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 44 ++- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 74 +- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 + .../caps_2.9.0.ppc64le.replies | 44 ++- .../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 44 ++- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 91 -- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 37 files changed, 948 insertions(+), 387 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f9028157f1..93e7d6d510 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -443,6 +443,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 270 */ "vxhs", "virtio-blk.num-queues", + "cirrus-vga.vgamem_mb", ); @@ -1764,6 +1765,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsKVMPit[] = { { "lost_tick_policy", QEMU_CAPS_KVM_PIT_TICK_POLICY }, }; +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsCirrus[] = { +{ "vgamem_mb", QEMU_CAPS_CIRRUS_VGAMEM }, +}; + static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVGA[] = { { "vgamem_mb", QEMU_CAPS_VGA_VGAMEM }, }; @@ -1877,6 +1882,9 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { { "kvm-pit", virQEMUCapsObjectPropsKVMPit, ARRAY_CARDINALITY(virQEMUCapsObjectPropsKVMPit), -1 }, +{ "cirrus-vga", virQEMUCapsObjectPropsCirrus, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsCirrus), + -1 }, { "VGA", virQEMUCapsObjectPropsVGA, ARRAY_CARDINALITY(virQEMUCapsObjectPropsVGA), -1 }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2d16e5b0ef..59f2bd4d37 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -429,6 +429,7 @@ typedef enum { /* 270 */ QEMU_CAPS_VXHS, /* -drive file.driver=vxhs via query-qmp-schema */ QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, /* virtio-blk-*.num-queues */ +QEMU_CAPS_CIRRUS_VGAMEM, /* -device cirrus-vga.vgamem_mb */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies index 62c31774c0..44fa84aa32 100644 --- a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies @@ -1495,13 +1495,39 @@ { "name": "addr", "type": "pci-devfn" +} + ], + "id": "libvirt-30" +} + +{ + "return": [ +{ + "name": "command_serr_enable", + "type": "on/off" +}, +{ + "name": "multifunction", + "type": "on/off" +}, +{ + "name": "rombar", + "type": "uint32" +}, +{ + "name": "romfile", +
Re: [libvirt] [PATCH REPOST 5/6] test: Create local virStoragePoolObjPtr VolLookup APIs
On 10/06/2017 05:34 AM, Michal Privoznik wrote: > On 10/05/2017 10:23 PM, John Ferlan wrote: >> Rather than accessing privconn->pools.objs[i] in the for loop, >> let's use an @obj variable to make it easier to read the code. >> >> Signed-off-by: John Ferlan>> --- >> src/test/test_driver.c | 30 -- >> 1 file changed, 16 insertions(+), 14 deletions(-) >> >> diff --git a/src/test/test_driver.c b/src/test/test_driver.c >> index a1a74b8bd1..e84acf3228 100644 >> --- a/src/test/test_driver.c >> +++ b/src/test/test_driver.c >> @@ -4905,27 +4905,28 @@ testStorageVolLookupByKey(virConnectPtr conn, >>const char *key) >> { >> testDriverPtr privconn = conn->privateData; >> +virStoragePoolObjPtr obj; > > How about s/obj/poolObj/ or something so that one know just from looking > whether obj refers to pool or volume. But I don't care that much. > > Michal > I think I've now gone with just obj for everything for so long that it's been more common. Also, there's no such thing as a virStorageVolObjPtr yet, so I think I'd rather just stick with obj unless the all the storage pool tests change to use poolObj. I can do that, but other similar variable name change only patches have been widely disliked throughout this effort so I've tried hard not to add them in these more recent patches. In my original local branches - all there was a patch for each of the storage backends which changed virStoragePoolObjPtr pool to be obj, but I doubt those will ever see the list ;-) I'm going to keep it as obj - I can do a follow up to make the naming consistent throughout, but I kind of doubt it'll get much support. Tks for the quick look - John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH REPOST 5/6] test: Create local virStoragePoolObjPtr VolLookup APIs
On 10/05/2017 10:23 PM, John Ferlan wrote: > Rather than accessing privconn->pools.objs[i] in the for loop, > let's use an @obj variable to make it easier to read the code. > > Signed-off-by: John Ferlan> --- > src/test/test_driver.c | 30 -- > 1 file changed, 16 insertions(+), 14 deletions(-) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index a1a74b8bd1..e84acf3228 100644 > --- a/src/test/test_driver.c > +++ b/src/test/test_driver.c > @@ -4905,27 +4905,28 @@ testStorageVolLookupByKey(virConnectPtr conn, >const char *key) > { > testDriverPtr privconn = conn->privateData; > +virStoragePoolObjPtr obj; How about s/obj/poolObj/ or something so that one know just from looking whether obj refers to pool or volume. But I don't care that much. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH REPOST 0/6] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #1)
On 10/05/2017 10:23 PM, John Ferlan wrote: > Since the previous series (19 patches): > > https://www.redhat.com/archives/libvir-list/2017-September/msg00594.html > > didn't garner any attention, let me try with smaller patch piles with the > hope that forward progress will be made. > > The only "new" one in this series from the other is patch2 - something > that Coverity let me know about in an error scenario. > > Essentially the bulk of these patches remove direct obj->def referencing > in favor of a virStoragePoolObjGetDef call. > > John Ferlan (6): > conf: Fix prototype/definition for virStoragePoolObj get functions > tests: Fix possible NULL deref > storage: Use virStoragePoolObjGetDef accessor for driver > test: Rename @vol to @volDef in testOpenVolumesForPool > test: Create local virStoragePoolObjPtr VolLookup APIs > test: Use virStoragePoolObjGetDef accessor > > src/conf/virstorageobj.c | 4 +- > src/conf/virstorageobj.h | 4 +- > src/storage/storage_driver.c | 411 > +++-- > src/test/test_driver.c | 203 +++- > tests/storagevolxml2argvtest.c | 3 +- > 5 files changed, 352 insertions(+), 273 deletions(-) > ACK series. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 2/3] hyperv: Escape WQL queries
The code was vulnerable to SQL injection. Likely not a security issue due to WMI SQL and other constraints but still lame. For example: virsh # dominfo \" error: failed to get domain '"' error: internal error: SOAP fault during enumeration: code 's:Sender', subcode 'n:CannotProcessFilter', reason 'The data source could not process the filter. The filter might be missing or it might be invalid. Change the filter and try the request again. ', detail 'The WS-Management service cannot process the request. The WQL query is invalid. ' This commit fixes the Hyper-V driver by escaping all WMI SQL string parameters. The same command with the fix: virsh # dominfo \" error: failed to get domain '"' error: Domain not found: No domain with name " Signed-off-by: Ladi Prosek--- src/hyperv/hyperv_driver.c | 96 +++--- src/hyperv/hyperv_wmi.c| 2 +- src/util/virbuffer.c | 18 + src/util/virbuffer.h | 3 ++ 4 files changed, 70 insertions(+), 49 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 52274239c..998780b80 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -302,12 +302,12 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) } /* Get Win32_Processor list */ -virBufferAsprintf(, - "associators of " - "{Win32_ComputerSystem.Name=\"%s\"} " - "where AssocClass = Win32_ComputerSystemProcessor " - "ResultClass = Win32_Processor", - computerSystem->data.common->Name); +virBufferEscapeSQL(, + "associators of " + "{Win32_ComputerSystem.Name=\"%s\"} " + "where AssocClass = Win32_ComputerSystemProcessor " + "ResultClass = Win32_Processor", + computerSystem->data.common->Name); if (hypervGetWin32ProcessorList(priv, , ) < 0) goto cleanup; @@ -494,7 +494,7 @@ hypervDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) virBufferAddLit(, MSVM_COMPUTERSYSTEM_WQL_SELECT); virBufferAddLit(, "where "); virBufferAddLit(, MSVM_COMPUTERSYSTEM_WQL_VIRTUAL); -virBufferAsprintf(, "and Name = \"%s\"", uuid_string); +virBufferEscapeSQL(, "and Name = \"%s\"", uuid_string); if (hypervGetMsvmComputerSystemList(priv, , ) < 0) goto cleanup; @@ -526,7 +526,7 @@ hypervDomainLookupByName(virConnectPtr conn, const char *name) virBufferAddLit(, MSVM_COMPUTERSYSTEM_WQL_SELECT); virBufferAddLit(, "where "); virBufferAddLit(, MSVM_COMPUTERSYSTEM_WQL_VIRTUAL); -virBufferAsprintf(, "and ElementName = \"%s\"", name); +virBufferEscapeSQL(, "and ElementName = \"%s\"", name); if (hypervGetMsvmComputerSystemList(priv, , ) < 0) goto cleanup; @@ -674,13 +674,13 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) goto cleanup; /* Get Msvm_VirtualSystemSettingData */ -virBufferAsprintf(, - "associators of " - "{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\"," - "Name=\"%s\"} " - "where AssocClass = Msvm_SettingsDefineState " - "ResultClass = Msvm_VirtualSystemSettingData", - uuid_string); +virBufferEscapeSQL(, + "associators of " + "{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\"," + "Name=\"%s\"} " + "where AssocClass = Msvm_SettingsDefineState " + "ResultClass = Msvm_VirtualSystemSettingData", + uuid_string); if (hypervGetMsvmVirtualSystemSettingDataList(priv, , ) < 0) { @@ -696,12 +696,12 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) } /* Get Msvm_ProcessorSettingData */ -virBufferAsprintf(, - "associators of " - "{Msvm_VirtualSystemSettingData.InstanceID=\"%s\"} " - "where AssocClass = Msvm_VirtualSystemSettingDataComponent " - "ResultClass = Msvm_ProcessorSettingData", - virtualSystemSettingData->data.common->InstanceID); +virBufferEscapeSQL(, + "associators of " + "{Msvm_VirtualSystemSettingData.InstanceID=\"%s\"} " + "where AssocClass = Msvm_VirtualSystemSettingDataComponent " + "ResultClass = Msvm_ProcessorSettingData", + virtualSystemSettingData->data.common->InstanceID); if (hypervGetMsvmProcessorSettingDataList(priv, , ) < 0) { @@ -717,12 +717,12
[libvirt] [PATCH v2 3/3] hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon
Hyper-V uses its own specific memory management so no mapping is going to be perfect. However, it is more correct to map Limit to max_memory (it really is the upper limit of what the VM may potentially use) and keep cur_balloon equal to total_memory. The typical value returned from Hyper-V in Limit is 1 TiB, which is not really going to work if interpreted as "startup memory" to be ballooned away later. Signed-off-by: Ladi Prosek--- src/hyperv/hyperv_driver.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 998780b80..4565af3ed 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -920,8 +920,10 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) def->description = virBufferContentAndReset(); } -virDomainDefSetMemoryTotal(def, memorySettingData->data.common->Limit * 1024); /* megabyte to kilobyte */ -def->mem.cur_balloon = memorySettingData->data.common->VirtualQuantity * 1024; /* megabyte to kilobyte */ +/* mebibytes to kibibytes */ +def->mem.max_memory = memorySettingData->data.common->Limit * 1024; +def->mem.cur_balloon = memorySettingData->data.common->VirtualQuantity * 1024; +virDomainDefSetMemoryTotal(def, memorySettingData->data.common->VirtualQuantity * 1024); if (virDomainDefSetVcpusMax(def, processorSettingData->data.common->VirtualQuantity, -- 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 1/3] hyperv: Fix hypervInitConnection error reporting
"%s is not a Hyper-V server" is not a correct generalization of all possible error conditions of hypervEnumAndPull. For example: $ virsh --connect hyperv://localhost/?transport=http Enter username for localhost [administrator]: Enter administrator's password for localhost: error: failed to connect to the hypervisor error: internal error: localhost is not a Hyper-V server This commit removes the general virReportError from hypervInitConnection and also the "Invalid query" virReportError from hypervSerializeEprParam, which does not correctly describe the error either (virBufferCheckError has already set a meaningful error message at that point). The same scenario with the fix: $ virsh --connect hyperv://localhost/?transport=http Enter username for localhost [administrator]: Enter administrator's password for localhost: error: failed to connect to the hypervisor error: internal error: Transport error during enumeration: User, password or similar was not accepted (26) Signed-off-by: Ladi Prosek--- src/hyperv/hyperv_driver.c | 2 -- src/hyperv/hyperv_wmi.c| 1 - 2 files changed, 3 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 09912610c..52274239c 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -105,8 +105,6 @@ hypervInitConnection(virConnectPtr conn, hypervPrivate *priv, priv->wmiVersion = HYPERV_WMI_VERSION_V1; if (hypervEnumAndPull(priv, , ) < 0) { -virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s is not a Hyper-V server"), conn->uri->server); goto cleanup; } } diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 980a00e28..0b9431bfa 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -514,7 +514,6 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv, /* Get query and create filter based on it */ if (virBufferCheckError(p->epr.query) < 0) { virBufferFreeAndReset(p->epr.query); -virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid query")); goto cleanup; } query_string = virBufferContentAndReset(p->epr.query); -- 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 0/3] Hyper-V driver fixes
Fixes a couple of minor issues in the Hyper-V driver found by code inspection. v1->v2: * Removed an "Invalid query" virReportError instead of adding a new one because virBufferCheckError already reports a meaningful error (Daniel) Ladi Prosek (3): hyperv: Fix hypervInitConnection error reporting hyperv: Escape WQL queries hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon src/hyperv/hyperv_driver.c | 104 ++--- src/hyperv/hyperv_wmi.c| 3 +- src/util/virbuffer.c | 18 src/util/virbuffer.h | 3 ++ 4 files changed, 74 insertions(+), 54 deletions(-) -- 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list