[libvirt] [PATCH 0/2] qemu: Cancel/forbid migration on I/O error
by Peter Krempa
When qemu has paused itself due to a I/O error it's not safe to migrate it
as it still might contain state in kernel buffers. These patches forbid and
cancel ongoing migration if a I/O error happens.
Peter Krempa (2):
qemu: Cancel migration if guest encoutners I/O error while migrating
qemu: Forbid migration of machines with I/O errors
src/qemu/qemu_migration.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
--
1.8.2.1
11 years, 4 months
[libvirt] [PATCH] qemu: Fix memory leak in Prepare phase
by Jiri Denemark
Avoid leaking virDomainDef if Prepare phase fails before it gets to
qemuMigrationPrepareAny.
---
src/qemu/qemu_driver.c | 12 ++++--------
src/qemu/qemu_migration.c | 29 ++++++++++++++---------------
src/qemu/qemu_migration.h | 4 ++--
3 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3bad629..621e184 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9552,8 +9552,7 @@ qemuDomainMigratePrepareTunnel(virConnectPtr dconn,
ret = qemuMigrationPrepareTunnel(driver, dconn,
NULL, 0, NULL, NULL, /* No cookies in v2 */
- st, def, flags);
- def = NULL;
+ st, &def, flags);
cleanup:
virDomainDefFree(def);
@@ -9628,8 +9627,7 @@ qemuDomainMigratePrepare2(virConnectPtr dconn,
ret = qemuMigrationPrepareDirect(driver, dconn,
NULL, 0, NULL, NULL, /* No cookies */
uri_in, uri_out,
- def, flags);
- def = NULL;
+ &def, flags);
cleanup:
virDomainDefFree(def);
@@ -9864,8 +9862,7 @@ qemuDomainMigratePrepare3(virConnectPtr dconn,
cookiein, cookieinlen,
cookieout, cookieoutlen,
uri_in, uri_out,
- def, flags);
- def = NULL;
+ &def, flags);
cleanup:
virDomainDefFree(def);
@@ -9926,8 +9923,7 @@ qemuDomainMigratePrepareTunnel3(virConnectPtr dconn,
ret = qemuMigrationPrepareTunnel(driver, dconn,
cookiein, cookieinlen,
cookieout, cookieoutlen,
- st, def, flags);
- def = NULL;
+ st, &def, flags);
cleanup:
virDomainDefFree(def);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index dec04a5..0a54a30 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2016,7 +2016,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
int cookieinlen,
char **cookieout,
int *cookieoutlen,
- virDomainDefPtr def,
+ virDomainDefPtr *def,
virStreamPtr st,
unsigned int port,
unsigned long flags)
@@ -2064,7 +2064,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!qemuMigrationIsAllowed(driver, NULL, def, true))
+ if (!qemuMigrationIsAllowed(driver, NULL, *def, true))
goto cleanup;
/* Let migration hook filter domain XML */
@@ -2072,12 +2072,12 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
char *xml;
int hookret;
- if (!(xml = qemuDomainDefFormatXML(driver, def,
+ if (!(xml = qemuDomainDefFormatXML(driver, *def,
VIR_DOMAIN_XML_SECURE |
VIR_DOMAIN_XML_MIGRATABLE)))
goto cleanup;
- hookret = virHookCall(VIR_HOOK_DRIVER_QEMU, def->name,
+ hookret = virHookCall(VIR_HOOK_DRIVER_QEMU, (*def)->name,
VIR_HOOK_QEMU_OP_MIGRATE, VIR_HOOK_SUBOP_BEGIN,
NULL, xml, &xmlout);
VIR_FREE(xml);
@@ -2098,13 +2098,13 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
if (!newdef)
goto cleanup;
- if (!virDomainDefCheckABIStability(def, newdef)) {
+ if (!virDomainDefCheckABIStability(*def, newdef)) {
virDomainDefFree(newdef);
goto cleanup;
}
- virDomainDefFree(def);
- def = newdef;
+ virDomainDefFree(*def);
+ *def = newdef;
}
}
}
@@ -2122,7 +2122,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
.ai_socktype = SOCK_STREAM };
if (!(qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
- def->emulator)))
+ (*def)->emulator)))
goto cleanup;
/* Listen on :: instead of 0.0.0.0 if QEMU understands it
@@ -2146,14 +2146,14 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
}
}
- if (!(vm = virDomainObjListAdd(driver->domains, def,
+ if (!(vm = virDomainObjListAdd(driver->domains, *def,
driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
- def = NULL;
+ *def = NULL;
priv = vm->privateData;
priv->origname = origname;
origname = NULL;
@@ -2272,7 +2272,6 @@ cleanup:
VIR_FREE(migrateFrom);
VIR_FREE(origname);
VIR_FREE(xmlout);
- virDomainDefFree(def);
VIR_FORCE_CLOSE(dataFD[0]);
VIR_FORCE_CLOSE(dataFD[1]);
if (vm) {
@@ -2315,7 +2314,7 @@ qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
char **cookieout,
int *cookieoutlen,
virStreamPtr st,
- virDomainDefPtr def,
+ virDomainDefPtr *def,
unsigned long flags)
{
int ret;
@@ -2324,7 +2323,7 @@ qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
"cookieout=%p, cookieoutlen=%p, st=%p, def=%p, "
"flags=%lx",
driver, dconn, NULLSTR(cookiein), cookieinlen,
- cookieout, cookieoutlen, st, def, flags);
+ cookieout, cookieoutlen, st, *def, flags);
ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
cookieout, cookieoutlen, def,
@@ -2342,7 +2341,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
int *cookieoutlen,
const char *uri_in,
char **uri_out,
- virDomainDefPtr def,
+ virDomainDefPtr *def,
unsigned long flags)
{
static int port = 0;
@@ -2358,7 +2357,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
"def=%p, flags=%lx",
driver, dconn, NULLSTR(cookiein), cookieinlen,
cookieout, cookieoutlen, NULLSTR(uri_in), uri_out,
- def, flags);
+ *def, flags);
/* The URI passed in may be NULL or a string "tcp://somehostname:port".
*
diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h
index b42fe4e..22b04b4 100644
--- a/src/qemu/qemu_migration.h
+++ b/src/qemu/qemu_migration.h
@@ -98,7 +98,7 @@ int qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
char **cookieout,
int *cookieoutlen,
virStreamPtr st,
- virDomainDefPtr def,
+ virDomainDefPtr *def,
unsigned long flags);
int qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
@@ -109,7 +109,7 @@ int qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
int *cookieoutlen,
const char *uri_in,
char **uri_out,
- virDomainDefPtr def,
+ virDomainDefPtr *def,
unsigned long flags);
int qemuMigrationPerform(virQEMUDriverPtr driver,
--
1.8.2.1
11 years, 4 months
[libvirt] [PATCH v3] selinux: assume 's0' if the range is empty
by Ján Tomko
This fixes a crash:
https://bugzilla.redhat.com/show_bug.cgi?id=969878
---
v3:
rewrote the patch to assume 's0' if the range is empty, instead
of reporting an error
v2:
https://www.redhat.com/archives/libvir-list/2013-June/msg00082.html
src/security/security_selinux.c | 9 +++++++--
tests/securityselinuxtest.c | 6 ++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index b862fbf..6fe063e 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -170,11 +170,13 @@ virSecuritySELinuxMCSFind(virSecurityManagerPtr mgr,
/*
* This needs to cope with several styles of range
*
+ * system_u:system_r:virtd_t
* system_u:system_r:virtd_t:s0
* system_u:system_r:virtd_t:s0-s0
* system_u:system_r:virtd_t:s0-s0:c0.c1023
*
- * In the first two cases, we'll assume c0.c1023 for
+ * In the first case we'll assume s0:c0.c1023 and
+ * in the next two cases, we'll assume c0.c1023 for
* the category part, since that's what we're really
* interested in. This won't work in Enforcing mode,
* but will prevent libvirtd breaking in Permissive
@@ -189,6 +191,7 @@ virSecuritySELinuxMCSGetProcessRange(char **sens,
context_t ourContext = NULL;
char *cat = NULL;
char *tmp;
+ const char *contextRange;
int ret = -1;
if (getcon_raw(&ourSecContext) < 0) {
@@ -202,8 +205,10 @@ virSecuritySELinuxMCSGetProcessRange(char **sens,
ourSecContext);
goto cleanup;
}
+ if (!(contextRange = context_range_get(ourContext)))
+ contextRange = "s0";
- if (VIR_STRDUP(*sens, context_range_get(ourContext)) < 0)
+ if (VIR_STRDUP(*sens, contextRange) < 0)
goto cleanup;
/* Find and blank out the category part (if any) */
diff --git a/tests/securityselinuxtest.c b/tests/securityselinuxtest.c
index bdf248b..8d85c68 100644
--- a/tests/securityselinuxtest.c
+++ b/tests/securityselinuxtest.c
@@ -333,6 +333,12 @@ mymain(void)
"system_u", "system_r", "object_r",
"svirt_t", "svirt_image_t",
2, 3, 0, 1023);
+ DO_TEST_GEN_LABEL("dynamic virtd, missing range",
+ "system_u:system_r:virtd_t",
+ true, NULL, NULL,
+ "system_u", "system_r", "object_r",
+ "svirt_t", "svirt_image_t",
+ 0, 0, 0, 1023);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH] qemu_migrate: Dispose listen address if set from config
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=971485
As of d7f9d827531bc843b7c5aa9d3e8c08738a1de248 we copy the listen
address from the qemu.conf config file in case none has been provided
via XML. But later, when migrating, we should not include such listen
address in the migratable XML as it is something autogenerated, not
requested by user. Moreover, the binding to the listen address will
likely fail, unless the address is '0.0.0.0' or its IPv6 equivalent.
This patch introduces a new boolean attribute to virDomainGraphicsListenDef
to distinguish autofilled listen addresses. However, we must keep the
attribute over libvirtd restarts, so it must be kept within status XML.
---
src/conf/domain_conf.c | 28 ++++++++++++++++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_process.c | 1 +
3 files changed, 30 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3e81013..2373397 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7688,6 +7688,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
char *type = virXMLPropString(node, "type");
char *address = virXMLPropString(node, "address");
char *network = virXMLPropString(node, "network");
+ char *fromConfig = virXMLPropString(node, "fromConfig");
+ int tmp;
if (!type) {
virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -7724,6 +7726,17 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
network = NULL;
}
+ if (fromConfig &&
+ flags & VIR_DOMAIN_XML_INTERNAL_STATUS) {
+ if (virStrToLong_i(fromConfig, NULL, 10, &tmp) < 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Invalid fromConfig value: %s"),
+ fromConfig);
+ goto error;
+ }
+ def->fromConfig = tmp != 0;
+ }
+
ret = 0;
error:
if (ret < 0)
@@ -7731,6 +7744,7 @@ error:
VIR_FREE(type);
VIR_FREE(address);
VIR_FREE(network);
+ VIR_FREE(fromConfig);
return ret;
}
@@ -15365,6 +15379,11 @@ virDomainGraphicsListenDefFormat(virBufferPtr buf,
virDomainGraphicsListenDefPtr def,
unsigned int flags)
{
+ /* If generating migratable XML, skip listen address
+ * dragged in from config file */
+ if ((flags & VIR_DOMAIN_XML_MIGRATABLE) && def->fromConfig)
+ return;
+
virBufferAddLit(buf, " <listen");
if (def->type) {
@@ -15386,6 +15405,9 @@ virDomainGraphicsListenDefFormat(virBufferPtr buf,
virBufferEscapeString(buf, " network='%s'", def->network);
}
+ if (flags & VIR_DOMAIN_XML_INTERNAL_STATUS)
+ virBufferAsprintf(buf, " fromConfig='%d'", def->fromConfig);
+
virBufferAddLit(buf, "/>\n");
}
@@ -15412,6 +15434,9 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
for (i = 0; i < def->nListens; i++) {
if (virDomainGraphicsListenGetType(def, i)
== VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS) {
+ if (flags & VIR_DOMAIN_XML_MIGRATABLE &&
+ def->listens[i].fromConfig)
+ continue;
listenAddr = virDomainGraphicsListenGetAddress(def, i);
break;
}
@@ -15531,6 +15556,9 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
if (virDomainGraphicsListenGetType(def, i)
== VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE)
continue;
+ if (flags & VIR_DOMAIN_XML_MIGRATABLE &&
+ def->listens[i].fromConfig)
+ continue;
if (!children) {
virBufferAddLit(buf, ">\n");
children = true;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b8edb1e..5b159ac 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1420,6 +1420,7 @@ struct _virDomainGraphicsListenDef {
int type; /* enum virDomainGraphicsListenType */
char *address;
char *network;
+ bool fromConfig; /* true if the @address is config file originated */
};
struct _virDomainGraphicsDef {
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index c412ea2..5a0f18b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3486,6 +3486,7 @@ int qemuProcessStart(virConnectPtr conn,
VIR_SHRINK_N(graphics->listens, graphics->nListens, 1);
goto cleanup;
}
+ graphics->listens[0].fromConfig = true;
}
}
}
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH for v1.0.5-maint] Fix use of VIR_STRDUP vs strdup
by Doug Goldstein
Commit 894f784948a93760629de3cb195c69ef4f4b831f broke the v1.0.5-maint
branch because VIR_STRDUP() didn't exist in the v1.0.5 release so the
resulting build is missing that symbol.
This patch is only for the v1.0.5-maint branch.
---
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d96805a..606194c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1223,7 +1223,7 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
virReportOOMError();
goto error;
}
- } else if (VIR_STRDUP(hoststr, host) < 0) {
+ } else if ((hoststr = strdup(host)) == NULL) {
goto error;
}
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH] LXC: Allow to input relative path of program for lxc-enter-namespace
by Gao feng
User execvp to replace execv, so user can use
relative path to exec programs in container.
Such as "lxc-enter-namespace domain ls"
And the user can still use absolute path to
exec programs.
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 955e882..8161b23 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -7902,7 +7902,7 @@ cmdLxcEnterNamespace(vshControl *ctl, const vshCmd *cmd)
if (virFork(&pid) < 0)
_exit(255);
if (pid == 0) {
- execv(cmdargv[0], cmdargv);
+ execvp(cmdargv[0], cmdargv);
_exit(255);
} else {
if (virProcessWait(pid, NULL) < 0)
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH] remote: fix dom->id after virDomainCreateWithFlags
by Marek Marczykowski
The same issue as (already fixed) in virDomainCreate -
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS doesn't return new domain ID, only
-1 on error or 0 on success.
Besides this one fix it is more general problem - local domain object
ID can desynchronize with the real one, for example in case of another
client creates/destroys domain in the meantime. Perhaps virDomainGetID
should be called remotely (with all performance implications...)? Or
some event-based notification used?
Signed-off-by: Marek Marczykowski <marmarek(a)invisiblethingslab.com>
---
src/remote/remote_driver.c | 40 ++++++++++++++++++++++++++++++++++++++++
src/remote/remote_protocol.x | 2 +-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index f66304c..0bbfc22 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2423,6 +2423,46 @@ done:
return rv;
}
+static int
+remoteDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
+{
+ int rv = -1;
+ struct private_data *priv = dom->conn->privateData;
+ remote_domain_create_with_flags_args args;
+ remote_domain_lookup_by_uuid_args args2;
+ remote_domain_lookup_by_uuid_ret ret2;
+
+ remoteDriverLock(priv);
+
+ make_nonnull_domain(&args.dom, dom);
+ args.flags = flags;
+
+ if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS,
+ (xdrproc_t)xdr_remote_domain_create_with_flags_args, (char *)&args,
+ (xdrproc_t)xdr_void, (char *)NULL) == -1) {
+ goto done;
+ }
+
+ /* Need to do a lookup figure out ID of newly started guest, because
+ * bug in design of REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS means we aren't getting
+ * it returned.
+ */
+ memcpy(args2.uuid, dom->uuid, VIR_UUID_BUFLEN);
+ memset(&ret2, 0, sizeof(ret2));
+ if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID,
+ (xdrproc_t) xdr_remote_domain_lookup_by_uuid_args, (char *) &args2,
+ (xdrproc_t) xdr_remote_domain_lookup_by_uuid_ret, (char *) &ret2) == -1)
+ goto done;
+
+ dom->id = ret2.dom.id;
+ xdr_free((xdrproc_t) &xdr_remote_domain_lookup_by_uuid_ret, (char *) &ret2);
+ rv = 0;
+
+done:
+ remoteDriverUnlock(priv);
+ return rv;
+}
+
static char *
remoteDomainGetSchedulerType(virDomainPtr domain, int *nparams)
{
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 512ba2e..d2e0175 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -3875,7 +3875,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
/**
- * @generate: both
+ * @generate: server
*/
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH] storage_backend: Drop unused code
by Cole Robinson
This has been disabled for years
---
src/storage/storage_backend.c | 32 +++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index e5c9209..0fd4598 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -115,8 +115,6 @@ static virStorageBackendPtr backends[] = {
NULL
};
-static int track_allocation_progress = 0;
-
enum {
TOOL_QEMU_IMG,
TOOL_KVM_IMG,
@@ -342,31 +340,11 @@ createRawFile(int fd, virStorageVolDefPtr vol,
}
if (remain) {
- if (track_allocation_progress) {
- while (remain) {
- /* Allocate in chunks of 512MiB: big-enough chunk
- * size and takes approx. 9s on ext3. A progress
- * update every 9s is a fair-enough trade-off
- */
- unsigned long long bytes = 512 * 1024 * 1024;
-
- if (bytes > remain)
- bytes = remain;
- if (safezero(fd, vol->allocation - remain, bytes) < 0) {
- ret = -errno;
- virReportSystemError(errno, _("cannot fill file '%s'"),
- vol->target.path);
- goto cleanup;
- }
- remain -= bytes;
- }
- } else { /* No progress bars to be shown */
- if (safezero(fd, 0, remain) < 0) {
- ret = -errno;
- virReportSystemError(errno, _("cannot fill file '%s'"),
- vol->target.path);
- goto cleanup;
- }
+ if (safezero(fd, 0, remain) < 0) {
+ ret = -errno;
+ virReportSystemError(errno, _("cannot fill file '%s'"),
+ vol->target.path);
+ goto cleanup;
}
}
--
1.8.2.1
11 years, 4 months
[libvirt] [PATCH] virSocketAddrIsWildcard: Use IN6_IS_ADDR_UNSPECIFIED correctly
by Michal Privoznik
The IN6_IS_ADDR_UNSPECIFIED macro expects pointer to sin6_addr element
instead of s6_addr element.
---
src/util/virsocketaddr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
index e84c58e..2666574 100644
--- a/src/util/virsocketaddr.c
+++ b/src/util/virsocketaddr.c
@@ -241,7 +241,7 @@ virSocketAddrIsWildcard(const virSocketAddrPtr addr)
return memcmp(&addr->data.inet4.sin_addr.s_addr, &tmp,
sizeof(addr->data.inet4.sin_addr.s_addr)) == 0;
case AF_INET6:
- return IN6_IS_ADDR_UNSPECIFIED(&addr->data.inet6.sin6_addr.s6_addr);
+ return IN6_IS_ADDR_UNSPECIFIED(&addr->data.inet6.sin6_addr);
}
return false;
}
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH 0/6] Support to use iscsi storage in domain conf
by Osier Yang
This supports to use libvirt iscsi storage volume for qemu with
either the LUN's path on host (e.g. /dev/disk/by-path/*-lun-1),
or the the libiscsi uri (e.g iscsi://demo.org:6000/$iqn/1)in
domain conf.
Osier Yang (6):
storage_iscsi: Reflect the default target port
conf: Introduce new XML tag "mode" for disk source
qemu: Translate the iscsi pool/volume disk source
security: Ignore to manage the volume type disk if its mode is uri
conf: Ignore the volume type disk if its mode is "uri"
qemu: Translate the volume type disk source before cgroup setting
docs/formatdomain.html.in | 9 ++-
docs/schemas/domaincommon.rng | 8 +++
src/conf/domain_conf.c | 71 +++++++++++++++++++++-
src/conf/domain_conf.h | 25 ++++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 20 ++++--
src/qemu/qemu_conf.c | 117 +++++++++++++++++++++++++++++-------
src/qemu/qemu_process.c | 13 ++--
src/security/security_apparmor.c | 10 ++-
src/security/security_dac.c | 10 ++-
src/security/security_selinux.c | 10 ++-
src/storage/storage_backend_iscsi.c | 6 +-
tests/qemuxml2xmltest.c | 1 +
13 files changed, 261 insertions(+), 40 deletions(-)
--
1.8.1.4
11 years, 4 months