Patch changes parameters from being interface names of linux interfaces
to being network subnets. This removes the need to actually specify the
network interface to puppet module and is found out dynamically at
puppet runtime.
JIRA: BGS-42
Change-Id: Ibab114c46dd2ec9fde244b6687bf272849b15d6b
Signed-off-by: Tim Rozet <trozet@redhat.com>
- if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
-
if !$rbd_secret_uuid { $rbd_secret_uuid = '3b519746-4021-4f72-957e-5b9d991723be' }
if !$private_subnet { fail('private_subnet is empty')}
if !$ceph_public_network { $ceph_public_network = $private_subnet }
if !$rbd_secret_uuid { $rbd_secret_uuid = '3b519746-4021-4f72-957e-5b9d991723be' }
if !$private_subnet { fail('private_subnet is empty')}
if !$ceph_public_network { $ceph_public_network = $private_subnet }
##HA Global params
if $ha_flag {
##HA Global params
if $ha_flag {
+ if $private_network == '' { fail('private_network is empty') }
if !$keystone_private_vip { fail('keystone_private_vip is empty') }
if !$glance_private_vip { fail('glance_private_vip is empty') }
if !$nova_private_vip { fail('nova_private_vip is empty') }
if !$keystone_private_vip { fail('keystone_private_vip is empty') }
if !$glance_private_vip { fail('glance_private_vip is empty') }
if !$nova_private_vip { fail('nova_private_vip is empty') }
if !$ceph_mon_initial_members { $ceph_mon_initial_members = $controllers_hostnames_array }
if !$ceph_mon_host { $ceph_mon_host = $controllers_ip_array }
if !$neutron_private_vip { fail('neutron_private_vip is empty') }
if !$ceph_mon_initial_members { $ceph_mon_initial_members = $controllers_hostnames_array }
if !$ceph_mon_host { $ceph_mon_host = $controllers_ip_array }
if !$neutron_private_vip { fail('neutron_private_vip is empty') }
+
+ ##Find private interface
+ $ovs_tunnel_if = get_nic_from_network("$private_network")
+
+ if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
if !$private_ip { fail('private_ip is empty') }
$keystone_private_vip = $private_ip
$glance_private_vip = $private_ip
if !$private_ip { fail('private_ip is empty') }
$keystone_private_vip = $private_ip
$glance_private_vip = $private_ip
##Mandatory Common variables
if $admin_email == '' { fail('admin_email is empty') }
##Mandatory Common variables
if $admin_email == '' { fail('admin_email is empty') }
- if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
##Most users will only care about a single user/password for all services
##so lets create one variable that can be used instead of separate usernames/passwords
##Most users will only care about a single user/password for all services
##so lets create one variable that can be used instead of separate usernames/passwords
if !$nova_admin_vip { fail('nova_admin_vip is empty') }
if !$nova_private_vip { fail('nova_private_vip is empty') }
if !$nova_public_vip { fail('nova_public_vip is empty') }
if !$nova_admin_vip { fail('nova_admin_vip is empty') }
if !$nova_private_vip { fail('nova_private_vip is empty') }
if !$nova_public_vip { fail('nova_public_vip is empty') }
+ if $private_network == '' { fail('private_network is empty') }
+ ##Find private interface
+ $ovs_tunnel_if = get_nic_from_network("$private_network")
##Optional HA variables
if !$amqp_username { $amqp_username = $single_username }
##Optional HA variables
if !$amqp_username { $amqp_username = $single_username }
if !$pcmk_server_addrs {$pcmk_server_addrs = $controllers_ip_array}
if !$pcmk_server_names {$pcmk_server_names = ["pcmk-${controllers_hostnames_array[0]}", "pcmk-${controllers_hostnames_array[1]}", "pcmk-${controllers_hostnames_array[2]}"] }
if !$rbd_secret_uuid { $rbd_secret_uuid = '3b519746-4021-4f72-957e-5b9d991723be' }
if !$pcmk_server_addrs {$pcmk_server_addrs = $controllers_ip_array}
if !$pcmk_server_names {$pcmk_server_names = ["pcmk-${controllers_hostnames_array[0]}", "pcmk-${controllers_hostnames_array[1]}", "pcmk-${controllers_hostnames_array[2]}"] }
if !$rbd_secret_uuid { $rbd_secret_uuid = '3b519746-4021-4f72-957e-5b9d991723be' }
- if !$storage_iface { $storage_iface = $ovs_tunnel_if }
+ if !$storage_network {
+ $storage_iface = $ovs_tunnel_if
+ } else {
+ $storage_iface = get_nic_from_network("$storage_network")
+ }
##we assume here that if not provided, the first controller is where ODL will reside
##this is fine for now as we will replace ODL with ODL HA when it is ready
##we assume here that if not provided, the first controller is where ODL will reside
##this is fine for now as we will replace ODL with ODL HA when it is ready
+ if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
if $public_ip == '' { fail('public_ip is empty') }
if $private_ip == '' { fail('private_ip is empty') }
if $public_ip == '' { fail('public_ip is empty') }
if $private_ip == '' { fail('private_ip is empty') }