From: Markus Armbruster <armbru@redhat.com>
To: "Dr . David Alan Gilbert" <dgilbert@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH RFC] migration: warn about non-migratable configurations unless '--no-migration' was specified
Date: Mon, 19 Apr 2021 17:46:18 +0200 [thread overview]
Message-ID: <878s5euvjp.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <87sg3p1cf5.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Sat, 17 Apr 2021 11:35:26 +0200")
Markus Armbruster <armbru@redhat.com> writes:
[...]
> Apropos blocked-reasons. migration.json has:
>
> # @blocked: True if outgoing migration is blocked (since 6.0)
> #
> # @blocked-reasons: A list of reasons an outgoing migration is blocked (since 6.0)
> [...]
> 'blocked': 'bool',
> '*blocked-reasons': ['str'],
>
> Can "blocked-reasons" be absent or empty when "blocked" is true?
No.
From fill_source_migration_info():
info->blocked = migration_is_blocked(NULL);
info->has_blocked_reasons = info->blocked;
info->blocked_reasons = NULL;
if (info->blocked) {
GSList *cur_blocker = migration_blockers;
/*
* There are two types of reasons a migration might be blocked;
* a) devices marked in VMState as non-migratable, and
* b) Explicit migration blockers
* We need to add both of them here.
*/
qemu_savevm_non_migratable_list(&info->blocked_reasons);
while (cur_blocker) {
QAPI_LIST_PREPEND(info->blocked_reasons,
g_strdup(error_get_pretty(cur_blocker->data)));
cur_blocker = g_slist_next(cur_blocker);
}
}
where
bool migration_is_blocked(Error **errp)
{
if (qemu_savevm_state_blocked(errp)) {
return true;
}
if (migration_blockers) {
error_propagate(errp, error_copy(migration_blockers->data));
return true;
}
return false;
}
and
bool qemu_savevm_state_blocked(Error **errp)
{
SaveStateEntry *se;
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
if (se->vmsd && se->vmsd->unmigratable) {
error_setg(errp, "State blocked by non-migratable device '%s'",
se->idstr);
return true;
}
}
return false;
}
void qemu_savevm_non_migratable_list(strList **reasons)
{
SaveStateEntry *se;
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
if (se->vmsd && se->vmsd->unmigratable) {
QAPI_LIST_PREPEND(*reasons,
g_strdup_printf("non-migratable device: %s",
se->idstr));
}
}
}
info->blocked is "non-migratable devices exist, or migration blockers
exist".
info->blocked_reasons has one entry per non-migratable device, and one
entry per migration blocker.
> If not, then "blocked" is redundant, and should be dropped before we
> release 6.0.
It is, and it should.
> Else, the documentation should spell it out. No need to rush that.
>
> The patch was not cc'ed to me. I might have caught it earlier...
"The patch" is commit 3af8554bd0 "migration: Add blocker information"
>
> [...]
next prev parent reply other threads:[~2021-04-19 15:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 15:44 [PATCH RFC] migration: warn about non-migratable configurations unless '--no-migration' was specified Vitaly Kuznetsov
2021-04-15 16:04 ` Daniel P. Berrangé
2021-04-15 16:30 ` Eduardo Habkost
2021-04-15 16:40 ` Daniel P. Berrangé
2021-04-15 17:07 ` Daniel P. Berrangé
2021-04-15 17:28 ` Dr. David Alan Gilbert
2021-04-16 7:33 ` Vitaly Kuznetsov
2021-04-16 16:28 ` Eduardo Habkost
2021-04-17 9:33 ` Markus Armbruster
2021-04-19 16:42 ` Daniel P. Berrangé
2021-04-19 16:48 ` Eduardo Habkost
2021-04-19 17:11 ` Dr. David Alan Gilbert
2021-04-19 17:15 ` Daniel P. Berrangé
2021-04-19 17:17 ` Daniel P. Berrangé
2021-04-19 18:47 ` Dr. David Alan Gilbert
2021-04-19 19:32 ` Eduardo Habkost
2021-04-20 11:51 ` Dr. David Alan Gilbert
2021-04-20 13:48 ` Eduardo Habkost
2021-04-20 14:10 ` Dr. David Alan Gilbert
2021-04-20 14:15 ` Daniel P. Berrangé
2021-04-20 15:20 ` Eduardo Habkost
2021-04-17 9:35 ` Markus Armbruster
2021-04-19 7:26 ` Markus Armbruster
2021-04-19 15:46 ` Markus Armbruster [this message]
2021-04-18 15:53 ` Peter Maydell
2021-04-19 16:28 ` Eduardo Habkost
2021-04-19 16:37 ` Daniel P. Berrangé
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=878s5euvjp.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=vkuznets@redhat.com \
/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.