[libvirt] [PATCH 0/2] Couple of almost trivial memleak fixes
by Michal Privoznik
*** NOT PUSHED. PLEASE REVIEW ***
Michal Prívozník (2):
virnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too
networkStartNetworkVirtual: Don't leak macmap object
src/network/bridge_driver.c | 2 ++
src/util/virnetdevip.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.16.4
6 years, 4 months
[libvirt] [PATCH] src: Move DLOPEN_LIBS to libraries introducing the dependency
by Michal Privoznik
There are few places where dlopen() is called. This call means we
have to link with DLOPEN_LIBS. However, instead of having each
final, installable library linking with it, move the directive to
the source that introduced the dependency.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/Makefile.am | 2 ++
src/util/Makefile.inc.am | 1 +
tools/Makefile.am | 4 ++--
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index a4f213480e..61876cf382 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -752,6 +752,7 @@ libvirt_setuid_rpc_client_la_CFLAGS = \
$(AM_CFLAGS) \
$(SECDRIVER_CFLAGS) \
$(XDR_CFLAGS) \
+ $(DLOPEN_LIBS) \
$(NULL)
endif WITH_SETUID_RPC_CLIENT
@@ -1000,6 +1001,7 @@ libvirt_nss_la_CFLAGS = \
$(NULL)
libvirt_nss_la_LDFLAGS = \
$(AM_LDFLAGS) \
+ $(DLOPEN_LIBS) \
$(NULL)
endif WITH_NSS
diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am
index 8ef9ee1dfa..c5c50f1844 100644
--- a/src/util/Makefile.inc.am
+++ b/src/util/Makefile.inc.am
@@ -278,6 +278,7 @@ libvirt_util_la_LIBADD = \
$(NUMACTL_LIBS) \
$(ACL_LIBS) \
$(GNUTLS_LIBS) \
+ $(DLOPEN_LIBS) \
$(NULL)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 26c887649e..3e129c04c4 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -528,7 +528,7 @@ nss_libnss_libvirt_impl_la_CFLAGS = \
nss_libnss_libvirt_impl_la_LIBADD = \
../gnulib/lib/libgnu.la \
../src/libvirt-nss.la \
- $(DLOPEN_LIBS)
+ $(NULL)
nss_libnss_libvirt_la_SOURCES =
nss_libnss_libvirt_la_LDFLAGS = \
@@ -556,7 +556,7 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS = \
nss_libnss_libvirt_guest_impl_la_LIBADD = \
../gnulib/lib/libgnu.la \
../src/libvirt-nss.la \
- $(DLOPEN_LIBS)
+ $(NULL)
nss_libnss_libvirt_guest_la_SOURCES =
nss_libnss_libvirt_guest_la_LDFLAGS = \
--
2.16.4
6 years, 4 months
[libvirt] [PATCH] qemu-doc: mark ppc/prep machine as deprecated
by Hervé Poussineau
40p machine type should be used instead.
Signed-off-by: Hervé Poussineau <hpoussin(a)reactos.org>
---
qemu-deprecated.texi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 9920a85adc..9c7ff3fe2d 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -218,6 +218,12 @@ support page sizes < 4096 any longer.
These machine types are very old and likely can not be used for live migration
from old QEMU versions anymore. A newer machine type should be used instead.
+@subsection prep (PowerPC) (since 3.1)
+
+This machine type uses an unmaintained firmware, broken in lots of ways,
+and unable to start post-2004 operating systems. 40p machine type should be
+used instead.
+
@section Device options
@subsection Block device options
--
2.11.0
6 years, 4 months
[libvirt] [PATCH 00/17] some cgroup cleanup patches
by Pavel Hrdina
Preparation for cgroupv2 support.
Pavel Hrdina (17):
docs: List cpuacct in controllers used by QEMU driver
docs: Update how we create cgroup directory names
vircgroup: Rename structs to start with underscore
vircgroup: Introduce standard set of typedefs and use them
vircgroup: Extract file link resolving into separate function
vircgroup: Remove unused function virCgroupKill()
vircgroup: Unexport unused function virCgroupAddTaskController()
vircgroup: Unexport unused function virCgroupRemoveRecursively
vircgroup: Move function used in tests into vircgrouppriv.h
vircgroup: Remove pointless bool parameter
vircgroup: Extract mount options matching into function
vircgroup: Use virCgroupMountOptsMatchController in
virCgroupDetectPlacement
vircgroup: Introduce virCgroupEnableMissingControllers
vircgroup: machinename will never be NULL
vircgroup: Remove virCgroupAddTaskController
vircgroup: Introduce virCgroupGetMemoryStat
lxc: Use virCgroupGetMemoryStat
docs/cgroups.html.in | 47 ++--
src/libvirt_private.syms | 4 +-
src/lxc/lxc_cgroup.c | 65 +----
src/util/vircgroup.c | 521 ++++++++++++++++++++-------------------
src/util/vircgroup.h | 31 +--
src/util/vircgrouppriv.h | 21 +-
6 files changed, 330 insertions(+), 359 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH v2 00/20] Fix and improve hugepage code
by Pavel Hrdina
changes in v2:
- renamed existing test cases to sensible names
- split of some existing test cases
- fixed uncovered issue with memory discard
v1: https://www.redhat.com/archives/libvir-list/2018-July/msg00667.html
Pavel Hrdina (20):
tests: rename hugepages to hugepages-default
tests: extract hugepages-numa-default-dimm out of hugepages-numa
tests: rename hugepages-numa into hugepages-numa-default
tests: remove unnecessary XML elements from hugepages-numa-default
tests: extract pages-discard out of hugepages-pages
tests: rename hugepages-pages into hugepages-numa-nodeset
tests: rename hugepages-pages2 into hugepages-numa-default-2M
tests: extract pages-discard-hugepages out of hugepages-pages3
tests: rename hugepages-pages3 into hugepages-numa-nodeset-part
tests: rename hugepages-pages4 into hugepages-numa-nodeset-nonexist
tests: rename hugepages-pages5 into hugepages-default-2M
tests: rename hugepages-pages6 into hugepages-default-system-size
tests: rename hugepages-pages7 into pages-dimm-discard
tests: rename hugepages-pages8 into hugepages-nodeset-nonexist
tests: introduce hugepages-default-1G-nodeset-2M
tests: introduce hugepages-nodeset
conf: Move hugepage XML validation check out of qemu_command
conf: Move hugepages validation out of XML parser
conf: Introduce virDomainDefPostParseMemtune
qemu: ensure that memory 'discard' is used if specified in XML
src/conf/domain_conf.c | 134 +++++++++++++-----
src/qemu/qemu_command.c | 38 +----
...s => hugepages-default-1G-nodeset-2M.args} | 7 +-
.../hugepages-default-1G-nodeset-2M.xml | 31 ++++
...-pages5.args => hugepages-default-2M.args} | 5 +-
...es-pages5.xml => hugepages-default-2M.xml} | 13 +-
.../hugepages-default-system-size.args | 24 ++++
....xml => hugepages-default-system-size.xml} | 13 +-
...{hugepages.args => hugepages-default.args} | 2 -
.../{hugepages.xml => hugepages-default.xml} | 5 -
...es8.xml => hugepages-nodeset-nonexist.xml} | 13 +-
tests/qemuxml2argvdata/hugepages-nodeset.args | 26 ++++
tests/qemuxml2argvdata/hugepages-nodeset.xml | 30 ++++
...s2.args => hugepages-numa-default-2M.args} | 5 +-
...ges2.xml => hugepages-numa-default-2M.xml} | 8 +-
....args => hugepages-numa-default-dimm.args} | 12 +-
.../hugepages-numa-default-dimm.xml | 45 ++++++
.../hugepages-numa-default.args | 27 ++++
.../hugepages-numa-default.xml | 30 ++++
...ml => hugepages-numa-nodeset-nonexist.xml} | 17 +--
....args => hugepages-numa-nodeset-part.args} | 8 +-
.../hugepages-numa-nodeset-part.xml | 34 +++++
...pages.args => hugepages-numa-nodeset.args} | 17 +--
...s-pages.xml => hugepages-numa-nodeset.xml} | 15 +-
tests/qemuxml2argvdata/hugepages-numa.args | 63 --------
tests/qemuxml2argvdata/hugepages-numa.xml | 111 ---------------
.../qemuxml2argvdata/pages-dimm-discard.args | 33 +++++
...ages-pages7.xml => pages-dimm-discard.xml} | 18 +--
.../pages-discard-hugepages.args | 31 ++++
...pages3.xml => pages-discard-hugepages.xml} | 16 +--
tests/qemuxml2argvdata/pages-discard.args | 38 +++++
tests/qemuxml2argvdata/pages-discard.xml | 36 +++++
.../seclabel-dynamic-none-relabel.xml | 2 +-
tests/qemuxml2argvtest.c | 56 ++++----
.../hugepages-default-2M.xml | 1 +
.../hugepages-default-system-size.xml | 1 +
.../{hugepages.xml => hugepages-default.xml} | 6 -
.../qemuxml2xmloutdata/hugepages-nodeset.xml | 30 ++++
...ges2.xml => hugepages-numa-default-2M.xml} | 13 +-
.../hugepages-numa-default-dimm.xml | 1 +
.../hugepages-numa-nodeset-part.xml | 36 +++++
...s-pages.xml => hugepages-numa-nodeset.xml} | 20 +--
tests/qemuxml2xmloutdata/hugepages-pages3.xml | 47 ------
tests/qemuxml2xmloutdata/hugepages-pages4.xml | 1 -
tests/qemuxml2xmloutdata/hugepages-pages5.xml | 1 -
tests/qemuxml2xmloutdata/hugepages-pages6.xml | 1 -
tests/qemuxml2xmloutdata/hugepages-pages7.xml | 1 -
.../qemuxml2xmloutdata/pages-dimm-discard.xml | 1 +
.../pages-discard-hugepages.xml | 1 +
tests/qemuxml2xmloutdata/pages-discard.xml | 1 +
.../seclabel-dynamic-none-relabel.xml | 2 +-
tests/qemuxml2xmltest.c | 19 +--
52 files changed, 634 insertions(+), 512 deletions(-)
rename tests/qemuxml2argvdata/{hugepages-pages6.args => hugepages-default-1G-nodeset-2M.args} (72%)
create mode 100644 tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.xml
rename tests/qemuxml2argvdata/{hugepages-pages5.args => hugepages-default-2M.args} (75%)
rename tests/qemuxml2argvdata/{hugepages-pages5.xml => hugepages-default-2M.xml} (63%)
create mode 100644 tests/qemuxml2argvdata/hugepages-default-system-size.args
rename tests/qemuxml2argvdata/{hugepages-pages6.xml => hugepages-default-system-size.xml} (63%)
rename tests/qemuxml2argvdata/{hugepages.args => hugepages-default.args} (82%)
rename tests/qemuxml2argvdata/{hugepages.xml => hugepages-default.xml} (79%)
rename tests/qemuxml2argvdata/{hugepages-pages8.xml => hugepages-nodeset-nonexist.xml} (64%)
create mode 100644 tests/qemuxml2argvdata/hugepages-nodeset.args
create mode 100644 tests/qemuxml2argvdata/hugepages-nodeset.xml
rename tests/qemuxml2argvdata/{hugepages-pages2.args => hugepages-numa-default-2M.args} (77%)
rename tests/qemuxml2argvdata/{hugepages-pages2.xml => hugepages-numa-default-2M.xml} (77%)
rename tests/qemuxml2argvdata/{hugepages-pages7.args => hugepages-numa-default-dimm.args} (66%)
create mode 100644 tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml
create mode 100644 tests/qemuxml2argvdata/hugepages-numa-default.args
create mode 100644 tests/qemuxml2argvdata/hugepages-numa-default.xml
rename tests/qemuxml2argvdata/{hugepages-pages4.xml => hugepages-numa-nodeset-nonexist.xml} (66%)
rename tests/qemuxml2argvdata/{hugepages-pages3.args => hugepages-numa-nodeset-part.args} (71%)
create mode 100644 tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml
rename tests/qemuxml2argvdata/{hugepages-pages.args => hugepages-numa-nodeset.args} (62%)
rename tests/qemuxml2argvdata/{hugepages-pages.xml => hugepages-numa-nodeset.xml} (69%)
delete mode 100644 tests/qemuxml2argvdata/hugepages-numa.args
delete mode 100644 tests/qemuxml2argvdata/hugepages-numa.xml
create mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.args
rename tests/qemuxml2argvdata/{hugepages-pages7.xml => pages-dimm-discard.xml} (73%)
create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args
rename tests/qemuxml2argvdata/{hugepages-pages3.xml => pages-discard-hugepages.xml} (68%)
create mode 100644 tests/qemuxml2argvdata/pages-discard.args
create mode 100644 tests/qemuxml2argvdata/pages-discard.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-default-2M.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-default-system-size.xml
rename tests/qemuxml2xmloutdata/{hugepages.xml => hugepages-default.xml} (82%)
create mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml
rename tests/qemuxml2xmloutdata/{hugepages-pages2.xml => hugepages-numa-default-2M.xml} (67%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml
create mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
rename tests/qemuxml2xmloutdata/{hugepages-pages.xml => hugepages-numa-nodeset.xml} (62%)
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-pages3.xml
delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages4.xml
delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages5.xml
delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages6.xml
delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages7.xml
create mode 120000 tests/qemuxml2xmloutdata/pages-dimm-discard.xml
create mode 120000 tests/qemuxml2xmloutdata/pages-discard-hugepages.xml
create mode 120000 tests/qemuxml2xmloutdata/pages-discard.xml
--
2.17.1
6 years, 4 months
[libvirt] [PATCH v2] storage: add wipeVol to iscsi-direct storage backend
by clem@lse.epita.fr
From: Clementine Hayat <clem(a)lse.epita.fr>
Change set volume capacity to get volume capacity and put the connection
and helpers in one function to avoid code duplicates.
Signed-off-by: Clementine Hayat <clem(a)lse.epita.fr>
---
Set BLOCK_PER_PACKET to 128. Not sure about this value. Should be
potentially tuned.
src/storage/storage_backend_iscsi_direct.c | 173 ++++++++++++++++++---
1 file changed, 152 insertions(+), 21 deletions(-)
diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c
index 0764356b62..958f5937f9 100644
--- a/src/storage/storage_backend_iscsi_direct.c
+++ b/src/storage/storage_backend_iscsi_direct.c
@@ -41,6 +41,8 @@
#define ISCSI_DEFAULT_TARGET_PORT 3260
#define VIR_ISCSI_TEST_UNIT_TIMEOUT 30 * 1000
+#define BLOCK_PER_PACKET 128
+#define VOL_NAME_PREFIX "unit:0:0:"
VIR_LOG_INIT("storage.storage_backend_iscsi_direct");
@@ -225,7 +227,7 @@ virISCSIDirectSetVolumeAttributes(virStoragePoolObjPtr pool,
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
- if (virAsprintf(&vol->name, "unit:0:0:%u", lun) < 0)
+ if (virAsprintf(&vol->name, "%s%u", VOL_NAME_PREFIX, lun) < 0)
return -1;
if (virAsprintf(&vol->key, "ip-%s-iscsi-%s-lun-%u", portal,
def->source.devices[0].path, lun) < 0)
@@ -237,13 +239,13 @@ virISCSIDirectSetVolumeAttributes(virStoragePoolObjPtr pool,
}
static int
-virISCSIDirectSetVolumeCapacity(struct iscsi_context *iscsi,
- virStorageVolDefPtr vol,
- int lun)
+virISCSIDirectGetVolumeCapacity(struct iscsi_context *iscsi,
+ int lun,
+ uint32_t *block_size,
+ uint32_t *nb_block)
{
struct scsi_task *task = NULL;
struct scsi_inquiry_standard *inq = NULL;
- long long size = 0;
int ret = -1;
if (!(task = iscsi_inquiry_sync(iscsi, lun, 0, 0, 64)) ||
@@ -282,10 +284,8 @@ virISCSIDirectSetVolumeCapacity(struct iscsi_context *iscsi,
goto cleanup;
}
- size = rc10->block_size;
- size *= rc10->lba;
- vol->target.capacity = size;
- vol->target.allocation = size;
+ *block_size = rc10->block_size;
+ *nb_block = rc10->lba;
}
@@ -303,6 +303,8 @@ virISCSIDirectRefreshVol(virStoragePoolObjPtr pool,
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
virStorageVolDefPtr vol = NULL;
+ uint32_t block_size;
+ uint32_t nb_block;
int ret = -1;
virStoragePoolObjClearVols(pool);
@@ -314,9 +316,12 @@ virISCSIDirectRefreshVol(virStoragePoolObjPtr pool,
vol->type = VIR_STORAGE_VOL_NETWORK;
- if (virISCSIDirectSetVolumeCapacity(iscsi, vol, lun) < 0)
+ if (virISCSIDirectGetVolumeCapacity(iscsi, lun,
+ &block_size, &nb_block) < 0)
goto cleanup;
+ vol->target.capacity = block_size * nb_block;
+ vol->target.allocation = block_size * nb_block;
def->capacity += vol->target.capacity;
def->allocation += vol->target.allocation;
@@ -553,24 +558,33 @@ virStorageBackendISCSIDirectFindPoolSources(const char *srcSpec,
virStoragePoolSourceFree(source);
return ret;
}
+static int
+virStorageBackendISCSIDirectSetConnection(virStoragePoolObjPtr pool,
+ struct iscsi_context **iscsi,
+ char **portal)
+{
+ virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
+
+ if (!(*iscsi = virISCSIDirectCreateContext(def->source.initiator.iqn)))
+ return -1;
+ if (!(*portal = virStorageBackendISCSIDirectPortal(&def->source)))
+ return -1;
+ if (virStorageBackendISCSIDirectSetAuth(*iscsi, &def->source) < 0)
+ return -1;
+ if (virISCSIDirectSetContext(*iscsi, def->source.devices[0].path, ISCSI_SESSION_NORMAL) < 0)
+ return -1;
+ if (virISCSIDirectConnect(*iscsi, *portal) < 0)
+ return -1;
+ return 0;
+}
static int
virStorageBackendISCSIDirectRefreshPool(virStoragePoolObjPtr pool)
{
- virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
struct iscsi_context *iscsi = NULL;
char *portal = NULL;
int ret = -1;
-
- if (!(iscsi = virISCSIDirectCreateContext(def->source.initiator.iqn)))
- goto cleanup;
- if (!(portal = virStorageBackendISCSIDirectPortal(&def->source)))
- goto cleanup;
- if (virStorageBackendISCSIDirectSetAuth(iscsi, &def->source) < 0)
- goto cleanup;
- if (virISCSIDirectSetContext(iscsi, def->source.devices[0].path, ISCSI_SESSION_NORMAL) < 0)
- goto cleanup;
- if (virISCSIDirectConnect(iscsi, portal) < 0)
+ if (virStorageBackendISCSIDirectSetConnection(pool, &iscsi, &portal) <0)
goto cleanup;
if (virISCSIDirectReportLuns(pool, iscsi, portal) < 0)
goto disconect;
@@ -584,12 +598,129 @@ virStorageBackendISCSIDirectRefreshPool(virStoragePoolObjPtr pool)
return ret;
}
+static int
+virStorageBackendISCSIDirectGetLun(virStorageVolDefPtr vol,
+ int *lun)
+{
+ const char *name = vol->name;
+ int ret = -1;
+
+ if (!STRPREFIX(name, VOL_NAME_PREFIX)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid volume name %s"), name);
+ goto cleanup;
+ }
+
+ name += strlen(VOL_NAME_PREFIX);
+ if (virStrToLong_i(name, NULL, 10, lun) < 0)
+ goto cleanup;
+
+ ret = 0;
+ cleanup:
+ return ret;
+}
+
+static int
+virStorageBackendISCSIDirectVolWipeZero(virStorageVolDefPtr vol,
+ struct iscsi_context *iscsi)
+{
+ uint32_t lba = 0;
+ uint32_t block_size;
+ uint32_t nb_block;
+ struct scsi_task *task = NULL;
+ int lun = 0;
+ int ret = -1;
+ unsigned char *data;
+
+ if (virStorageBackendISCSIDirectGetLun(vol, &lun) < 0)
+ return ret;
+ if (virISCSIDirectTestUnitReady(iscsi, lun) < 0)
+ return ret;
+ if (virISCSIDirectGetVolumeCapacity(iscsi, lun, &block_size, &nb_block))
+ return ret;
+ if (VIR_ALLOC_N(data, block_size * BLOCK_PER_PACKET))
+ return ret;
+
+ while (lba < nb_block) {
+ if (nb_block - lba > block_size * BLOCK_PER_PACKET) {
+
+ if (!(task = iscsi_write10_sync(iscsi, lun, lba, data,
+ block_size * BLOCK_PER_PACKET,
+ block_size, 0, 0, 0, 0, 0)))
+ goto cleanup;
+ scsi_free_scsi_task(task);
+ lba += BLOCK_PER_PACKET;
+ } else {
+ if (!(task = iscsi_write10_sync(iscsi, lun, lba, data, block_size,
+ block_size, 0, 0, 0, 0, 0)))
+ goto cleanup;
+ scsi_free_scsi_task(task);
+ lba++;
+ }
+ }
+
+ ret = 0;
+ cleanup:
+ VIR_FREE(data);
+ return ret;
+}
+
+static int
+virStorageBackenISCSIDirectWipeVol(virStoragePoolObjPtr pool,
+ virStorageVolDefPtr vol,
+ unsigned int algorithm,
+ unsigned int flags)
+{
+ struct iscsi_context *iscsi = NULL;
+ char *portal = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (virStorageBackendISCSIDirectSetConnection(pool, &iscsi, &portal) <0)
+ goto cleanup;
+
+ switch ((virStorageVolWipeAlgorithm) algorithm) {
+ case VIR_STORAGE_VOL_WIPE_ALG_ZERO:
+ if (virStorageBackendISCSIDirectVolWipeZero(vol, iscsi) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("failed to wipe volume %s"),
+ vol->name);
+ goto disconnect;
+ }
+ break;
+ case VIR_STORAGE_VOL_WIPE_ALG_TRIM:
+ case VIR_STORAGE_VOL_WIPE_ALG_NNSA:
+ case VIR_STORAGE_VOL_WIPE_ALG_DOD:
+ case VIR_STORAGE_VOL_WIPE_ALG_BSI:
+ case VIR_STORAGE_VOL_WIPE_ALG_GUTMANN:
+ case VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER:
+ case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7:
+ case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33:
+ case VIR_STORAGE_VOL_WIPE_ALG_RANDOM:
+ case VIR_STORAGE_VOL_WIPE_ALG_LAST:
+ virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %d"),
+ algorithm);
+ goto disconnect;
+ }
+
+ ret = 0;
+ disconnect:
+ virISCSIDirectDisconnect(iscsi);
+ cleanup:
+ VIR_FREE(portal);
+ iscsi_destroy_context(iscsi);
+ return ret;
+}
+
+
virStorageBackend virStorageBackendISCSIDirect = {
.type = VIR_STORAGE_POOL_ISCSI_DIRECT,
.checkPool = virStorageBackendISCSIDirectCheckPool,
.findPoolSources = virStorageBackendISCSIDirectFindPoolSources,
.refreshPool = virStorageBackendISCSIDirectRefreshPool,
+ .wipeVol = virStorageBackenISCSIDirectWipeVol,
};
int
--
2.18.0
6 years, 4 months
[libvirt] [jenkins-ci PATCH] projects: Document rationale for skipping jobs
by Andrea Bolognani
In general, we strive for full coverage and build all
projects on all targets; however, in some cases that's
simply not feasible and we have to skip the corresponding
job. Document the rationale for each such case.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
projects/libvirt-dbus.yaml | 3 +++
projects/libvirt-sandbox.yaml | 3 +++
projects/libvirt-tck.yaml | 2 ++
projects/libvirt.yaml | 2 ++
projects/virt-manager.yaml | 1 +
projects/virt-viewer.yaml | 2 ++
6 files changed, 13 insertions(+)
diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml
index 3212465..88b4c88 100644
--- a/projects/libvirt-dbus.yaml
+++ b/projects/libvirt-dbus.yaml
@@ -18,6 +18,9 @@
- libvirt-freebsd-11
- autotools-check-job:
parent_jobs: 'libvirt-dbus-master-build'
+ # libvirt-dbus' test suite uses Python 3, but Debian 8 doesn't
+ # include a recent enough version and CentOS 7 doesn't include
+ # Python 3 at all
machines:
- libvirt-debian-9
- libvirt-fedora-27
diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml
index da9bf77..6a474c8 100644
--- a/projects/libvirt-sandbox.yaml
+++ b/projects/libvirt-sandbox.yaml
@@ -1,6 +1,9 @@
- project:
name: libvirt-sandbox
+ # libvirt-sandbox is Linux only; among Linux platforms, CentOS 7 has
+ # to be excluded because it doesn't ship a version of xz suitable for
+ # statically linking against
machines:
- libvirt-debian-8
- libvirt-debian-9
diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml
index c406fda..38f8c09 100644
--- a/projects/libvirt-tck.yaml
+++ b/projects/libvirt-tck.yaml
@@ -1,6 +1,8 @@
- project:
name: libvirt-tck
+ # CentOS 7 doesn't include perl-generators, which is necessary to
+ # build libvirt-tck
machines:
- libvirt-debian-8
- libvirt-debian-9
diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml
index c64ac5b..ce4698e 100644
--- a/projects/libvirt.yaml
+++ b/projects/libvirt.yaml
@@ -10,6 +10,8 @@
parent_jobs:
- autotools-syntax-check-job:
parent_jobs: 'libvirt-master-build'
+ # We limit syntax-check to Linux platforms because it calls some
+ # commands with more arguments than FreeBSD supports
machines:
- libvirt-centos-7
- libvirt-debian-8
diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml
index 84a95a6..6f806af 100644
--- a/projects/virt-manager.yaml
+++ b/projects/virt-manager.yaml
@@ -1,6 +1,7 @@
- project:
name: virt-manager
+ # virt-manager is Python 3 only, so it can't be built on CentOS 7
machines:
- libvirt-debian-9
- libvirt-fedora-27
diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml
index e68a23b..9188239 100644
--- a/projects/virt-viewer.yaml
+++ b/projects/virt-viewer.yaml
@@ -13,6 +13,8 @@
parent_jobs: 'virt-viewer-master-syntax-check'
- autotools-rpm-job:
parent_jobs: 'virt-viewer-master-check'
+ # The spec file for virt-viewer requires a very recent version
+ # of spice-gtk, so we have to skip this job on older distros
machines:
- libvirt-fedora-28
- libvirt-fedora-rawhide
--
2.17.1
6 years, 4 months