[libvirt] [PATCH v1 09/14] virDomainDeviceInfoCheckABIStability: Check for alias too

Martin Kletzander mkletzan at redhat.com
Thu Oct 19 12:16:41 UTC 2017


On Thu, Oct 19, 2017 at 10:11:04AM +0200, Michal Privoznik wrote:
>Since we'll be passing user's input onto qemu command line, we
>have to make sure aliases don't change during migration and all
>the other places where ABI is checked. Aliases are part of ABI
>now.
>

I don't see how change of an alias would have an impact on the guest OS since it
is not visible at all.  Is QEMU using the IDs to refer to objects in the
migrated data stream?  AFAIK (actually not me, I just asked random stranger
about it) it does not (except the memory modules that Peter told us about in one
of previous series).  I see no reason why we would disable the option to rename
a device when doing migration.  We are reconstructing the command-line anyway.
Did migration fail for you when you tried this?

>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/conf/domain_conf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 0cf67dff1..cb80939af 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -19870,6 +19870,13 @@ virDomainDeviceInfoCheckABIStability(virDomainDeviceInfoPtr src,
>         return false;
>     }
>
>+    if (STRNEQ_NULLABLE(src->alias, dst->alias)) {
>+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>+                       _("Target device alias %s does not match source %s"),
>+                       NULLSTR(src->alias), NULLSTR(dst->alias));
>+        return false;
>+    }
>+
>     switch ((virDomainDeviceAddressType) src->type) {
>     case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI:
>         if (src->addr.pci.domain != dst->addr.pci.domain ||
>-- 
>2.13.6
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171019/3c7ad6cc/attachment-0001.sig>


More information about the libvir-list mailing list