Adjust live migration config to changes in puppet-nova

https://review.openstack.org/#/c/451968 has changed live migration
configuration in puppet-nova. This patch adjust packstack to this
change.

Change-Id: I43e3a2171981886da5e6c779fd24510540a7c07a
This commit is contained in:
Alfredo Moralejo 2017-04-05 13:07:29 -04:00
parent 288a1efe09
commit 1f69afa939
3 changed files with 17 additions and 13 deletions

View File

@ -328,17 +328,6 @@ def create_compute_manifest(config, messages):
else:
config["CONFIG_VNCPROXY_PROTOCOL"] = "http"
migrate_protocol = config['CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL']
if migrate_protocol == 'ssh':
config['CONFIG_NOVA_COMPUTE_MIGRATE_URL'] = (
'qemu+ssh://nova@%s/system?no_verify=1&'
'keyfile=/etc/nova/ssh/nova_migration_key'
)
else:
config['CONFIG_NOVA_COMPUTE_MIGRATE_URL'] = (
'qemu+tcp://nova@%s/system'
)
config["CONFIG_NOVA_ALLOW_RESIZE_TO_SAME"] = len(compute_hosts) == 1
ssh_keys_details = {}

View File

@ -29,8 +29,6 @@ class packstack::nova::compute ()
nova_config{
'DEFAULT/volume_api_class':
value => 'nova.volume.cinder.API';
'libvirt/live_migration_uri':
value => hiera('CONFIG_NOVA_COMPUTE_MIGRATE_URL');
}
if ($::fqdn == '' or $::fqdn =~ /localhost/) {

View File

@ -27,6 +27,23 @@ class packstack::nova::compute::libvirt ()
Service <| title == 'libvirt' |>
}
$migrate_transport = hiera('CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL')
if $migrate_transport == 'ssh' {
$client_extraparams = {
no_verify => 1,
keyfile => '/etc/nova/ssh/nova_migration_key',
}
} else {
$client_extraparams = {}
}
class { '::nova::migration::libvirt':
transport => $migrate_transport,
client_user => 'nova',
client_extraparams => $client_extraparams,
require => Class['::nova::compute::libvirt']
}
class { '::nova::compute::libvirt':
libvirt_virt_type => $libvirt_virt_type,
vncserver_listen => $libvirt_vnc_bind_host,