From 89dcf9d1d487b489b5c29301c57efced4538be25 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 4 Jan 2016 20:11:26 +0000 Subject: [PATCH] libvirt: deprecate live/block_migration_flag opts Some of the migration flags really should never be changed by users since the code makes fundamental assumptions about their use. Now that live_migration_tunnelled is available, there shouldn't be any remaining use cases for the live_migration_flag and block_migration_flag options. Deprecate these for removal in a future release. Change-Id: I69c4bdf47a7b34b8dc8cfa58f3d0e0557b5ce072 Signed-off-by: Mark McLoughlin --- nova/virt/libvirt/driver.py | 16 ++++++++++++++-- ...-migration-flags-config-4ba1e2d6c9ef09ff.yaml | 9 +++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/libvirt-deprecate-migration-flags-config-4ba1e2d6c9ef09ff.yaml diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index a2ee0b3dbb3c..66fb23b6c5f0 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -164,12 +164,24 @@ libvirt_opts = [ cfg.StrOpt('live_migration_flag', default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, ' 'VIR_MIGRATE_LIVE, VIR_MIGRATE_TUNNELLED', - help='Migration flags to be set for live migration'), + help='Migration flags to be set for live migration', + deprecated_for_removal=True, + deprecated_reason='The correct live migration flags can be ' + 'inferred from the new ' + 'live_migration_tunnelled config option. ' + 'live_migration_flag will be removed to ' + 'avoid potential misconfiguration.'), cfg.StrOpt('block_migration_flag', default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, ' 'VIR_MIGRATE_LIVE, VIR_MIGRATE_TUNNELLED, ' 'VIR_MIGRATE_NON_SHARED_INC', - help='Migration flags to be set for block migration'), + help='Migration flags to be set for block migration', + deprecated_for_removal=True, + deprecated_reason='The correct block migration flags can be ' + 'inferred from the new ' + 'live_migration_tunnelled config option. ' + 'block_migration_flag will be removed to ' + 'avoid potential misconfiguration.'), cfg.BoolOpt('live_migration_tunnelled', help='Whether to use tunnelled migration, where migration ' 'data is transported over the libvirtd connection. If ' diff --git a/releasenotes/notes/libvirt-deprecate-migration-flags-config-4ba1e2d6c9ef09ff.yaml b/releasenotes/notes/libvirt-deprecate-migration-flags-config-4ba1e2d6c9ef09ff.yaml new file mode 100644 index 000000000000..e09ca517b669 --- /dev/null +++ b/releasenotes/notes/libvirt-deprecate-migration-flags-config-4ba1e2d6c9ef09ff.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - | + The libvirt live_migration_flag and block_migration_flag + config options are deprecated. These options gave too + fine grained control over the flags used and, in some + cases, misconfigurations could have dangerous side + effects. Please note the availability of a new + live_migration_tunnelled configuration option.