Add support and tests for live_migration_ parameters in charm config, templates and hook.
Change-Id: I9e426d7718f044f0e73231448b0a3dad17c81524 Closes-Bug: 1861986
This commit is contained in:
parent
508f2d0bc6
commit
6351653c86
30
config.yaml
30
config.yaml
@ -108,6 +108,36 @@ options:
|
||||
description: |
|
||||
TCP authentication scheme for libvirt live migration. Available options
|
||||
include ssh.
|
||||
live-migration-completion-timeout:
|
||||
type: int
|
||||
default: 800
|
||||
description: |
|
||||
Time to wait, in seconds, for migration to successfully complete
|
||||
transferring data before aborting the operation. Value is per GiB
|
||||
of guest RAM + disk to be transferred, with lower bound of a minimum
|
||||
of 2 GiB. Should usually be larger than downtime-delay*downtime-steps
|
||||
Set to 0 to disable timeouts.
|
||||
live-migration-downtime:
|
||||
type: int
|
||||
default: 500
|
||||
description: |
|
||||
Maximum permitted downtime, in milliseconds, for live migration
|
||||
switchover. Will be rounded up to a minimum of 100ms. Use
|
||||
a large value if guest liveness is unimportant.
|
||||
live-migration-downtime-delay:
|
||||
type: int
|
||||
default: 75
|
||||
description: |
|
||||
Time to wait, in seconds, between each step increase of the migration
|
||||
downtime. Minimum delay is 10 seconds. Value is per GiB of guest
|
||||
RAM + disk to be transferred, with lower bound of a minimum of 2 GiB
|
||||
per device.
|
||||
live-migration-downtime-steps:
|
||||
type: int
|
||||
default: 10
|
||||
description: |
|
||||
Number of incremental steps to reach max downtime value. Will be rounded
|
||||
up to a minimum of 3 steps.
|
||||
live-migration-permit-post-copy:
|
||||
type: boolean
|
||||
default: False
|
||||
|
@ -209,6 +209,14 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
|
||||
ctxt['live_migration_uri'] = 'qemu+ssh://%s/system'
|
||||
|
||||
if config('enable-live-migration'):
|
||||
ctxt['live_migration_completion_timeout'] = \
|
||||
config('live-migration-completion-timeout')
|
||||
ctxt['live_migration_downtime'] = \
|
||||
config('live-migration-downtime')
|
||||
ctxt['live_migration_downtime_steps'] = \
|
||||
config('live-migration-downtime-steps')
|
||||
ctxt['live_migration_downtime_delay'] = \
|
||||
config('live-migration-downtime-delay')
|
||||
ctxt['live_migration_permit_post_copy'] = \
|
||||
config('live-migration-permit-post-copy')
|
||||
ctxt['live_migration_permit_auto_converge'] = \
|
||||
|
@ -206,6 +206,18 @@ rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% if live_migration_uri -%}
|
||||
live_migration_uri = {{ live_migration_uri }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -221,6 +221,18 @@ live_migration_scheme = {{ live_migration_scheme }}
|
||||
{% if live_migration_inbound_addr -%}
|
||||
live_migration_inbound_addr = {{ live_migration_inbound_addr }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -222,6 +222,18 @@ live_migration_scheme = {{ live_migration_scheme }}
|
||||
{% if live_migration_inbound_addr -%}
|
||||
live_migration_inbound_addr = {{ live_migration_inbound_addr }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -240,6 +240,18 @@ live_migration_scheme = {{ live_migration_scheme }}
|
||||
{% if live_migration_inbound_addr -%}
|
||||
live_migration_inbound_addr = {{ live_migration_inbound_addr }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -240,6 +240,18 @@ live_migration_scheme = {{ live_migration_scheme }}
|
||||
{% if live_migration_inbound_addr -%}
|
||||
live_migration_inbound_addr = {{ live_migration_inbound_addr }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -241,6 +241,18 @@ live_migration_scheme = {{ live_migration_scheme }}
|
||||
{% if live_migration_inbound_addr -%}
|
||||
live_migration_inbound_addr = {{ live_migration_inbound_addr }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -245,6 +245,18 @@ rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% if live_migration_uri -%}
|
||||
live_migration_uri = {{ live_migration_uri }}
|
||||
{% endif -%}
|
||||
{% if live_migration_completion_timeout -%}
|
||||
live_migration_completion_timeout = {{ live_migration_completion_timeout }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime -%}
|
||||
live_migration_downtime = {{ live_migration_downtime }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_steps -%}
|
||||
live_migration_downtime_steps = {{ live_migration_downtime_steps }}
|
||||
{% endif -%}
|
||||
{% if live_migration_downtime_delay -%}
|
||||
live_migration_downtime_delay = {{ live_migration_downtime_delay }}
|
||||
{% endif -%}
|
||||
{% if live_migration_permit_post_copy -%}
|
||||
live_migration_permit_post_copy = {{ live_migration_permit_post_copy }}
|
||||
{% endif -%}
|
||||
|
@ -392,6 +392,10 @@ class NovaComputeContextTests(CharmTestCase):
|
||||
'listen_tls': 0,
|
||||
'host_uuid': self.host_uuid,
|
||||
'live_migration_uri': 'qemu+ssh://%s/system',
|
||||
'live_migration_completion_timeout': 800,
|
||||
'live_migration_downtime': 500,
|
||||
'live_migration_downtime_delay': 75,
|
||||
'live_migration_downtime_steps': 10,
|
||||
'live_migration_permit_auto_converge': False,
|
||||
'live_migration_permit_post_copy': False,
|
||||
'default_ephemeral_format': 'ext4',
|
||||
@ -448,6 +452,10 @@ class NovaComputeContextTests(CharmTestCase):
|
||||
'listen_tls': 0,
|
||||
'host_uuid': self.host_uuid,
|
||||
'live_migration_uri': 'qemu+ssh://%s/system',
|
||||
'live_migration_completion_timeout': 800,
|
||||
'live_migration_downtime': 500,
|
||||
'live_migration_downtime_delay': 75,
|
||||
'live_migration_downtime_steps': 10,
|
||||
'live_migration_permit_auto_converge': True,
|
||||
'live_migration_permit_post_copy': False,
|
||||
'force_raw_images': True,
|
||||
@ -470,6 +478,10 @@ class NovaComputeContextTests(CharmTestCase):
|
||||
'listen_tls': 0,
|
||||
'host_uuid': self.host_uuid,
|
||||
'live_migration_uri': 'qemu+ssh://%s/system',
|
||||
'live_migration_completion_timeout': 800,
|
||||
'live_migration_downtime': 500,
|
||||
'live_migration_downtime_delay': 75,
|
||||
'live_migration_downtime_steps': 10,
|
||||
'live_migration_permit_auto_converge': False,
|
||||
'live_migration_permit_post_copy': True,
|
||||
'default_ephemeral_format': 'ext4',
|
||||
|
Loading…
x
Reference in New Issue
Block a user