Hi all,
I have a question about compatibility issues when submitting changes
to both Xen and libvirt.
First, some background: I'm seeing a problem with virsh detach-disk.
It'll detach a disk from a running domain, but not update the domain's
configuration, so the disk will be back when the domain is rebooted.
This seems undesirable; I think the disk should be permanently removed
by virsh detach-disk.
To fix this, patches are necessary in both Xen and Libvirt.
First, the Xen patch:
--- old/tools/python/xen/xend/server/SrvDomain.py
+++ new/tools/python/xen/xend/server/SrvDomain.py
@@ -186,7 +186,9 @@
def op_device_destroy(self, _, req):
return self.call(self.dom.destroyDevice,
[['type', 'str'],
- ['dev', 'str']],
+ ['dev', 'str'],
+ ['force', 'int'],
+ ['rm_cfg', 'int']],
req)
def op_device_configure(self, _, req):
Next, the libvirt patch:
diff --git a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -3269,7 +3273,7 @@ xenDaemonDetachDevice(virDomainPtr domai
if (virDomainXMLDevID(domain, xml, class, ref, sizeof(ref)))
return (-1);
return(xend_op(domain->conn, domain->name, "op",
"device_destroy",
- "type", class, "dev", ref, NULL));
+ "type", class, "dev", ref, "force", "0",
"rm_cfg", "1", NULL));
}
Now, on to my question: I want to make sure I can do this without
causing too many problems. In my testing, the libvirt change without
the xen change won't cause any additional issues, but the xen change
without the libvirt change will cause all 'virsh detach-disk' calls to fail.
How should a change like this be handled? Submit the libvirt patch
now, and sit on the Xen patch for a while? Or submit both and include a
note that an upgrade will be necessary?
Thanks,
Ryan