[PATCH v3 2/2] conf: allow shmem name change in migration

Martin Kletzander mkletzan at redhat.com
Fri Jul 31 13:20:26 UTC 2020


On Fri, Jul 24, 2020 at 11:34:12AM +0800, Wang Xin wrote:
>The shmem 'name' specifies the shared memory path in '/dev/shm/',
>however, we may need to change it to avoid filename conflict
>when VM migrate to other host. This patch remove shmem name
>consistency check.
>

There is one extra thing you need to consider when allowing this.  And that is
"is that value part of the migration stream"?  Even though this applies only to
QEMU (in which case this could be handled there only, but the whole feature is
QEMU-only, so...) we need to check that before allowing it.  The easiest check is
to actually just migrate such machine.  I tried it and works so it's fine.

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>

Same as with the first one I'll push it after the release.  Thanks for the
patches.

>Signed-off-by: Wang Xin <wangxinxin.wang at huawei.com>
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index bede53d5aa..59cc61ea49 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -23768,13 +23768,6 @@ static bool
> virDomainShmemDefCheckABIStability(virDomainShmemDefPtr src,
>                                    virDomainShmemDefPtr dst)
> {
>-    if (STRNEQ_NULLABLE(src->name, dst->name)) {
>-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>-                       _("Target shared memory name '%s' does not match source "
>-                         "'%s'"), dst->name, src->name);
>-        return false;
>-    }
>-
>     if (src->role != dst->role) {
>         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                        _("Target shared memory role '%s' does not match "
>-- 
>2.23.0
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200731/a03de410/attachment-0001.sig>


More information about the libvir-list mailing list