From 5ba8934e54e9923c453f122a247b4d02ec878756 Mon Sep 17 00:00:00 2001 From: Teresa Ho Date: Mon, 8 Apr 2019 13:37:33 -0400 Subject: [PATCH] Configure SM to monitor cluster-host-ip Changed to use the new cluster-host-ip service in SM instead of cinder-ip. If cluster-host interface is shared with the management interface, the cluster host ip and interface would not be monitored. Story: 2004273 Task: 28962 Depends-On: https://review.openstack.org/#/c/650980/ Change-Id: I773ab2240d4b165dee5738cf0f957e631da67a1d Signed-off-by: Teresa Ho --- .../src/modules/platform/manifests/sm.pp | 92 ++++++++++--------- .../sysinv/sysinv/sysinv/puppet/platform.py | 2 +- 2 files changed, 50 insertions(+), 44 deletions(-) diff --git a/puppet-manifests/src/modules/platform/manifests/sm.pp b/puppet-manifests/src/modules/platform/manifests/sm.pp index 78e599e25d..013fdafe18 100644 --- a/puppet-manifests/src/modules/platform/manifests/sm.pp +++ b/puppet-manifests/src/modules/platform/manifests/sm.pp @@ -1,6 +1,6 @@ class platform::sm::params ( $mgmt_ip_multicast = undef, - $infra_ip_multicast = undef, + $cluster_host_ip_multicast = undef, ) { } class platform::sm @@ -30,11 +30,10 @@ class platform::sm $mgmt_ip_param_ip = $::platform::network::mgmt::params::controller_address $mgmt_ip_param_mask = $::platform::network::mgmt::params::subnet_prefixlen - # Repurposing the infra interface for cluster-host interface include ::platform::network::cluster_host::params - $infra_ip_interface = $::platform::network::cluster_host::params::interface_name - $cluster_host_ip_param_ip = $::platform::network::cluster_host::params::controller_address - $cluster_host_ip_param_mask = $::platform::network::cluster_host::params::subnet_prefixlen + $cluster_host_ip_interface = $::platform::network::cluster_host::params::interface_name + $cluster_host_ip_param_ip = $::platform::network::cluster_host::params::controller_address + $cluster_host_ip_param_mask = $::platform::network::cluster_host::params::subnet_prefixlen include ::platform::network::oam::params $oam_ip_interface = $::platform::network::oam::params::interface_name @@ -131,12 +130,6 @@ class platform::sm $cgcs_nfs_ip_network_url = $::platform::network::mgmt::params::subnet_network_url $cgcs_nfs_ip_param_mask = $::platform::network::mgmt::params::subnet_prefixlen - # Re-using cinder-ip for cluster-host-ip for now - # This will be changed when the cluster-host-ip resource is added to SM - $cinder_ip_interface = $::platform::network::cluster_host::params::interface_name - $cinder_ip_param_ip = $::platform::network::cluster_host::params::controller_address - $cinder_ip_param_mask = $::platform::network::cluster_host::params::subnet_prefixlen - $platform_nfs_subnet_url = "${platform_nfs_ip_network_url}/${platform_nfs_ip_param_mask}" $cgcs_nfs_subnet_url = "${cgcs_nfs_ip_network_url}/${cgcs_nfs_ip_param_mask}" @@ -181,8 +174,7 @@ class platform::sm $hostunit = '0' $management_my_unit_ip = $::platform::network::mgmt::params::controller0_address $oam_my_unit_ip = $::platform::network::oam::params::controller_address - # Repurposing the infra interface for cluster-host interface - $infra_my_unit_ip = $::platform::network::cluster_host::params::controller_address + $cluster_host_my_unit_ip = $::platform::network::cluster_host::params::controller_address } else { case $::hostname { $controller_0_hostname: { @@ -191,9 +183,8 @@ class platform::sm $management_peer_unit_ip = $::platform::network::mgmt::params::controller1_address $oam_my_unit_ip = $::platform::network::oam::params::controller0_address $oam_peer_unit_ip = $::platform::network::oam::params::controller1_address - # Repurposing the infra interface for cluster-host interface - $infra_my_unit_ip = $::platform::network::cluster_host::params::controller0_address - $infra_peer_unit_ip = $::platform::network::cluster_host::params::controller1_address + $cluster_host_my_unit_ip = $::platform::network::cluster_host::params::controller0_address + $cluster_host_peer_unit_ip = $::platform::network::cluster_host::params::controller1_address } $controller_1_hostname: { $hostunit = '1' @@ -201,9 +192,8 @@ class platform::sm $management_peer_unit_ip = $::platform::network::mgmt::params::controller0_address $oam_my_unit_ip = $::platform::network::oam::params::controller1_address $oam_peer_unit_ip = $::platform::network::oam::params::controller0_address - # Repurposing the infra interface for cluster-host interface - $infra_my_unit_ip = $::platform::network::cluster_host::params::controller1_address - $infra_peer_unit_ip = $::platform::network::cluster_host::params::controller0_address + $cluster_host_my_unit_ip = $::platform::network::cluster_host::params::controller1_address + $cluster_host_peer_unit_ip = $::platform::network::cluster_host::params::controller0_address } default: { $hostunit = '2' @@ -247,8 +237,10 @@ class platform::sm command => "sm-configure interface controller management-interface ${mgmt_ip_multicast} ${management_my_unit_ip} 2222 2223 \"\" 2222 2223", } - exec { 'Configure Cluster Host Interface': - command => "sm-configure interface controller infrastructure-interface \"\" ${infra_my_unit_ip} 2222 2223 \"\" 2222 2223", + if $mgmt_ip_interface != $cluster_host_ip_interface { + exec { 'Configure Cluster Host Interface': + command => "sm-configure interface controller cluster-host-interface ${cluster_host_ip_multicast} ${cluster_host_my_unit_ip} 2222 2223 \"\" 2222 2223", + } } } else { @@ -258,8 +250,28 @@ class platform::sm exec { 'Configure Management Interface': command => "sm-configure interface controller management-interface ${mgmt_ip_multicast} ${management_my_unit_ip} 2222 2223 ${management_peer_unit_ip} 2222 2223", } - exec { 'Configure Infrastructure Interface': - command => "sm-configure interface controller infrastructure-interface ${infra_ip_multicast} ${infra_my_unit_ip} 2222 2223 ${infra_peer_unit_ip} 2222 2223", + + if $mgmt_ip_interface != $cluster_host_ip_interface { + exec { 'Configure Cluster Host Interface': + command => + "sm-configure interface controller cluster-host-interface ${cluster_host_ip_multicast} ${cluster_host_my_unit_ip} 2222 2223 ${cluster_host_peer_unit_ip} 2222 2223", + } + } + } + + if $mgmt_ip_interface == $cluster_host_ip_interface { + # Deprovision Cluster Host Interface + exec { 'Deprovision Cluster Host Interface': + command => + 'sm-deprovision service-domain-interface controller cluster-host-interface', + } + -> exec { 'Deprovision Cluster Host Service Group Member': + command => + 'sm-deprovision service-group-member controller-services cluster-host-ip', + } + -> exec { 'Deprovision Cluster Host IP service': + command => + 'sm-deprovision service cluster-host-ip', } } @@ -277,6 +289,20 @@ class platform::sm } } + if $mgmt_ip_interface != $cluster_host_ip_interface { + if $system_mode == 'duplex-direct' or $system_mode == 'simplex' { + exec { 'Configure Cluster Host IP service instance': + command => + "sm-configure service_instance cluster-host-ip cluster-host-ip \"ip=${cluster_host_ip_param_ip},cidr_netmask=${cluster_host_ip_param_mask},nic=${cluster_host_ip_interface},arp_count=7,dc=yes\"", + } + } else { + exec { 'Configure Cluster Host IP service instance': + command => + "sm-configure service_instance cluster-host-ip cluster-host-ip \"ip=${cluster_host_ip_param_ip},cidr_netmask=${cluster_host_ip_param_mask},nic=${cluster_host_ip_interface},arp_count=7\"", + } + } + } + exec { 'Configure sm server and client port': command => "sm-configure system --sm_client_port=${sm_client_port} --sm_server_port=${sm_server_port}", } @@ -459,26 +485,6 @@ class platform::sm } } - # Re-using cinder-ip for cluster-host-ip for now - # This will be changed when the cluster-host-ip resource is added to SM - exec { 'Configure Cinder IP in SM (service-group-member cinder-ip)': - command => - 'sm-provision service-group-member controller-services cinder-ip', - } - -> exec { 'Configure Cinder IP in SM (service cinder-ip)': - command => 'sm-provision service cinder-ip', - } - - if $system_mode == 'duplex-direct' or $system_mode == 'simplex' { - exec { 'Configure Cinder IP service instance': - command => "sm-configure service_instance cinder-ip cinder-ip \"ip=${cinder_ip_param_ip},cidr_netmask=${cinder_ip_param_mask},nic=${cinder_ip_interface},arp_count=7,dc=yes\"", - } - } else { - exec { 'Configure Cinder IP service instance': - command => "sm-configure service_instance cinder-ip cinder-ip \"ip=${cinder_ip_param_ip},cidr_netmask=${cinder_ip_param_mask},nic=${cinder_ip_interface},arp_count=7\"", - } - } - exec { 'Configure NFS Management': command => "sm-configure service_instance nfs-mgmt nfs-mgmt \"exports=${nfs_server_mgmt_exports},mounts=${nfs_server_mgmt_mounts}\"", } diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/platform.py b/sysinv/sysinv/sysinv/sysinv/puppet/platform.py index 744d9dd3be..0344ea1db0 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/platform.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/platform.py @@ -325,7 +325,7 @@ class PlatformPuppet(base.BasePuppet): return { 'platform::sm::params::mgmt_ip_multicast': multicast_address.address, - 'platform::sm::params::infra_ip_multicast': + 'platform::sm::params::cluster_host_ip_multicast': multicast_address.address, }