[libvirt] [PATCHv3] Trivially support DomainHasManagedSaveImage
by Ján Tomko
Return 0 instead of ERR_NO_SUPPORT in each driver
where we don't support managed save or -1 if
the domain does not exist.
This avoids spamming daemon logs when 'virsh dominfo' is run.
https://bugzilla.redhat.com/show_bug.cgi?id=1095637
---
src/bhyve/bhyve_driver.c | 25 +++++++++++++-
src/esx/esx_driver.c | 39 ++++++++++++++++++++-
src/lxc/lxc_driver.c | 26 +++++++++++++-
src/openvz/openvz_driver.c | 28 ++++++++++++++-
src/parallels/parallels_driver.c | 20 ++++++++++-
src/phyp/phyp_driver.c | 29 +++++++++++++++-
src/uml/uml_driver.c | 33 +++++++++++++++++-
src/vbox/vbox_common.c | 73 +++++++++++++++++++++++++++++++++++++++-
src/vmware/vmware_driver.c | 27 ++++++++++++++-
src/xenapi/xenapi_driver.c | 27 ++++++++++++++-
10 files changed, 317 insertions(+), 10 deletions(-)
v2: implement the function in all drivers, not just LXC
v3: also check if the domain exists
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 56cc8ab..ae39917 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -2,7 +2,7 @@
* bhyve_driver.c: core driver methods for managing bhyve guests
*
* Copyright (C) 2014 Roman Bogorodskiy
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (C) 2014-2015 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1430,6 +1430,28 @@ bhyveConnectDomainEventDeregisterAny(virConnectPtr conn,
return 0;
}
+static int
+bhyveDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = bhyveDomObjFromDomain(domain)))
+ goto cleanup;
+
+ if (virDomainHasManagedSaveImageEnsureACL(domain->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
static virHypervisorDriver bhyveHypervisorDriver = {
.name = "bhyve",
.connectOpen = bhyveConnectOpen, /* 1.2.2 */
@@ -1476,6 +1498,7 @@ static virHypervisorDriver bhyveHypervisorDriver = {
.connectCompareCPU = bhyveConnectCompareCPU, /* 1.2.4 */
.connectDomainEventRegisterAny = bhyveConnectDomainEventRegisterAny, /* 1.2.5 */
.connectDomainEventDeregisterAny = bhyveConnectDomainEventDeregisterAny, /* 1.2.5 */
+ .domainHasManagedSaveImage = bhyveDomainHasManagedSaveImage, /* 1.2.13 */
};
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 6b9965f..179f44c 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -1,7 +1,7 @@
/*
* esx_driver.c: core driver functions for managing VMware ESX hosts
*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2009-2014 Matthias Bolte <matthias.bolte(a)googlemail.com>
* Copyright (C) 2009 Maximilian Wilhelm <max(a)rfc2324.org>
*
@@ -5147,6 +5147,42 @@ esxConnectListAllDomains(virConnectPtr conn,
}
#undef MATCH
+static int
+esxDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
+{
+ int result = -1;
+ esxPrivate *priv = domain->conn->privateData;
+ esxVI_ManagedObjectReference *managedObjectReference = NULL;
+ char uuid_string[VIR_UUID_STRING_BUFLEN] = "";
+
+ virCheckFlags(0, -1);
+
+ if (esxVI_EnsureSession(priv->primary) < 0)
+ return -1;
+
+ virUUIDFormat(domain->uuid, uuid_string);
+
+ if (esxVI_FindByUuid(priv->primary, priv->primary->datacenter->_reference,
+ uuid_string, esxVI_Boolean_True,
+ esxVI_Boolean_Undefined,
+ &managedObjectReference) < 0) {
+ return -1;
+ }
+
+ if (!managedObjectReference) {
+ virReportError(VIR_ERR_NO_DOMAIN,
+ _("Could not find domain with UUID '%s'"),
+ uuid_string);
+ goto cleanup;
+ }
+
+ result = 0;
+
+ cleanup:
+ esxVI_ManagedObjectReference_Free(&managedObjectReference);
+ return result;
+}
+
static virHypervisorDriver esxHypervisorDriver = {
.name = "ESX",
@@ -5226,6 +5262,7 @@ static virHypervisorDriver esxHypervisorDriver = {
.domainSnapshotHasMetadata = esxDomainSnapshotHasMetadata, /* 0.9.13 */
.domainSnapshotDelete = esxDomainSnapshotDelete, /* 0.8.0 */
.connectIsAlive = esxConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = esxDomainHasManagedSaveImage, /* 1.2.13 */
};
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 487e2a2..3adb21d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
* lxc_driver.c: linux container driver functions
@@ -5726,6 +5726,29 @@ lxcNodeAllocPages(virConnectPtr conn,
}
+static int
+lxcDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = lxcDomObjFromDomain(dom)))
+ return ret;
+
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
/* Function Tables */
static virHypervisorDriver lxcHypervisorDriver = {
.name = LXC_DRIVER_NAME,
@@ -5818,6 +5841,7 @@ static virHypervisorDriver lxcHypervisorDriver = {
.domainLxcOpenNamespace = lxcDomainLxcOpenNamespace, /* 1.0.2 */
.nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver lxcConnectDriver = {
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 556f626..5a5cd8d 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1,7 +1,7 @@
/*
* openvz_driver.c: core driver methods for managing OpenVZ VEs
*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2006, 2007 Binary Karma
* Copyright (C) 2006 Shuveb Hussain
* Copyright (C) 2007 Anoop Joe Cyriac
@@ -2567,6 +2567,31 @@ openvzDomainMigrateConfirm3Params(virDomainPtr domain,
return ret;
}
+static int
+openvzDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ struct openvz_driver *driver = dom->conn->privateData;
+ virDomainObjPtr obj;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ openvzDriverLock(driver);
+ obj = virDomainObjListFindByUUID(driver->domains, dom->uuid);
+ openvzDriverUnlock(driver);
+ if (!obj) {
+ virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ goto cleanup;
+ }
+ ret = 0;
+
+ cleanup:
+ if (obj)
+ virObjectUnlock(obj);
+ return ret;
+}
+
+
static virHypervisorDriver openvzHypervisorDriver = {
.name = "OPENVZ",
@@ -2632,6 +2657,7 @@ static virHypervisorDriver openvzHypervisorDriver = {
.domainMigratePerform3Params = openvzDomainMigratePerform3Params, /* 1.2.8 */
.domainMigrateFinish3Params = openvzDomainMigrateFinish3Params, /* 1.2.8 */
.domainMigrateConfirm3Params = openvzDomainMigrateConfirm3Params, /* 1.2.8 */
+ .domainHasManagedSaveImage = openvzDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver openvzConnectDriver = {
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index b569160..c9338b5 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -2,7 +2,7 @@
* parallels_driver.c: core driver functions for managing
* Parallels Cloud Server hosts
*
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (C) 2014-2015 Red Hat, Inc.
* Copyright (C) 2012 Parallels, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -956,6 +956,23 @@ parallelsDomainUndefine(virDomainPtr domain)
return parallelsDomainUndefineFlags(domain, 0);
}
+static int
+parallelsDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
+{
+ parallelsConnPtr privconn = domain->conn->privateData;
+ virDomainObjPtr dom = NULL;
+
+ virCheckFlags(0, -1);
+
+ dom = virDomainObjListFindByUUID(privconn->domains, domain->uuid);
+ if (dom == NULL) {
+ parallelsDomNotFoundError(domain);
+ return -1;
+ }
+
+ return 0;
+}
+
static virHypervisorDriver parallelsDriver = {
.name = "Parallels",
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
@@ -997,6 +1014,7 @@ static virHypervisorDriver parallelsDriver = {
.connectIsEncrypted = parallelsConnectIsEncrypted, /* 1.2.5 */
.connectIsSecure = parallelsConnectIsSecure, /* 1.2.5 */
.connectIsAlive = parallelsConnectIsAlive, /* 1.2.5 */
+ .domainHasManagedSaveImage = parallelsDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver parallelsConnectDriver = {
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 6c5a91e..d05f897 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright IBM Corp. 2009
*
* phyp_driver.c: ssh layer to access Power Hypervisors
@@ -3669,6 +3669,32 @@ phypDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
return phypDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_VCPU_LIVE);
}
+static int
+phypDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+
+ phyp_driverPtr phyp_driver = dom->conn->privateData;
+ LIBSSH2_SESSION *session = phyp_driver->session;
+ char *managed_system = phyp_driver->managed_system;
+ char *lpar_name = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ lpar_name = phypGetLparNAME(session, managed_system, dom->id, dom->conn);
+
+ if (lpar_name == NULL) {
+ VIR_ERROR(_("Unable to determine domain's name."));
+ goto cleanup;
+ }
+
+ ret = 0;
+
+ cleanup:
+ VIR_FREE(lpar_name);
+ return ret;
+}
+
static virHypervisorDriver phypHypervisorDriver = {
.name = "PHYP",
.connectOpen = phypConnectOpen, /* 0.7.0 */
@@ -3698,6 +3724,7 @@ static virHypervisorDriver phypHypervisorDriver = {
.connectIsSecure = phypConnectIsSecure, /* 0.7.3 */
.domainIsUpdated = phypDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = phypConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = phypDomainHasManagedSaveImage, /* 1.2.13 */
};
static virStorageDriver phypStorageDriver = {
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 6ca038a..68efd18 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1,7 +1,7 @@
/*
* uml_driver.c: core driver methods for managing UML guests
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -2943,6 +2943,36 @@ umlNodeAllocPages(virConnectPtr conn,
}
+static int
+umlDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ struct uml_driver *driver = dom->conn->privateData;
+ int ret = -1;
+ virDomainObjPtr vm;
+
+ virCheckFlags(0, -1);
+
+ umlDriverLock(driver);
+ vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
+ umlDriverUnlock(driver);
+
+ if (!vm) {
+ virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ goto cleanup;
+ }
+
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
static virHypervisorDriver umlHypervisorDriver = {
.name = "UML",
.connectOpen = umlConnectOpen, /* 0.5.0 */
@@ -3006,6 +3036,7 @@ static virHypervisorDriver umlHypervisorDriver = {
.nodeSetMemoryParameters = umlNodeSetMemoryParameters, /* 0.10.2 */
.nodeGetFreePages = umlNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = umlNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = umlDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver umlConnectDriver = {
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index bd3f50c..deca490 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2014, Taowei Luo (uaedante(a)gmail.com)
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -7588,6 +7588,76 @@ vboxNodeAllocPages(virConnectPtr conn ATTRIBUTE_UNUSED,
startCell, cellCount, add);
}
+static int
+vboxDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ vboxGlobalData *data = dom->conn->privateData;
+ vboxArray machines = VBOX_ARRAY_INITIALIZER;
+ vboxIIDUnion iid;
+ char *machineNameUtf8 = NULL;
+ PRUnichar *machineNameUtf16 = NULL;
+ unsigned char uuid[VIR_UUID_BUFLEN];
+ size_t i;
+ bool matched = false;
+ nsresult rc;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!data->vboxObj)
+ return ret;
+
+ VBOX_IID_INITIALIZE(&iid);
+ rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
+ if (NS_FAILED(rc)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ return ret;
+ }
+
+ for (i = 0; i < machines.count; ++i) {
+ IMachine *machine = machines.items[i];
+ PRBool isAccessible = PR_FALSE;
+
+ if (!machine)
+ continue;
+
+ gVBoxAPI.UIMachine.GetAccessible(machine, &isAccessible);
+ if (!isAccessible)
+ continue;
+
+ gVBoxAPI.UIMachine.GetId(machine, &iid);
+ if (NS_FAILED(rc))
+ continue;
+ vboxIIDToUUID(&iid, uuid);
+ vboxIIDUnalloc(&iid);
+
+ if (memcmp(dom->uuid, uuid, VIR_UUID_BUFLEN) == 0) {
+
+ PRUint32 state;
+
+ matched = true;
+
+ gVBoxAPI.UIMachine.GetName(machine, &machineNameUtf16);
+ VBOX_UTF16_TO_UTF8(machineNameUtf16, &machineNameUtf8);
+
+ gVBoxAPI.UIMachine.GetState(machine, &state);
+
+ ret = 0;
+ }
+
+ if (matched)
+ break;
+ }
+
+ /* Do the cleanup and take care you dont leak any memory */
+ VBOX_UTF8_FREE(machineNameUtf8);
+ VBOX_COM_UNALLOC_MEM(machineNameUtf16);
+ gVBoxAPI.UArray.vboxArrayRelease(&machines);
+
+ return ret;
+}
+
/**
* Function Tables
@@ -7661,6 +7731,7 @@ virHypervisorDriver vboxCommonDriver = {
.connectIsAlive = vboxConnectIsAlive, /* 0.9.8 */
.nodeGetFreePages = vboxNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = vboxNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = vboxDomainHasManagedSaveImage, /* 1.2.13 */
};
static void updateDriver(void)
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 2d7ba04..fb7fa5b 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -1,6 +1,6 @@
/*---------------------------------------------------------------------------*/
/*
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2015 Red Hat, Inc.
* Copyright 2010, diateam (www.diateam.net)
* Copyright (C) 2013. Doug Goldstein <cardoe(a)cardoe.com>
*
@@ -1195,6 +1195,30 @@ vmwareConnectListAllDomains(virConnectPtr conn,
return ret;
}
+static int
+vmwareDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ struct vmware_driver *driver = dom->conn->privateData;
+ virDomainObjPtr obj;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ vmwareDriverLock(driver);
+ obj = virDomainObjListFindByUUID(driver->domains, dom->uuid);
+ vmwareDriverUnlock(driver);
+ if (!obj) {
+ virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ goto cleanup;
+ }
+ ret = 0;
+
+ cleanup:
+ if (obj)
+ virObjectUnlock(obj);
+ return ret;
+}
+
static virHypervisorDriver vmwareHypervisorDriver = {
@@ -1233,6 +1257,7 @@ static virHypervisorDriver vmwareHypervisorDriver = {
.domainIsActive = vmwareDomainIsActive, /* 0.8.7 */
.domainIsPersistent = vmwareDomainIsPersistent, /* 0.8.7 */
.connectIsAlive = vmwareConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = vmwareDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver vmwareConnectDriver = {
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 0902f9a..afb6d6c 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1,6 +1,6 @@
/*
* xenapi_driver.c: Xen API driver.
- * Copyright (C) 2011-2014 Red Hat, Inc.
+ * Copyright (C) 2011-2015 Red Hat, Inc.
* Copyright (C) 2009, 2010 Citrix Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -1977,6 +1977,30 @@ xenapiConnectIsAlive(virConnectPtr conn)
return 0;
}
+static int
+xenapiDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ struct xen_vm_set *vms;
+ xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
+
+ virCheckFlags(0, -1);
+
+ if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
+ if (vms->size != 1) {
+ xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR,
+ _("Domain name is not unique"));
+ xen_vm_set_free(vms);
+ return -1;
+ }
+ xen_vm_set_free(vms);
+ return 0;
+ }
+ if (vms)
+ xen_vm_set_free(vms);
+ xenapiSessionErrorHandler(dom->conn, VIR_ERR_NO_DOMAIN, NULL);
+ return -1;
+}
+
/* The interface which we export upwards to libvirt.c. */
static virHypervisorDriver xenapiHypervisorDriver = {
.name = "XenAPI",
@@ -2029,6 +2053,7 @@ static virHypervisorDriver xenapiHypervisorDriver = {
.nodeGetFreeMemory = xenapiNodeGetFreeMemory, /* 0.8.0 */
.domainIsUpdated = xenapiDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = xenapiConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = xenapiDomainHasManagedSaveImage, /* 1.2.13 */
};
--
2.0.5
9 years, 10 months
[libvirt] [PATCH 0/2] Interface backend attribute improvements
by Ján Tomko
Both for
https://bugzilla.redhat.com/show_bug.cgi?id=1147195
Ján Tomko (2):
Only parse custom vhost path for virtio interfaces
Error out when custom tap device path makes no sense
src/conf/domain_conf.c | 6 +++-
src/qemu/qemu_command.c | 17 +++++++++-
.../qemuxml2argv-tap-vhost-incorrect.xml | 39 ++++++++++++++++++++++
.../qemuxml2xmlout-tap-vhost-incorrect.xml | 38 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
5 files changed, 99 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
--
2.0.5
9 years, 10 months
[libvirt] 答复: Re: [PATCH 0/3] Prevent removing a in-used static bridge and destroying a in-used virtual network
by Lin Ma
>>>> "Daniel P. Berrange" <berrange(a)redhat.com> 2015-2-4 下午 23:10 >>>
>On Wed, Feb 04, 2015 at 02:21:18AM -0500, Laine Stump wrote:
>> On 02/03/2015 11:47 AM, Michal Privoznik wrote:
>> > On 02.02.2015 15:08, Lin Ma wrote:
>> >> * Get the live state info of a virtual network through netcf in networkGetXMLDesc.
>> >> * Add --system flag for net-dumpxml to show the live state info.
>> >> * Check the live state info in net-destroy.
>> >> * Add --force flag for net-destroy to forcibly destroy the virtual network.
>> >> * Check the transient interfaces info in iface-unbridge.
>> >>
>> >> ---
>> >> Lin Ma (3):
>> >> bridge_driver: Return the live state info of a given virtual network
>> >> virsh: prevent destroying a in-used network for net-destroy
>> >> virsh: prevent removing a in-used bridge for iface-unbridge
>> >>
>> >> include/libvirt/libvirt-network.h | 1 +
>> >> src/Makefile.am | 3 +
>> >> src/network/bridge_driver.c | 141 ++++++++++++++++++++++++++++++++++-
>> >> src/network/bridge_driver_platform.h | 7 ++
>> >> tests/Makefile.am | 4 +
>> >> tools/virsh-interface.c | 25 ++++++-
>> >> tools/virsh-network.c | 62 ++++++++++++++-
>> >> tools/virsh.pod | 8 +-
>> >> 8 files changed, 241 insertions(+), 10 deletions(-)
>> >>
>> > So I've spent some time thinking about this. I don't really like the
>> > idea of producing completely different XML (it doesn't even have
>> > as its root element!). But I see what you're trying to
>> > achieve. How about putting the bridged interfaces into the network
>> > definition (on request signalized by a flag, of course).
>>
>> I think that if we're going to add the list of connected guest devices
>> to a network's status, that it should just always be there - adding a
>> new flag for every little bit of different status sets a bad precedent
>> and sets us up to have an infinitely increasing number of flags.
>>
>> Like I mentioned in my response to one of the patches, I think this
>> information is better gathered and maintained by the bridge driver as
>> guests connect to / disconnect from a network; this avoids the necessity
>> of dragging netcf into the picture and allows much better information -
>> the name of the domain using each interface can be included.
>
>You know if this checking for guests were done in the virNetworkDestroy
>API implementation in src/network/bridge_driver.c, instead of in
>virsh, then we would not need any of this code for extending the XML
>nor parsing it in virsh. We could simply check the number of connections
>which is something we have directly available internally. So 95% of this
>patch series would go away
:-C I'm sad...... :-), Anyway, Because we keep the original behaviour of
net-destroy, So we keep iface-unbridge no changes as well, Then droping
this patch series makes sense.
9 years, 10 months
[libvirt] [PATCH] check "fc_host" and "vport_ops" capabilitis in SCSI host nodedevs
by Shivaprasad G Bhat
virNodeListDevices called by listDevices indirectly uses the
virNodeDeviceHasCap() which is buggy.
Earlier, virNodeListDevices was used in "virsh nodedev-list" as well. Though,
the code was rewritten to use vshNodeDeviceListCollect instead.
The patch fixes listDevices output for the below python script.
-------------
import libvirt
conn = libvirt.openReadOnly('qemu:///system')
fc = conn.listDevices('fc_host', 0)
print(fc)
------------
---
Shivaprasad G Bhat (1):
check "fc_host" and "vport_ops" capabilities in SCSI host nodedevs
src/conf/node_device_conf.c | 8 ++++++++
1 file changed, 8 insertions(+)
--
Signature
9 years, 10 months
[libvirt] [libvirt-test-API][PATCH 0/2] Add API openGraphicsFD test case
by Jincheng Miao
Add API openGraphicsFD test case to linux_domain.conf
Jincheng Miao (2):
domain: add open_graphicsfd
Add open_graphicsFD to linux_domain.conf
cases/linux_domain.conf | 14 ++++++
repos/domain/open_graphicsfd.py | 89 +++++++++++++++++++++++++++++++++++++++
2 files changed, 103 insertions(+), 0 deletions(-)
create mode 100644 repos/domain/open_graphicsfd.py
9 years, 10 months
[libvirt] [PATCH] qemu: Properly report error when cookin uuid not match the ctxt uuid
by Luyao Huang
Add the missing jump to the error label when cookin uuid
does not match the ctxt uuid.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_migration.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8a8fa63..879b1bf 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1147,6 +1147,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Incoming cookie data had unexpected UUID %s vs %s"),
tmp, uuidstr);
+ goto error;
}
VIR_FREE(tmp);
--
1.8.3.1
9 years, 10 months
[libvirt] [libvirt-test-API][PATCH 0/2] Fix some regression issues
by jiahu
Some issues were introduced by 137211d15 and efac4a3ec
commits, fix them.
jiahu (2):
Give a default value on br variable in mac_to_ip
Fix regression issues
repos/domain/destroy.py | 4 ++--
repos/domain/install_linux_cdrom.py | 4 ++--
utils/utils.py | 7 ++-----
3 files changed, 6 insertions(+), 9 deletions(-)
--
1.8.3.1
9 years, 10 months
[libvirt] [PATCH] Bugfix for building with no-git-option
by Stefan Zimmermann
If you will build libvirt with the no-git-option than you is the
gnulib-srcdir mandatory. You will lose this information till now. With
this patch you will save this inforamtion.
Signed-off-by: Stefan Zimmermann <stzi(a)linux.vnet.ibm.com>
---
autogen.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 1965f64..0168d24 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,8 +18,8 @@ test -f src/libvirt.c || {
EXTRA_ARGS=
no_git=
if test "x$1" = "x--no-git"; then
- no_git=" $1"
- shift
+ no_git=" $1 $2"
+ shift 2
fi
if test -z "$NOCONFIGURE" ; then
if test "x$1" = "x--system"; then
--
2.1.4
9 years, 10 months
[libvirt] [PATCHv2] Trivially support DomainHasManagedSaveImage
by Ján Tomko
Return 0 instead of ERR_NO_SUPPORT in each driver
where we don't support managed save.
This avoids spamming daemon logs when 'virsh dominfo' is run.
https://bugzilla.redhat.com/show_bug.cgi?id=1095637
---
src/bhyve/bhyve_driver.c | 25 ++++++++++++++++++++++++-
src/esx/esx_driver.c | 11 ++++++++++-
src/lxc/lxc_driver.c | 26 +++++++++++++++++++++++++-
src/openvz/openvz_driver.c | 12 +++++++++++-
src/parallels/parallels_driver.c | 11 ++++++++++-
src/phyp/phyp_driver.c | 11 ++++++++++-
src/uml/uml_driver.c | 33 ++++++++++++++++++++++++++++++++-
src/vbox/vbox_common.c | 11 ++++++++++-
src/vmware/vmware_driver.c | 11 ++++++++++-
src/xenapi/xenapi_driver.c | 11 ++++++++++-
10 files changed, 152 insertions(+), 10 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 56cc8ab..ae39917 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -2,7 +2,7 @@
* bhyve_driver.c: core driver methods for managing bhyve guests
*
* Copyright (C) 2014 Roman Bogorodskiy
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (C) 2014-2015 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1430,6 +1430,28 @@ bhyveConnectDomainEventDeregisterAny(virConnectPtr conn,
return 0;
}
+static int
+bhyveDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = bhyveDomObjFromDomain(domain)))
+ goto cleanup;
+
+ if (virDomainHasManagedSaveImageEnsureACL(domain->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
static virHypervisorDriver bhyveHypervisorDriver = {
.name = "bhyve",
.connectOpen = bhyveConnectOpen, /* 1.2.2 */
@@ -1476,6 +1498,7 @@ static virHypervisorDriver bhyveHypervisorDriver = {
.connectCompareCPU = bhyveConnectCompareCPU, /* 1.2.4 */
.connectDomainEventRegisterAny = bhyveConnectDomainEventRegisterAny, /* 1.2.5 */
.connectDomainEventDeregisterAny = bhyveConnectDomainEventDeregisterAny, /* 1.2.5 */
+ .domainHasManagedSaveImage = bhyveDomainHasManagedSaveImage, /* 1.2.13 */
};
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 6b9965f..53d31e3 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -1,7 +1,7 @@
/*
* esx_driver.c: core driver functions for managing VMware ESX hosts
*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2009-2014 Matthias Bolte <matthias.bolte(a)googlemail.com>
* Copyright (C) 2009 Maximilian Wilhelm <max(a)rfc2324.org>
*
@@ -5147,6 +5147,14 @@ esxConnectListAllDomains(virConnectPtr conn,
}
#undef MATCH
+static int
+esxDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
static virHypervisorDriver esxHypervisorDriver = {
.name = "ESX",
@@ -5226,6 +5234,7 @@ static virHypervisorDriver esxHypervisorDriver = {
.domainSnapshotHasMetadata = esxDomainSnapshotHasMetadata, /* 0.9.13 */
.domainSnapshotDelete = esxDomainSnapshotDelete, /* 0.8.0 */
.connectIsAlive = esxConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = esxDomainHasManagedSaveImage, /* 1.2.13 */
};
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 487e2a2..3adb21d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
* lxc_driver.c: linux container driver functions
@@ -5726,6 +5726,29 @@ lxcNodeAllocPages(virConnectPtr conn,
}
+static int
+lxcDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = lxcDomObjFromDomain(dom)))
+ return ret;
+
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
/* Function Tables */
static virHypervisorDriver lxcHypervisorDriver = {
.name = LXC_DRIVER_NAME,
@@ -5818,6 +5841,7 @@ static virHypervisorDriver lxcHypervisorDriver = {
.domainLxcOpenNamespace = lxcDomainLxcOpenNamespace, /* 1.0.2 */
.nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver lxcConnectDriver = {
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 556f626..4ce5a41 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1,7 +1,7 @@
/*
* openvz_driver.c: core driver methods for managing OpenVZ VEs
*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2006, 2007 Binary Karma
* Copyright (C) 2006 Shuveb Hussain
* Copyright (C) 2007 Anoop Joe Cyriac
@@ -2567,6 +2567,15 @@ openvzDomainMigrateConfirm3Params(virDomainPtr domain,
return ret;
}
+static int
+openvzDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
+
static virHypervisorDriver openvzHypervisorDriver = {
.name = "OPENVZ",
@@ -2632,6 +2641,7 @@ static virHypervisorDriver openvzHypervisorDriver = {
.domainMigratePerform3Params = openvzDomainMigratePerform3Params, /* 1.2.8 */
.domainMigrateFinish3Params = openvzDomainMigrateFinish3Params, /* 1.2.8 */
.domainMigrateConfirm3Params = openvzDomainMigrateConfirm3Params, /* 1.2.8 */
+ .domainHasManagedSaveImage = openvzDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver openvzConnectDriver = {
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index b569160..819f662 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -2,7 +2,7 @@
* parallels_driver.c: core driver functions for managing
* Parallels Cloud Server hosts
*
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (C) 2014-2015 Red Hat, Inc.
* Copyright (C) 2012 Parallels, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -956,6 +956,14 @@ parallelsDomainUndefine(virDomainPtr domain)
return parallelsDomainUndefineFlags(domain, 0);
}
+static int
+parallelsDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
static virHypervisorDriver parallelsDriver = {
.name = "Parallels",
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
@@ -997,6 +1005,7 @@ static virHypervisorDriver parallelsDriver = {
.connectIsEncrypted = parallelsConnectIsEncrypted, /* 1.2.5 */
.connectIsSecure = parallelsConnectIsSecure, /* 1.2.5 */
.connectIsAlive = parallelsConnectIsAlive, /* 1.2.5 */
+ .domainHasManagedSaveImage = parallelsDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver parallelsConnectDriver = {
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 6c5a91e..d392709 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright IBM Corp. 2009
*
* phyp_driver.c: ssh layer to access Power Hypervisors
@@ -3669,6 +3669,14 @@ phypDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
return phypDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_VCPU_LIVE);
}
+static int
+phypDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
static virHypervisorDriver phypHypervisorDriver = {
.name = "PHYP",
.connectOpen = phypConnectOpen, /* 0.7.0 */
@@ -3698,6 +3706,7 @@ static virHypervisorDriver phypHypervisorDriver = {
.connectIsSecure = phypConnectIsSecure, /* 0.7.3 */
.domainIsUpdated = phypDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = phypConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = phypDomainHasManagedSaveImage, /* 1.2.13 */
};
static virStorageDriver phypStorageDriver = {
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 6ca038a..68efd18 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1,7 +1,7 @@
/*
* uml_driver.c: core driver methods for managing UML guests
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -2943,6 +2943,36 @@ umlNodeAllocPages(virConnectPtr conn,
}
+static int
+umlDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ struct uml_driver *driver = dom->conn->privateData;
+ int ret = -1;
+ virDomainObjPtr vm;
+
+ virCheckFlags(0, -1);
+
+ umlDriverLock(driver);
+ vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
+ umlDriverUnlock(driver);
+
+ if (!vm) {
+ virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ goto cleanup;
+ }
+
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
static virHypervisorDriver umlHypervisorDriver = {
.name = "UML",
.connectOpen = umlConnectOpen, /* 0.5.0 */
@@ -3006,6 +3036,7 @@ static virHypervisorDriver umlHypervisorDriver = {
.nodeSetMemoryParameters = umlNodeSetMemoryParameters, /* 0.10.2 */
.nodeGetFreePages = umlNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = umlNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = umlDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver umlConnectDriver = {
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index bd3f50c..76fcc72 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2014, Taowei Luo (uaedante(a)gmail.com)
- * Copyright (C) 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -7588,6 +7588,14 @@ vboxNodeAllocPages(virConnectPtr conn ATTRIBUTE_UNUSED,
startCell, cellCount, add);
}
+static int
+vboxDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
/**
* Function Tables
@@ -7661,6 +7669,7 @@ virHypervisorDriver vboxCommonDriver = {
.connectIsAlive = vboxConnectIsAlive, /* 0.9.8 */
.nodeGetFreePages = vboxNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = vboxNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = vboxDomainHasManagedSaveImage, /* 1.2.13 */
};
static void updateDriver(void)
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 2d7ba04..22d0c91 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -1,6 +1,6 @@
/*---------------------------------------------------------------------------*/
/*
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2015 Red Hat, Inc.
* Copyright 2010, diateam (www.diateam.net)
* Copyright (C) 2013. Doug Goldstein <cardoe(a)cardoe.com>
*
@@ -1195,6 +1195,14 @@ vmwareConnectListAllDomains(virConnectPtr conn,
return ret;
}
+static int
+vmwareDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
static virHypervisorDriver vmwareHypervisorDriver = {
@@ -1233,6 +1241,7 @@ static virHypervisorDriver vmwareHypervisorDriver = {
.domainIsActive = vmwareDomainIsActive, /* 0.8.7 */
.domainIsPersistent = vmwareDomainIsPersistent, /* 0.8.7 */
.connectIsAlive = vmwareConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = vmwareDomainHasManagedSaveImage, /* 1.2.13 */
};
static virConnectDriver vmwareConnectDriver = {
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 0902f9a..c7b9798 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1,6 +1,6 @@
/*
* xenapi_driver.c: Xen API driver.
- * Copyright (C) 2011-2014 Red Hat, Inc.
+ * Copyright (C) 2011-2015 Red Hat, Inc.
* Copyright (C) 2009, 2010 Citrix Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -1977,6 +1977,14 @@ xenapiConnectIsAlive(virConnectPtr conn)
return 0;
}
+static int
+xenapiDomainHasManagedSaveImage(virDomainPtr dom ATTRIBUTE_UNUSED, unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
+ return 0;
+}
+
/* The interface which we export upwards to libvirt.c. */
static virHypervisorDriver xenapiHypervisorDriver = {
.name = "XenAPI",
@@ -2029,6 +2037,7 @@ static virHypervisorDriver xenapiHypervisorDriver = {
.nodeGetFreeMemory = xenapiNodeGetFreeMemory, /* 0.8.0 */
.domainIsUpdated = xenapiDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = xenapiConnectIsAlive, /* 0.9.8 */
+ .domainHasManagedSaveImage = xenapiDomainHasManagedSaveImage, /* 1.2.13 */
};
--
2.0.5
9 years, 10 months
[libvirt] [PATCH] lxc: fix double close handshakefds[1]
by Luyao Huang
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/lxc/lxc_process.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 01da344..b385423 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1270,11 +1270,6 @@ int virLXCProcessStart(virConnectPtr conn,
goto error;
}
- if (VIR_CLOSE(handshakefds[1]) < 0) {
- virReportSystemError(errno, "%s", _("could not close handshake fd"));
- goto error;
- }
-
if (virCommandHandshakeWait(cmd) < 0)
goto error;
--
1.8.3.1
9 years, 10 months