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 <markmc@redhat.com>
This commit is contained in:
Mark McLoughlin 2016-01-04 20:11:26 +00:00 committed by Sean Dague
parent 11dfd9def3
commit 89dcf9d1d4
2 changed files with 23 additions and 2 deletions

View File

@ -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 '

View File

@ -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.