提交 5fb17bcc 编写于 作者: D Dan Smith

[LXC] Cleanup devices on container shutdown

上级 8f789f1b
Fri Aug 22 08:30:00 PDT 2008 Dan Smith <danms@us.ibm.com>
* src/lxc_driver.c: Make sure we cleanup veth devices at shutdown
Fri Aug 22 11:49:42 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* python/libvir.py: Use libvirt error message as exception
......
......@@ -375,6 +375,7 @@ static int lxcVMCleanup(virConnectPtr conn,
int rc = -1;
int waitRc;
int childStatus = -1;
virDomainNetDefPtr net;
while (((waitRc = waitpid(vm->pid, &childStatus, 0)) == -1) &&
errno == EINTR)
......@@ -404,6 +405,11 @@ static int lxcVMCleanup(virConnectPtr conn,
vm->def->id = -1;
vm->monitor = -1;
for (net = vm->def->nets; net; net = net->next) {
vethInterfaceUpOrDown(net->ifname, 0);
vethDelete(net->ifname);
}
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册