aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>2023-04-28 22:49:28 +0300
committerJuan Quintela <quintela@redhat.com>2023-05-10 18:48:12 +0200
commit121ccedc2bf0c124e93991275336415d12d2e3df (patch)
tree980bc06c2ec205653f3e2736a360f7c8c2170c86 /migration
parentd70178a88fe8d0873508f6d4757018092262e9ec (diff)
migration: block incoming colo when capability is disabled
We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Message-Id: <20230428194928.1426370-11-vsementsov@yandex-team.ru> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index bb254e4f07..439e8651df 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -398,6 +398,12 @@ int migration_incoming_enable_colo(void)
return -ENOTSUP;
#endif
+ if (!migrate_colo()) {
+ error_report("ENABLE_COLO command come in migration stream, but c-colo "
+ "capability is not set");
+ return -EINVAL;
+ }
+
if (ram_block_discard_disable(true)) {
error_report("COLO: cannot disable RAM discard");
return -EBUSY;