From 167e3d497c7cbdb687da0063060c4b0aac420558 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Thu, 31 Aug 2017 00:13:15 +0100 Subject: Fix cold/live migration network config Cold migration network is determined by the value of my_ip in nova.conf. If this isn't set then the network with the default gateway will be used. This patch sets my_ip and the whitelisted IP for cold migation over SSH to the NovaApiNetwork. Until https://bugs.launchpad.net/nova/+bug/1671288 is fixed we cannot control the network used for live migration over SSH. It is determined by hostname resolution. This patch sets the whitelisted IP for live migration over SSH to the hostname resolution network for the role - which is typically the same as NovaApiNetwork. (NB The puppet manifest will remove duplicates). Live migration over TLS is not affected. It can control the network used so it configurable via NovaLibvirtNetwork. Change-Id: Ica3f79d6d0cfae446e276172146f3a9407f2971f Depends-On: Id22a6c990f424b9f3ca6159088540ea207460ffd (cherry picked from commit 23331889a577b82b625610a80ecd44e164fe6cf1) --- network/service_net_map.j2.yaml | 1 - puppet/services/nova-base.yaml | 3 ++- puppet/services/nova-migration-target.yaml | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml index 54646c38..e19ccd84 100644 --- a/network/service_net_map.j2.yaml +++ b/network/service_net_map.j2.yaml @@ -55,7 +55,6 @@ parameters: HeatApiCfnNetwork: internal_api HeatApiCloudwatchNetwork: internal_api NovaApiNetwork: internal_api - NovaColdMigrationNetwork: ctlplane NovaPlacementNetwork: internal_api NovaMetadataNetwork: internal_api NovaVncProxyNetwork: internal_api diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml index 08302ee9..55392086 100644 --- a/puppet/services/nova-base.yaml +++ b/puppet/services/nova-base.yaml @@ -159,7 +159,8 @@ outputs: service_name: nova_base config_settings: map_merge: - - nova::rabbit_password: {get_param: RabbitPassword} + - nova::my_ip: {get_param: [ServiceNetMap, NovaApiNetwork]} + nova::rabbit_password: {get_param: RabbitPassword} nova::rabbit_userid: {get_param: RabbitUserName} nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL} nova::rabbit_port: {get_param: RabbitClientPort} diff --git a/puppet/services/nova-migration-target.yaml b/puppet/services/nova-migration-target.yaml index 0c2b419e..e121d37a 100644 --- a/puppet/services/nova-migration-target.yaml +++ b/puppet/services/nova-migration-target.yaml @@ -55,8 +55,14 @@ outputs: tripleo::profile::base::nova::migration::target::ssh_localaddrs: - "%{hiera('cold_migration_ssh_inbound_addr')}" - "%{hiera('live_migration_ssh_inbound_addr')}" - live_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaLibvirtNetwork]} - cold_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaColdMigrationNetwork]} + live_migration_ssh_inbound_addr: + get_param: + - ServiceNetMap + - str_replace: + template: "ROLENAMEHostnameResolveNetwork" + params: + ROLENAME: {get_param: RoleName} + cold_migration_ssh_inbound_addr: {get_param: [ServiceNetMap, NovaApiNetwork]} tripleo::profile::base::sshd::port: - 22 - {get_param: MigrationSshPort} -- cgit 1.2.3-korg