[libvirt] [jenkins-ci PATCH] projects: rename libvirt-freebsd into libvirt-freebsd-10
by Pavel Hrdina
We will have freebsd-11 as well.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under trivial rule.
projects/libvirt.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml
index e5946e2..a70a58c 100644
--- a/projects/libvirt.yaml
+++ b/projects/libvirt.yaml
@@ -19,7 +19,7 @@
- libvirt-fedora-25
- libvirt-fedora-26
- libvirt-fedora-rawhide
- - libvirt-freebsd
+ - libvirt-freebsd-10
- autotools-syntax-check-job:
parent_jobs: 'libvirt-master-build'
machines:
--
2.13.6
7 years, 2 months
[libvirt] [PATCH v3] interfaces: Convert virInterfaceObjList to virObjectRWLockable
by John Ferlan
Rather than a forward linked list, let's use the ObjectRWLockable object
in order to manage the data.
Requires numerous changes from List to Object management similar to
many other drivers/vir*obj.c modules
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
This is the real one - I need more coffee.
src/conf/virinterfaceobj.c | 365 +++++++++++++++++++++++++++++++--------------
src/libvirt_private.syms | 1 -
src/test/test_driver.c | 6 +-
3 files changed, 253 insertions(+), 119 deletions(-)
diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c
index e993b929d7..cf3626def4 100644
--- a/src/conf/virinterfaceobj.c
+++ b/src/conf/virinterfaceobj.c
@@ -25,6 +25,7 @@
#include "viralloc.h"
#include "virerror.h"
#include "virinterfaceobj.h"
+#include "virhash.h"
#include "virlog.h"
#include "virstring.h"
@@ -40,14 +41,19 @@ struct _virInterfaceObj {
};
struct _virInterfaceObjList {
- size_t count;
- virInterfaceObjPtr *objs;
+ virObjectRWLockable parent;
+
+ /* name string -> virInterfaceObj mapping
+ * for O(1), lockless lookup-by-name */
+ virHashTable *objsName;
};
/* virInterfaceObj manipulation */
static virClassPtr virInterfaceObjClass;
+static virClassPtr virInterfaceObjListClass;
static void virInterfaceObjDispose(void *obj);
+static void virInterfaceObjListDispose(void *obj);
static int
virInterfaceObjOnceInit(void)
@@ -58,6 +64,12 @@ virInterfaceObjOnceInit(void)
virInterfaceObjDispose)))
return -1;
+ if (!(virInterfaceObjListClass = virClassNew(virClassForObjectRWLockable(),
+ "virInterfaceObjList",
+ sizeof(virInterfaceObjList),
+ virInterfaceObjListDispose)))
+ return -1;
+
return 0;
}
@@ -130,119 +142,188 @@ virInterfaceObjListNew(void)
{
virInterfaceObjListPtr interfaces;
- if (VIR_ALLOC(interfaces) < 0)
+ if (virInterfaceObjInitialize() < 0)
+ return NULL;
+
+ if (!(interfaces = virObjectRWLockableNew(virInterfaceObjListClass)))
+ return NULL;
+
+ if (!(interfaces->objsName = virHashCreate(10, virObjectFreeHashData))) {
+ virObjectUnref(interfaces);
return NULL;
+ }
+
return interfaces;
}
+struct _virInterfaceObjFindMACData {
+ const char *matchStr;
+ bool error;
+ int nmacs;
+ int maxmacs;
+ char **const macs;
+};
+
+static int
+virInterfaceObjListFindByMACStringCb(void *payload,
+ const void *name ATTRIBUTE_UNUSED,
+ void *opaque)
+{
+ virInterfaceObjPtr obj = payload;
+ struct _virInterfaceObjFindMACData *data = opaque;
+
+ if (data->error)
+ return 0;
+
+ if (data->nmacs == data->maxmacs)
+ return 0;
+
+ virObjectLock(obj);
+
+ if (STRCASEEQ(obj->def->mac, data->matchStr)) {
+ if (VIR_STRDUP(data->macs[data->nmacs], data->matchStr) < 0) {
+ data->error = true;
+ goto cleanup;
+ }
+ data->nmacs++;
+ }
+
+ cleanup:
+ virObjectUnlock(obj);
+ return 0;
+}
+
+
int
virInterfaceObjListFindByMACString(virInterfaceObjListPtr interfaces,
const char *mac,
char **const matches,
int maxmatches)
{
- size_t i;
- int matchct = 0;
+ struct _virInterfaceObjFindMACData data = { .matchStr = mac,
+ .error = false,
+ .nmacs = 0,
+ .maxmacs = maxmatches,
+ .macs = matches };
- for (i = 0; i < interfaces->count; i++) {
- virInterfaceObjPtr obj = interfaces->objs[i];
- virInterfaceDefPtr def;
+ virObjectRWLockRead(interfaces);
+ virHashForEach(interfaces->objsName, virInterfaceObjListFindByMACStringCb,
+ &data);
+ virObjectRWUnlock(interfaces);
- virObjectLock(obj);
- def = obj->def;
- if (STRCASEEQ(def->mac, mac)) {
- if (matchct < maxmatches) {
- if (VIR_STRDUP(matches[matchct], def->name) < 0) {
- virObjectUnlock(obj);
- goto error;
- }
- matchct++;
- }
- }
- virObjectUnlock(obj);
- }
- return matchct;
+ if (data.error)
+ goto error;
+
+ return data.nmacs;
error:
- while (--matchct >= 0)
- VIR_FREE(matches[matchct]);
+ while (--data.nmacs >= 0)
+ VIR_FREE(data.macs[data.nmacs]);
return -1;
}
+static virInterfaceObjPtr
+virInterfaceObjListFindByNameLocked(virInterfaceObjListPtr interfaces,
+ const char *name)
+{
+ return virObjectRef(virHashLookup(interfaces->objsName, name));
+}
+
+
virInterfaceObjPtr
virInterfaceObjListFindByName(virInterfaceObjListPtr interfaces,
const char *name)
{
- size_t i;
-
- for (i = 0; i < interfaces->count; i++) {
- virInterfaceObjPtr obj = interfaces->objs[i];
- virInterfaceDefPtr def;
-
+ virInterfaceObjPtr obj;
+ virObjectRWLockRead(interfaces);
+ obj = virInterfaceObjListFindByNameLocked(interfaces, name);
+ virObjectRWUnlock(interfaces);
+ if (obj)
virObjectLock(obj);
- def = obj->def;
- if (STREQ(def->name, name))
- return virObjectRef(obj);
- virObjectUnlock(obj);
- }
- return NULL;
+ return obj;
}
void
-virInterfaceObjListFree(virInterfaceObjListPtr interfaces)
+virInterfaceObjListDispose(void *obj)
{
- size_t i;
+ virInterfaceObjListPtr interfaces = obj;
+
+ virHashFree(interfaces->objsName);
+}
+
+
+struct _virInterfaceObjListCloneData {
+ bool error;
+ virInterfaceObjListPtr dest;
+};
+
+static int
+virInterfaceObjListCloneCb(void *payload,
+ const void *name ATTRIBUTE_UNUSED,
+ void *opaque)
+{
+ virInterfaceObjPtr srcObj = payload;
+ struct _virInterfaceObjListCloneData *data = opaque;
+ char *xml = NULL;
+ virInterfaceDefPtr backup = NULL;
+ virInterfaceObjPtr obj;
+
+ if (data->error)
+ return 0;
+
+ virObjectLock(srcObj);
+
+ if (!(xml = virInterfaceDefFormat(srcObj->def)))
+ goto error;
+
+ if (!(backup = virInterfaceDefParseString(xml)))
+ goto error;
+ VIR_FREE(xml);
- for (i = 0; i < interfaces->count; i++)
- virObjectUnref(interfaces->objs[i]);
- VIR_FREE(interfaces->objs);
- VIR_FREE(interfaces);
+ if (!(obj = virInterfaceObjListAssignDef(data->dest, backup)))
+ goto error;
+ virInterfaceObjEndAPI(&obj);
+
+ virObjectUnlock(srcObj);
+ return 0;
+
+ error:
+ data->error = true;
+ VIR_FREE(xml);
+ virInterfaceDefFree(backup);
+ virObjectUnlock(srcObj);
+ return 0;
}
virInterfaceObjListPtr
virInterfaceObjListClone(virInterfaceObjListPtr interfaces)
{
- size_t i;
- unsigned int cnt;
- virInterfaceObjListPtr dest;
+ struct _virInterfaceObjListCloneData data = { .error = false,
+ .dest = NULL };
if (!interfaces)
return NULL;
- if (!(dest = virInterfaceObjListNew()))
+ if (!(data.dest = virInterfaceObjListNew()))
return NULL;
- cnt = interfaces->count;
- for (i = 0; i < cnt; i++) {
- virInterfaceObjPtr srcobj = interfaces->objs[i];
- virInterfaceDefPtr backup;
- virInterfaceObjPtr obj;
- char *xml = virInterfaceDefFormat(srcobj->def);
-
- if (!xml)
- goto error;
+ virObjectRWLockRead(interfaces);
+ virHashForEach(interfaces->objsName, virInterfaceObjListCloneCb, &data);
+ virObjectRWUnlock(interfaces);
- if (!(backup = virInterfaceDefParseString(xml))) {
- VIR_FREE(xml);
- goto error;
- }
-
- VIR_FREE(xml);
- if (!(obj = virInterfaceObjListAssignDef(dest, backup)))
- goto error;
- virInterfaceObjEndAPI(&obj);
- }
+ if (data.error)
+ goto error;
- return dest;
+ return data.dest;
error:
- virInterfaceObjListFree(dest);
+ virObjectUnref(data.dest);
return NULL;
}
@@ -253,9 +334,11 @@ virInterfaceObjListAssignDef(virInterfaceObjListPtr interfaces,
{
virInterfaceObjPtr obj;
- if ((obj = virInterfaceObjListFindByName(interfaces, def->name))) {
+ virObjectRWLockWrite(interfaces);
+ if ((obj = virInterfaceObjListFindByNameLocked(interfaces, def->name))) {
virInterfaceDefFree(obj->def);
obj->def = def;
+ virObjectRWUnlock(interfaces);
return obj;
}
@@ -263,13 +346,19 @@ virInterfaceObjListAssignDef(virInterfaceObjListPtr interfaces,
if (!(obj = virInterfaceObjNew()))
return NULL;
- if (VIR_APPEND_ELEMENT_COPY(interfaces->objs,
- interfaces->count, obj) < 0) {
- virInterfaceObjEndAPI(&obj);
- return NULL;
- }
+ if (virHashAddEntry(interfaces->objsName, def->name, obj) < 0)
+ goto error;
+ virObjectRef(obj);
+
obj->def = def;
- return virObjectRef(obj);
+ virObjectRWUnlock(interfaces);
+
+ return obj;
+
+ error:
+ virInterfaceObjEndAPI(&obj);
+ virObjectRWUnlock(interfaces);
+ return NULL;
}
@@ -277,20 +366,37 @@ void
virInterfaceObjListRemove(virInterfaceObjListPtr interfaces,
virInterfaceObjPtr obj)
{
- size_t i;
+ virObjectRef(obj);
+ virObjectUnlock(obj);
+ virObjectRWLockWrite(interfaces);
+ virObjectLock(obj);
+ virHashRemoveEntry(interfaces->objsName, obj->def->name);
+ virObjectUnlock(obj);
+ virObjectUnref(obj);
+ virObjectRWUnlock(interfaces);
+}
+
+
+struct _virInterfaceObjNumOfInterfacesData {
+ bool wantActive;
+ int count;
+};
+
+static int
+virInterfaceObjListNumOfInterfacesCb(void *payload,
+ const void *name ATTRIBUTE_UNUSED,
+ void *opaque)
+{
+ virInterfaceObjPtr obj = payload;
+ struct _virInterfaceObjNumOfInterfacesData *data = opaque;
+
+ virObjectLock(obj);
+
+ if (data->wantActive == virInterfaceObjIsActive(obj))
+ data->count++;
virObjectUnlock(obj);
- for (i = 0; i < interfaces->count; i++) {
- virObjectLock(interfaces->objs[i]);
- if (interfaces->objs[i] == obj) {
- virObjectUnlock(interfaces->objs[i]);
- virObjectUnref(interfaces->objs[i]);
-
- VIR_DELETE_ELEMENT(interfaces->objs, i, interfaces->count);
- break;
- }
- virObjectUnlock(interfaces->objs[i]);
- }
+ return 0;
}
@@ -298,18 +404,55 @@ int
virInterfaceObjListNumOfInterfaces(virInterfaceObjListPtr interfaces,
bool wantActive)
{
- size_t i;
- int ninterfaces = 0;
+ struct _virInterfaceObjNumOfInterfacesData data = {
+ .wantActive = wantActive, .count = 0 };
- for (i = 0; (i < interfaces->count); i++) {
- virInterfaceObjPtr obj = interfaces->objs[i];
- virObjectLock(obj);
- if (wantActive == virInterfaceObjIsActive(obj))
- ninterfaces++;
- virObjectUnlock(obj);
+ virObjectRWLockRead(interfaces);
+ virHashForEach(interfaces->objsName, virInterfaceObjListNumOfInterfacesCb,
+ &data);
+ virObjectRWUnlock(interfaces);
+
+ return data.count;
+}
+
+
+struct _virInterfaceObjGetNamesData {
+ bool wantActive;
+ bool error;
+ int nnames;
+ int maxnames;
+ char **const names;
+};
+
+static int
+virInterfaceObjListGetNamesCb(void *payload,
+ const void *name ATTRIBUTE_UNUSED,
+ void *opaque)
+{
+ virInterfaceObjPtr obj = payload;
+ struct _virInterfaceObjGetNamesData *data = opaque;
+
+ if (data->error)
+ return 0;
+
+ if (data->maxnames >= 0 && data->nnames == data->maxnames)
+ return 0;
+
+ virObjectLock(obj);
+
+ if (data->wantActive != virInterfaceObjIsActive(obj))
+ goto cleanup;
+
+ if (VIR_STRDUP(data->names[data->nnames], obj->def->name) < 0) {
+ data->error = true;
+ goto cleanup;
}
- return ninterfaces;
+ data->nnames++;
+
+ cleanup:
+ virObjectUnlock(obj);
+ return 0;
}
@@ -319,30 +462,22 @@ virInterfaceObjListGetNames(virInterfaceObjListPtr interfaces,
char **const names,
int maxnames)
{
- int nnames = 0;
- size_t i;
+ struct _virInterfaceObjGetNamesData data = {
+ .wantActive = wantActive, .error = false, .nnames = 0,
+ .maxnames = maxnames, .names = names };
- for (i = 0; i < interfaces->count && nnames < maxnames; i++) {
- virInterfaceObjPtr obj = interfaces->objs[i];
- virInterfaceDefPtr def;
+ virObjectRWLockRead(interfaces);
+ virHashForEach(interfaces->objsName, virInterfaceObjListGetNamesCb, &data);
+ virObjectRWUnlock(interfaces);
- virObjectLock(obj);
- def = obj->def;
- if (wantActive == virInterfaceObjIsActive(obj)) {
- if (VIR_STRDUP(names[nnames], def->name) < 0) {
- virObjectUnlock(obj);
- goto failure;
- }
- nnames++;
- }
- virObjectUnlock(obj);
- }
+ if (data.error)
+ goto error;
- return nnames;
+ return data.nnames;
- failure:
- while (--nnames >= 0)
- VIR_FREE(names[nnames]);
+ error:
+ while (--data.nnames >= 0)
+ VIR_FREE(data.names[data.nnames]);
return -1;
}
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 26c5ddb405..9133199895 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -932,7 +932,6 @@ virInterfaceObjListAssignDef;
virInterfaceObjListClone;
virInterfaceObjListFindByMACString;
virInterfaceObjListFindByName;
-virInterfaceObjListFree;
virInterfaceObjListGetNames;
virInterfaceObjListNew;
virInterfaceObjListNumOfInterfaces;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 1c48347994..14bba7494c 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -154,7 +154,7 @@ testDriverFree(testDriverPtr driver)
virObjectUnref(driver->domains);
virNodeDeviceObjListFree(driver->devs);
virObjectUnref(driver->networks);
- virInterfaceObjListFree(driver->ifaces);
+ virObjectUnref(driver->ifaces);
virStoragePoolObjListFree(&driver->pools);
virObjectUnref(driver->eventState);
virMutexUnlock(&driver->lock);
@@ -3880,7 +3880,7 @@ testInterfaceChangeCommit(virConnectPtr conn,
goto cleanup;
}
- virInterfaceObjListFree(privconn->backupIfaces);
+ virObjectUnref(privconn->backupIfaces);
privconn->transaction_running = false;
ret = 0;
@@ -3910,7 +3910,7 @@ testInterfaceChangeRollback(virConnectPtr conn,
goto cleanup;
}
- virInterfaceObjListFree(privconn->ifaces);
+ virObjectUnref(privconn->ifaces);
privconn->ifaces = privconn->backupIfaces;
privconn->backupIfaces = NULL;
--
2.13.6
7 years, 2 months
[libvirt] [PATCH 0/5] qemu: Refactor placement of per-storage-source data (blockdev-add saga)
by Peter Krempa
These patches are part of John's original series located here:
https://www.redhat.com/archives/libvir-list/2017-October/msg00228.html
The patches are reordered and fixed to make more sense.
Patch 1/5 is originally 5/16, without any modification. Patches 2/5 and
3/5 are split from patch 2/16 from original series.
Patches 3/16 and 4/16 were dropped. Allocating the private data via
xmlopt does not make sense since the storage-driver originating
virStorageSources would not have them allocated anyways. We will
allocate them when necessary in the qemu driver.
The copy function was dropped, since the private data should not really
be copied. It can be added later if necessary.
The rest of the series will be posted later. I'm interrested in parsing
of auth/encryption for backing chain members (1/16, 7/16) and the JSON
generator from 15/16. I'll extract those parts in my upcoming
blockdev-add saga postings and post the rest later.
John Ferlan (5):
qemu: Add missing encinfo cleanup
util: storage: Introduce privateData for _virStorageSource
qemu: Introduce privateData object for virStorageSource
qemu: Relocate qemuDomainSecretInfoPtr to
qemuDomainStorageSourcePrivate
qemu: Move encinfo from private disk to private disk src
src/qemu/qemu_command.c | 12 +++++-----
src/qemu/qemu_domain.c | 60 ++++++++++++++++++++++++++++++++++++++---------
src/qemu/qemu_domain.h | 26 +++++++++++++-------
src/qemu/qemu_hotplug.c | 11 +++++----
src/util/virstoragefile.c | 1 +
src/util/virstoragefile.h | 3 +++
6 files changed, 82 insertions(+), 31 deletions(-)
--
2.14.1
7 years, 2 months
[libvirt] [PATCH v3] [libvirt-jenkins-ci] Build on supported Fedora releases (25-26)
by Andrea Bolognani
Fedora 23 has been out of support for quite a while now, with
Fedora 24 recently joining it with the release of Fedora 26
which, on the other hand, is fully supported and a prime candidate
for building libvirt.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Yash first attempted this last December[1], without much luck.
Fedora 26 has been released in the meantime, which means we can
get rid of two builders instead of one! Someone will have to
prepare the 'libvirt-fedora-26' builder, though, because it
doesn't exist at the moment :)
[1] https://www.redhat.com/archives/libvir-list/2016-December/msg00676.html
projects/libosinfo.yaml | 3 +--
projects/libvirt-cim.yaml | 3 +--
projects/libvirt-glib.yaml | 3 +--
projects/libvirt-go-xml.yaml | 3 +--
projects/libvirt-go.yaml | 3 +--
projects/libvirt-perl.yaml | 3 +--
projects/libvirt-python.yaml | 3 +--
projects/libvirt-sandbox.yaml | 3 +--
projects/libvirt-tck.yaml | 3 +--
projects/libvirt.yaml | 9 +++------
projects/osinfo-db-tools.yaml | 3 +--
projects/osinfo-db.yaml | 3 +--
projects/virt-manager.yaml | 3 +--
projects/virt-viewer.yaml | 3 +--
14 files changed, 16 insertions(+), 32 deletions(-)
diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml
index f9a8ceb..77c0414 100644
--- a/projects/libosinfo.yaml
+++ b/projects/libosinfo.yaml
@@ -3,9 +3,8 @@
name: libosinfo
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: libosinfo
make_env: |
diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml
index 82a8127..b3476e7 100644
--- a/projects/libvirt-cim.yaml
+++ b/projects/libvirt-cim.yaml
@@ -4,9 +4,8 @@
machines:
- libvirt-centos-6
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: libvirt CIM
jobs:
diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml
index 7d897ab..eba4646 100644
--- a/projects/libvirt-glib.yaml
+++ b/projects/libvirt-glib.yaml
@@ -3,9 +3,8 @@
name: libvirt-glib
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt GLib
jobs:
diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml
index 9f45694..ebe06fb 100644
--- a/projects/libvirt-go-xml.yaml
+++ b/projects/libvirt-go-xml.yaml
@@ -3,9 +3,8 @@
name: libvirt-go-xml
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt Go XML
jobs:
diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml
index b0ebc73..9ffdd0a 100644
--- a/projects/libvirt-go.yaml
+++ b/projects/libvirt-go.yaml
@@ -3,9 +3,8 @@
name: libvirt-go
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt Go
jobs:
diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml
index a9f4740..7646e27 100644
--- a/projects/libvirt-perl.yaml
+++ b/projects/libvirt-perl.yaml
@@ -3,9 +3,8 @@
name: libvirt-perl
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt Perl
jobs:
diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml
index c1192d0..cae8ca7 100644
--- a/projects/libvirt-python.yaml
+++ b/projects/libvirt-python.yaml
@@ -4,9 +4,8 @@
machines:
- libvirt-centos-6
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt Python
jobs:
diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml
index ebbc5be..2920084 100644
--- a/projects/libvirt-sandbox.yaml
+++ b/projects/libvirt-sandbox.yaml
@@ -2,9 +2,8 @@
- project:
name: libvirt-sandbox
machines:
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt Sandbox
jobs:
diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml
index a7c0233..ca72f6c 100644
--- a/projects/libvirt-tck.yaml
+++ b/projects/libvirt-tck.yaml
@@ -2,9 +2,8 @@
- project:
name: libvirt-tck
machines:
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt TCK
jobs:
diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml
index 5125c16..0efe770 100644
--- a/projects/libvirt.yaml
+++ b/projects/libvirt.yaml
@@ -4,9 +4,8 @@
machines:
- libvirt-centos-6
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Libvirt
archive_format: xz
@@ -17,9 +16,8 @@
- libvirt-centos-6
- libvirt-centos-7
- libvirt-debian-8
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
- libvirt-freebsd
- autotools-syntax-check-job:
@@ -28,9 +26,8 @@
- libvirt-centos-6
- libvirt-centos-7
- libvirt-debian-8
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
check_env: |
export VIR_TEST_EXPENSIVE=1
diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml
index 5f275ab..93931af 100644
--- a/projects/osinfo-db-tools.yaml
+++ b/projects/osinfo-db-tools.yaml
@@ -3,9 +3,8 @@
name: osinfo-db-tools
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: osinfo database tools
jobs:
diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml
index 9539724..83eb92f 100644
--- a/projects/osinfo-db.yaml
+++ b/projects/osinfo-db.yaml
@@ -3,9 +3,8 @@
name: osinfo-db
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: osinfo database
jobs:
diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml
index 4485d5f..a50e0ab 100644
--- a/projects/virt-manager.yaml
+++ b/projects/virt-manager.yaml
@@ -3,9 +3,8 @@
name: virt-manager
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Virtual Machine Manager
jobs:
diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml
index 06c372b..e3ef04a 100644
--- a/projects/virt-viewer.yaml
+++ b/projects/virt-viewer.yaml
@@ -3,9 +3,8 @@
name: virt-viewer
machines:
- libvirt-centos-7
- - libvirt-fedora-23
- - libvirt-fedora-24
- libvirt-fedora-25
+ - libvirt-fedora-26
- libvirt-fedora-rawhide
title: Virt Viewer
jobs:
--
2.13.5
7 years, 2 months
[libvirt] [libvirt-jenkins-ci PATCH 0/4] guests: Fixes and improvements
by Andrea Bolognani
First of probably several batches :)
Andrea Bolognani (4):
guests: preseed: Fix root partition size
guests: lcitool: Don't disable USB controller
guests: libvirt: Install dwarves
guests: jenkins: Always download freshest agent
guests/lcitool | 1 -
guests/preseed.cfg | 2 +-
guests/tasks/jenkins.yml | 1 +
guests/vars/mappings.yml | 5 +++++
guests/vars/projects/libvirt.yml | 1 +
5 files changed, 8 insertions(+), 2 deletions(-)
--
2.13.6
7 years, 2 months
[libvirt] [PATCH] qemu-ns: Detect /dev/* mount point duplicates better
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1495511
When creating new /dev for domain ran in namespace we try to
preserve all sub-mounts of /dev. Well, not quite all. For
instance if /dev/foo/bar and /dev/foo are both mount points, only
/dev/foo needs preserving. /dev/foo/bar is preserved with it too.
Now, to identify such cases like this one STRPREFIX() is used.
That is not good enough. While it works for [/dev/foo/bar;
/dev/foo] case, it fails for [/dev/prefix; /dev/prefix2] where
the strings share the same prefix but are in fact two different
paths. The solution is to use STRSKIP().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 05e8b96aa..8aa66c69c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8182,7 +8182,9 @@ qemuDomainGetPreservedMounts(virQEMUDriverConfigPtr cfg,
for (i = 1; i < nmounts; i++) {
j = i + 1;
while (j < nmounts) {
- if (STRPREFIX(mounts[j], mounts[i])) {
+ char *c = STRSKIP(mounts[j], mounts[i]);
+
+ if (c && *c == '/') {
VIR_DEBUG("Dropping path %s because of %s", mounts[j], mounts[i]);
VIR_DELETE_ELEMENT(mounts, j, nmounts);
} else {
--
2.13.6
7 years, 2 months
[libvirt] [libvirt-jenkins-ci PATCH v2 0/6] Unattended guest installation and more
by Andrea Bolognani
Changes from [v1]:
* guest changes
- set root password to a user-provided value
- only allow key-based SSH login for root
- configure serial console for emergency access
- disable audio, video and USB
- allocate 256 MiB for swap instead of 2 GiB
- allocate 15 GiB for storage instead of 10 GiB
- use host-passthrough CPU mode
- set timezone to UTC
* tool changes
- rename to lcitool
- implement basic configuration support
- refuse to run from outside the source directory
- provide better error messages
* others
- improve documentation, mainly the host setup part
[v1] https://www.redhat.com/archives/libvir-list/2017-October/msg00651.html
Andrea Bolognani (6):
guests: Rename from 'ansible'
guests: Introduce lcitool
guests: Remove bootstrap phase
guests: Add unattended installation support
guests: Configure bootloaders
guests: Update documentation
ansible/Makefile | 12 --
ansible/README.markdown | 60 -------
ansible/bootstrap.yml | 15 --
{ansible => guests}/.gitignore | 0
guests/README.markdown | 97 +++++++++++
{ansible => guests}/ansible.cfg | 1 -
guests/group_vars/all/install.yml | 11 ++
{ansible => guests}/group_vars/all/main.yml | 5 +
guests/host_vars/libvirt-centos-6/install.yml | 3 +
.../host_vars/libvirt-centos-6/main.yml | 0
.../host_vars/libvirt-centos-6/vault.yml | 0
guests/host_vars/libvirt-centos-7/install.yml | 3 +
.../host_vars/libvirt-centos-7/main.yml | 0
.../host_vars/libvirt-centos-7/vault.yml | 0
guests/host_vars/libvirt-debian-8/install.yml | 3 +
.../host_vars/libvirt-debian-8/main.yml | 0
.../host_vars/libvirt-debian-8/vault.yml | 0
guests/host_vars/libvirt-debian-9/install.yml | 3 +
.../host_vars/libvirt-debian-9/main.yml | 0
.../host_vars/libvirt-debian-9/vault.yml | 0
guests/host_vars/libvirt-fedora-25/install.yml | 3 +
.../host_vars/libvirt-fedora-25/main.yml | 0
.../host_vars/libvirt-fedora-25/vault.yml | 0
guests/host_vars/libvirt-fedora-26/install.yml | 3 +
.../host_vars/libvirt-fedora-26/main.yml | 0
.../host_vars/libvirt-fedora-26/vault.yml | 0
.../host_vars/libvirt-fedora-rawhide/install.yml | 3 +
.../host_vars/libvirt-fedora-rawhide/main.yml | 0
.../host_vars/libvirt-fedora-rawhide/vault.yml | 0
.../host_vars/libvirt-freebsd-10/main.yml | 0
.../host_vars/libvirt-freebsd-10/vault.yml | 0
.../host_vars/libvirt-freebsd-11/main.yml | 0
.../host_vars/libvirt-freebsd-11/vault.yml | 0
guests/host_vars/libvirt-ubuntu-12/install.yml | 3 +
.../host_vars/libvirt-ubuntu-12/main.yml | 0
.../host_vars/libvirt-ubuntu-12/vault.yml | 0
guests/host_vars/libvirt-ubuntu-14/install.yml | 3 +
.../host_vars/libvirt-ubuntu-14/main.yml | 0
.../host_vars/libvirt-ubuntu-14/vault.yml | 0
guests/host_vars/libvirt-ubuntu-16/install.yml | 3 +
.../host_vars/libvirt-ubuntu-16/main.yml | 0
.../host_vars/libvirt-ubuntu-16/vault.yml | 0
{ansible => guests}/inventory | 0
guests/kickstart.cfg | 60 +++++++
guests/lcitool | 183 +++++++++++++++++++++
guests/preseed.cfg | 85 ++++++++++
{ansible => guests}/site.yml | 8 +
{ansible => guests}/tasks/base.yml | 61 ++++++-
{ansible => guests}/tasks/bootstrap.yml | 0
{ansible => guests}/tasks/compat.yml | 0
{ansible => guests}/tasks/jenkins.yml | 0
{ansible => guests}/tasks/packages.yml | 0
{ansible => guests}/templates/jenkins.service.j2 | 0
{ansible => guests}/vars/mappings.yml | 0
{ansible => guests}/vars/projects/base.yml | 0
{ansible => guests}/vars/projects/jenkins.yml | 0
{ansible => guests}/vars/projects/libosinfo.yml | 0
{ansible => guests}/vars/projects/libvirt-cim.yml | 0
{ansible => guests}/vars/projects/libvirt-glib.yml | 0
.../vars/projects/libvirt-go-xml.yml | 0
{ansible => guests}/vars/projects/libvirt-go.yml | 0
{ansible => guests}/vars/projects/libvirt-perl.yml | 0
.../vars/projects/libvirt-python.yml | 0
.../vars/projects/libvirt-sandbox.yml | 0
{ansible => guests}/vars/projects/libvirt-tck.yml | 0
{ansible => guests}/vars/projects/libvirt.yml | 0
.../vars/projects/osinfo-db-tools.yml | 0
{ansible => guests}/vars/projects/osinfo-db.yml | 0
{ansible => guests}/vars/projects/virt-manager.yml | 0
{ansible => guests}/vars/projects/virt-viewer.yml | 0
70 files changed, 539 insertions(+), 89 deletions(-)
delete mode 100644 ansible/Makefile
delete mode 100644 ansible/README.markdown
delete mode 100644 ansible/bootstrap.yml
rename {ansible => guests}/.gitignore (100%)
create mode 100644 guests/README.markdown
rename {ansible => guests}/ansible.cfg (71%)
create mode 100644 guests/group_vars/all/install.yml
rename {ansible => guests}/group_vars/all/main.yml (51%)
create mode 100644 guests/host_vars/libvirt-centos-6/install.yml
rename {ansible => guests}/host_vars/libvirt-centos-6/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-centos-6/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-centos-7/install.yml
rename {ansible => guests}/host_vars/libvirt-centos-7/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-centos-7/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-debian-8/install.yml
rename {ansible => guests}/host_vars/libvirt-debian-8/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-debian-8/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-debian-9/install.yml
rename {ansible => guests}/host_vars/libvirt-debian-9/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-debian-9/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-fedora-25/install.yml
rename {ansible => guests}/host_vars/libvirt-fedora-25/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-fedora-25/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-fedora-26/install.yml
rename {ansible => guests}/host_vars/libvirt-fedora-26/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-fedora-26/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-fedora-rawhide/install.yml
rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/vault.yml (100%)
rename {ansible => guests}/host_vars/libvirt-freebsd-10/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-freebsd-10/vault.yml (100%)
rename {ansible => guests}/host_vars/libvirt-freebsd-11/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-freebsd-11/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-ubuntu-12/install.yml
rename {ansible => guests}/host_vars/libvirt-ubuntu-12/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-ubuntu-12/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-ubuntu-14/install.yml
rename {ansible => guests}/host_vars/libvirt-ubuntu-14/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-ubuntu-14/vault.yml (100%)
create mode 100644 guests/host_vars/libvirt-ubuntu-16/install.yml
rename {ansible => guests}/host_vars/libvirt-ubuntu-16/main.yml (100%)
rename {ansible => guests}/host_vars/libvirt-ubuntu-16/vault.yml (100%)
rename {ansible => guests}/inventory (100%)
create mode 100644 guests/kickstart.cfg
create mode 100755 guests/lcitool
create mode 100644 guests/preseed.cfg
rename {ansible => guests}/site.yml (83%)
rename {ansible => guests}/tasks/base.yml (58%)
rename {ansible => guests}/tasks/bootstrap.yml (100%)
rename {ansible => guests}/tasks/compat.yml (100%)
rename {ansible => guests}/tasks/jenkins.yml (100%)
rename {ansible => guests}/tasks/packages.yml (100%)
rename {ansible => guests}/templates/jenkins.service.j2 (100%)
rename {ansible => guests}/vars/mappings.yml (100%)
rename {ansible => guests}/vars/projects/base.yml (100%)
rename {ansible => guests}/vars/projects/jenkins.yml (100%)
rename {ansible => guests}/vars/projects/libosinfo.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-cim.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-glib.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-go-xml.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-go.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-perl.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-python.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-sandbox.yml (100%)
rename {ansible => guests}/vars/projects/libvirt-tck.yml (100%)
rename {ansible => guests}/vars/projects/libvirt.yml (100%)
rename {ansible => guests}/vars/projects/osinfo-db-tools.yml (100%)
rename {ansible => guests}/vars/projects/osinfo-db.yml (100%)
rename {ansible => guests}/vars/projects/virt-manager.yml (100%)
rename {ansible => guests}/vars/projects/virt-viewer.yml (100%)
--
2.13.6
7 years, 2 months
[libvirt] [PATCH 0/6] qemu: hotplug: Kill duplicated code in disk hotplug (blockdev-add saga)
by Peter Krempa
A lot of code was copypasted into the three disk attaching functions
which are (almost) identical (one was forgotten), without refactoring it
first. Let's reduce two copies of the ugly code. BTW this adds support
for disk encryption and storage source authentication for USB disks.
Peter Krempa (6):
qemu: address: Remove dead code when un-reserving PCI address
qemu: hotplug: Remove wrong check for empty disks
qemu: hotplug: Use disk target in debug/warning messages where
appropriate
qemu: hotplug: extract disk hotplug worker code
qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
qemuDomainAttachSCSIDisk
qemu: hotplug: Reuse qemuDomainAttachDiskGeneric in
qemuDomainAttachUSBMassStorageDevice
src/conf/domain_addr.c | 3 +-
src/conf/domain_addr.h | 4 +-
src/qemu/qemu_domain_address.c | 7 +-
src/qemu/qemu_hotplug.c | 273 ++++++++---------------------------------
4 files changed, 53 insertions(+), 234 deletions(-)
--
2.14.1
7 years, 2 months
[libvirt] [PATCH 00/12] qemu: input device hotplug
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1379603
Ján Tomko (12):
conf: audit passthrough input devices at domain startup
qemuDomainAttachControllerDevice: remove dead code
qemuDomainAttachRNGDevice: do not access source.file randomly
Move qemuCheckCCWS390AddressSupport to qemu_domain
Split out qemuDomainEnsureVirtioAddress
Use qemuDomainEnsureVirtioAddress where possible
qemu: allow coldplugging input devices
qemu: allow cold unplugging of input devices
split out qemuAssignDeviceInputAlias
Introduce qemuBuildInputDevStr
qemu: implement input device hotplug
qemu: implement input device hotunplug
src/conf/domain_audit.c | 44 ++++++++
src/conf/domain_audit.h | 5 +
src/conf/domain_conf.c | 37 +++++++
src/conf/domain_conf.h | 3 +
src/libvirt_private.syms | 3 +
src/qemu/qemu_alias.c | 24 ++++-
src/qemu/qemu_alias.h | 3 +
src/qemu/qemu_command.c | 82 +++++---------
src/qemu/qemu_command.h | 12 ++-
src/qemu/qemu_domain.c | 40 +++++++
src/qemu/qemu_domain.h | 5 +
src/qemu/qemu_domain_address.c | 45 ++++++++
src/qemu/qemu_domain_address.h | 4 +
src/qemu/qemu_driver.c | 25 ++++-
src/qemu/qemu_hotplug.c | 239 +++++++++++++++++++++++++++--------------
src/qemu/qemu_hotplug.h | 8 ++
16 files changed, 436 insertions(+), 143 deletions(-)
--
2.13.0
7 years, 2 months
[libvirt] [PATCH] fix error message spacing in qemuDomainDetachNetDevice
by Ján Tomko
Move the space after the colon.
---
Pushed as trivial, suggested by John in review:
https://www.redhat.com/archives/libvir-list/2017-October/msg00833.html
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 57240ce67..1a0844701 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -5219,7 +5219,7 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot hot unplug multifunction PCI device :%s"),
+ _("cannot hot unplug multifunction PCI device: %s"),
dev->data.disk->dst);
goto cleanup;
}
--
2.13.0
7 years, 2 months