From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anton Kuchin <antonkuchin@yandex-team.ru>
Cc: "Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
qemu-devel@nongnu.org, yc-core@yandex-team.ru,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Juan Quintela" <quintela@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
virtio-fs@redhat.com, "Eric Blake" <eblake@redhat.com>
Subject: Re: [Virtio-fs] [PATCH v3 1/1] vhost-user-fs: add migration type property
Date: Wed, 22 Feb 2023 15:21:36 -0500 [thread overview]
Message-ID: <20230222151814-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <a477ca70-8aea-6c16-122e-1ded4af11f49@yandex-team.ru>
On Wed, Feb 22, 2023 at 08:25:19PM +0200, Anton Kuchin wrote:
> On 22/02/2023 19:12, Michael S. Tsirkin wrote:
> > On Wed, Feb 22, 2023 at 07:05:47PM +0200, Anton Kuchin wrote:
> > > On 22/02/2023 18:51, Michael S. Tsirkin wrote:
> > > > On Wed, Feb 22, 2023 at 06:49:10PM +0200, Anton Kuchin wrote:
> > > > > On 22/02/2023 17:14, Vladimir Sementsov-Ogievskiy wrote:
> > > > > > On 22.02.23 17:25, Anton Kuchin wrote:
> > > > > > > > > > +static int vhost_user_fs_pre_save(void *opaque)
> > > > > > > > > > +{
> > > > > > > > > > + VHostUserFS *fs = opaque;
> > > > > > > > > > + g_autofree char *path = object_get_canonical_path(OBJECT(fs));
> > > > > > > > > > +
> > > > > > > > > > + switch (fs->migration_type) {
> > > > > > > > > > + case VHOST_USER_MIGRATION_TYPE_NONE:
> > > > > > > > > > + error_report("Migration is blocked by device %s", path);
> > > > > > > > > > + break;
> > > > > > > > > > + case VHOST_USER_MIGRATION_TYPE_EXTERNAL:
> > > > > > > > > > + return 0;
> > > > > > > > > > + default:
> > > > > > > > > > + error_report("Migration type '%s' is not
> > > > > > > > > > supported by device %s",
> > > > > > > > > > + VhostUserMigrationType_str(fs->migration_type), path);
> > > > > > > > > > + break;
> > > > > > > > > > + }
> > > > > > > > > > +
> > > > > > > > > > + return -1;
> > > > > > > > > > +}
> > > > > > > > > Should we also add this as .pre_load, to force user select
> > > > > > > > > correct migration_type on target too?
> > > > > > > > In fact, I would claim we only want pre_load.
> > > > > > > > When qemu is started on destination we know where it's migrated
> > > > > > > > from so this flag can be set.
> > > > > > > > When qemu is started on source we generally do not yet know so
> > > > > > > > we don't know whether it's safe to set this flag.
> > > > > > But destination is a "source" for next migration, so there shouldn't be
> > > > > > real difference.
> > > > > > The new property has ".realized_set_allowed = true", so, as I understand
> > > > > > it may be changed at any time, so that's not a problem.
> > > > > Yes, exactly. So destination's property sets not how it will handle this
> > > > > incoming
> > > > > migration but the future outgoing one.
> > > > How do you know where you are going to migrate though?
> > > > I think you don't.
> > > > Setting it on source is better since we know where we
> > > > are migrating from.
> > > Yes, I don't know where I'm going to migrate to. This is why property
> > > affects only how source saves state on outgoing migration.
> > Um. I don't get the logic.
>
> For this feature to work we need orchestrator to manage the migration. And
> we
> generally assume that it is responsibility of orchestrator to ensure
> matching
> properties on source and destination.
> As orchestrator manages both sides of migration it can set option (and we
> can
> check it) on either source or destination. Now it's not important which side
> we
> select, because now the option is essentially binary allow/deny (but IMHO it
> is much better to refuse source to migrate than find later that state can't
> be
> loaded by destination, in case of file migration this becomes especially
> painful).
>
> But there are plans to add internal migration option (extract FUSE state
> from
> backend and transfer it in QEMU migration stream), and that's where
> setting/checking
> on source becomes important because it will rely on this property to decide
> if
> extra state form backend needs to be put in the migration stream subsection.
If we do internal migration that will be a different property
which has to match on source *and* destination.
> If you are concerned about orchestrator breaking assumption of matching
> properties
> on source and destination this is not really supported AFAIK but I don't
> think we
> need to punish it for this, maybe it has its reasons: I can imagine scenario
> where orchestrator could want to migrate from source with
> 'migration=external'
> to destination with 'migration=none' to ensure that destination can't be
> migrated further.
No. I am concerned about a simple practical matter:
- I decide to restart qemu on the same host - so I need to enable
migration
- Later I decide to migrate qemu to another host - this should be
blocked
Property on source does not satisfy both at the same time.
Property on destination does.
> >
> >
> > > > > > > This property selects if VM can migrate and if it can what should
> > > > > > > qemu put
> > > > > > > to the migration stream. So we select on source what type of
> > > > > > > migration is
> > > > > > > allowed for this VM, destination can't check anything at load time.
> > > > > > OK, so the new field "migration" regulates only outgoing migration and
> > > > > > do nothing for incoming. On incoming migration the migration stream
> > > > > > itself defines the type of device migration.
> > > > > > Worth mentioning in doc?
> > > > > Good point. I don't think this deserves a respin but if I have to send v4
> > > > > I'll include
> > > > > clarification in it.
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anton Kuchin <antonkuchin@yandex-team.ru>
Cc: "Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
qemu-devel@nongnu.org, yc-core@yandex-team.ru,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Juan Quintela" <quintela@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
virtio-fs@redhat.com, "Eric Blake" <eblake@redhat.com>
Subject: Re: [PATCH v3 1/1] vhost-user-fs: add migration type property
Date: Wed, 22 Feb 2023 15:21:36 -0500 [thread overview]
Message-ID: <20230222151814-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <a477ca70-8aea-6c16-122e-1ded4af11f49@yandex-team.ru>
On Wed, Feb 22, 2023 at 08:25:19PM +0200, Anton Kuchin wrote:
> On 22/02/2023 19:12, Michael S. Tsirkin wrote:
> > On Wed, Feb 22, 2023 at 07:05:47PM +0200, Anton Kuchin wrote:
> > > On 22/02/2023 18:51, Michael S. Tsirkin wrote:
> > > > On Wed, Feb 22, 2023 at 06:49:10PM +0200, Anton Kuchin wrote:
> > > > > On 22/02/2023 17:14, Vladimir Sementsov-Ogievskiy wrote:
> > > > > > On 22.02.23 17:25, Anton Kuchin wrote:
> > > > > > > > > > +static int vhost_user_fs_pre_save(void *opaque)
> > > > > > > > > > +{
> > > > > > > > > > + VHostUserFS *fs = opaque;
> > > > > > > > > > + g_autofree char *path = object_get_canonical_path(OBJECT(fs));
> > > > > > > > > > +
> > > > > > > > > > + switch (fs->migration_type) {
> > > > > > > > > > + case VHOST_USER_MIGRATION_TYPE_NONE:
> > > > > > > > > > + error_report("Migration is blocked by device %s", path);
> > > > > > > > > > + break;
> > > > > > > > > > + case VHOST_USER_MIGRATION_TYPE_EXTERNAL:
> > > > > > > > > > + return 0;
> > > > > > > > > > + default:
> > > > > > > > > > + error_report("Migration type '%s' is not
> > > > > > > > > > supported by device %s",
> > > > > > > > > > + VhostUserMigrationType_str(fs->migration_type), path);
> > > > > > > > > > + break;
> > > > > > > > > > + }
> > > > > > > > > > +
> > > > > > > > > > + return -1;
> > > > > > > > > > +}
> > > > > > > > > Should we also add this as .pre_load, to force user select
> > > > > > > > > correct migration_type on target too?
> > > > > > > > In fact, I would claim we only want pre_load.
> > > > > > > > When qemu is started on destination we know where it's migrated
> > > > > > > > from so this flag can be set.
> > > > > > > > When qemu is started on source we generally do not yet know so
> > > > > > > > we don't know whether it's safe to set this flag.
> > > > > > But destination is a "source" for next migration, so there shouldn't be
> > > > > > real difference.
> > > > > > The new property has ".realized_set_allowed = true", so, as I understand
> > > > > > it may be changed at any time, so that's not a problem.
> > > > > Yes, exactly. So destination's property sets not how it will handle this
> > > > > incoming
> > > > > migration but the future outgoing one.
> > > > How do you know where you are going to migrate though?
> > > > I think you don't.
> > > > Setting it on source is better since we know where we
> > > > are migrating from.
> > > Yes, I don't know where I'm going to migrate to. This is why property
> > > affects only how source saves state on outgoing migration.
> > Um. I don't get the logic.
>
> For this feature to work we need orchestrator to manage the migration. And
> we
> generally assume that it is responsibility of orchestrator to ensure
> matching
> properties on source and destination.
> As orchestrator manages both sides of migration it can set option (and we
> can
> check it) on either source or destination. Now it's not important which side
> we
> select, because now the option is essentially binary allow/deny (but IMHO it
> is much better to refuse source to migrate than find later that state can't
> be
> loaded by destination, in case of file migration this becomes especially
> painful).
>
> But there are plans to add internal migration option (extract FUSE state
> from
> backend and transfer it in QEMU migration stream), and that's where
> setting/checking
> on source becomes important because it will rely on this property to decide
> if
> extra state form backend needs to be put in the migration stream subsection.
If we do internal migration that will be a different property
which has to match on source *and* destination.
> If you are concerned about orchestrator breaking assumption of matching
> properties
> on source and destination this is not really supported AFAIK but I don't
> think we
> need to punish it for this, maybe it has its reasons: I can imagine scenario
> where orchestrator could want to migrate from source with
> 'migration=external'
> to destination with 'migration=none' to ensure that destination can't be
> migrated further.
No. I am concerned about a simple practical matter:
- I decide to restart qemu on the same host - so I need to enable
migration
- Later I decide to migrate qemu to another host - this should be
blocked
Property on source does not satisfy both at the same time.
Property on destination does.
> >
> >
> > > > > > > This property selects if VM can migrate and if it can what should
> > > > > > > qemu put
> > > > > > > to the migration stream. So we select on source what type of
> > > > > > > migration is
> > > > > > > allowed for this VM, destination can't check anything at load time.
> > > > > > OK, so the new field "migration" regulates only outgoing migration and
> > > > > > do nothing for incoming. On incoming migration the migration stream
> > > > > > itself defines the type of device migration.
> > > > > > Worth mentioning in doc?
> > > > > Good point. I don't think this deserves a respin but if I have to send v4
> > > > > I'll include
> > > > > clarification in it.
next prev parent reply other threads:[~2023-02-22 20:21 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 17:00 [Virtio-fs] [PATCH v3 0/1] virtio-fs: implement option for stateless migration Anton Kuchin
2023-02-17 17:00 ` Anton Kuchin
2023-02-17 17:00 ` [Virtio-fs] [PATCH v3 1/1] vhost-user-fs: add migration type property Anton Kuchin
2023-02-17 17:00 ` Anton Kuchin
2023-02-21 20:45 ` [Virtio-fs] " Stefan Hajnoczi
2023-02-21 20:45 ` Stefan Hajnoczi
2023-02-22 12:20 ` [Virtio-fs] " Vladimir Sementsov-Ogievskiy
2023-02-22 12:20 ` Vladimir Sementsov-Ogievskiy
2023-02-22 12:43 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-22 12:43 ` Michael S. Tsirkin
2023-02-22 14:25 ` [Virtio-fs] " Anton Kuchin
2023-02-22 14:25 ` Anton Kuchin
2023-02-22 15:14 ` [Virtio-fs] " Vladimir Sementsov-Ogievskiy
2023-02-22 15:14 ` Vladimir Sementsov-Ogievskiy
2023-02-22 16:43 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-22 16:43 ` Michael S. Tsirkin
2023-02-22 17:15 ` [Virtio-fs] " Anton Kuchin
2023-02-22 17:15 ` Anton Kuchin
2023-02-22 17:30 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-22 17:30 ` Michael S. Tsirkin
2023-02-22 16:49 ` [Virtio-fs] " Anton Kuchin
2023-02-22 16:49 ` Anton Kuchin
2023-02-22 16:51 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-22 16:51 ` Michael S. Tsirkin
2023-02-22 17:05 ` [Virtio-fs] " Anton Kuchin
2023-02-22 17:05 ` Anton Kuchin
2023-02-22 17:12 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-22 17:12 ` Michael S. Tsirkin
2023-02-22 18:25 ` [Virtio-fs] " Anton Kuchin
2023-02-22 18:25 ` Anton Kuchin
2023-02-22 20:21 ` Michael S. Tsirkin [this message]
2023-02-22 20:21 ` Michael S. Tsirkin
2023-02-22 20:50 ` [Virtio-fs] " Anton Kuchin
2023-02-22 20:50 ` Anton Kuchin
2023-03-01 15:40 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 15:40 ` Michael S. Tsirkin
2023-02-23 7:36 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-23 7:36 ` Michael S. Tsirkin
2023-02-23 21:24 ` [Virtio-fs] " Stefan Hajnoczi
2023-02-23 21:24 ` Stefan Hajnoczi
2023-02-24 4:14 ` [Virtio-fs] " Anton Kuchin
2023-02-24 4:14 ` Anton Kuchin
2023-02-27 10:19 ` [Virtio-fs] " Anton Kuchin
2023-02-27 10:19 ` Anton Kuchin
2023-02-24 8:47 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-24 8:47 ` Michael S. Tsirkin
2023-02-28 14:30 ` [Virtio-fs] " Anton Kuchin
2023-02-28 14:30 ` Anton Kuchin
2023-02-28 14:57 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-28 14:57 ` Michael S. Tsirkin
2023-02-28 17:59 ` [Virtio-fs] " Anton Kuchin
2023-02-28 17:59 ` Anton Kuchin
2023-02-28 21:24 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-28 21:24 ` Michael S. Tsirkin
2023-03-01 14:03 ` [Virtio-fs] " Vladimir Sementsov-Ogievskiy
2023-03-01 14:03 ` Vladimir Sementsov-Ogievskiy
2023-03-01 14:46 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 14:46 ` Michael S. Tsirkin
2023-03-01 15:40 ` [Virtio-fs] " Anton Kuchin
2023-03-01 15:40 ` Anton Kuchin
2023-03-01 15:52 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 15:52 ` Michael S. Tsirkin
2023-03-01 16:29 ` [Virtio-fs] " Anton Kuchin
2023-03-01 16:29 ` Anton Kuchin
2023-03-01 17:19 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 17:19 ` Michael S. Tsirkin
2023-03-01 19:42 ` [Virtio-fs] " Anton Kuchin
2023-03-01 19:42 ` Anton Kuchin
2023-03-01 15:07 ` [Virtio-fs] " Anton Kuchin
2023-03-01 15:07 ` Anton Kuchin
2023-03-01 15:24 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 15:24 ` Michael S. Tsirkin
2023-03-01 16:04 ` [Virtio-fs] " Anton Kuchin
2023-03-01 16:04 ` Anton Kuchin
2023-03-01 17:17 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 17:17 ` Michael S. Tsirkin
2023-03-01 19:35 ` [Virtio-fs] " Anton Kuchin
2023-03-01 19:35 ` Anton Kuchin
2023-03-01 20:22 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 20:22 ` Michael S. Tsirkin
2023-03-06 20:55 ` [Virtio-fs] " Anton Kuchin
2023-03-06 20:55 ` Anton Kuchin
2023-03-06 21:53 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-06 21:53 ` Michael S. Tsirkin
2023-03-17 18:04 ` [Virtio-fs] " Anton Kuchin
2023-03-17 18:04 ` Anton Kuchin
2023-03-01 15:33 ` [Virtio-fs] " Michael S. Tsirkin
2023-03-01 15:33 ` Michael S. Tsirkin
2023-03-17 19:02 ` [Virtio-fs] " Anton Kuchin
2023-03-17 19:02 ` Anton Kuchin
2023-02-28 19:18 ` [Virtio-fs] " Stefan Hajnoczi
2023-02-28 19:18 ` Stefan Hajnoczi
2023-02-28 21:29 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-28 21:29 ` Michael S. Tsirkin
2023-02-28 21:54 ` [Virtio-fs] " Michael S. Tsirkin
2023-02-28 21:54 ` Michael S. Tsirkin
2023-02-22 14:21 ` [Virtio-fs] " Anton Kuchin
2023-02-22 14:21 ` Anton Kuchin
2023-02-22 15:15 ` [Virtio-fs] " Vladimir Sementsov-Ogievskiy
2023-02-22 15:15 ` Vladimir Sementsov-Ogievskiy
2023-02-22 15:20 ` [Virtio-fs] " Vladimir Sementsov-Ogievskiy
2023-02-22 15:20 ` Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230222151814-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=antonkuchin@yandex-team.ru \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtio-fs@redhat.com \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.