Get rid of old variables
* Get rid of old variables in all tasks except globals task: internal_int public_int internal_address internal_netmask public_address public_netmask storage_address storage_netmask * Add comments to globals task about depreciation Change-Id: I6b0a5d20fe7cd5b718e99d21e3c3ef67a5c71e3d Closes-bug: #1484199
This commit is contained in:
parent
8b7c0c7da1
commit
c709454598
|
@ -93,7 +93,7 @@ Sync {
|
|||
# send the synchronization messages. Remember that you must
|
||||
# use a dedicated link for the synchronization messages.
|
||||
#
|
||||
IPv4_interface 240.1.0.<%= @internal_address.rpartition(".").last %>
|
||||
IPv4_interface 240.1.0.<%= @bind_address.rpartition(".").last %>
|
||||
|
||||
#
|
||||
# The name of the interface that you are going to use to
|
||||
|
|
|
@ -19,7 +19,6 @@ $nodes_hash = hiera('nodes')
|
|||
$storage_hash = hiera('storage')
|
||||
$rabbit_hash = hiera_hash('rabbit_hash')
|
||||
$management_vip = hiera('management_vip')
|
||||
$internal_address = hiera('internal_address')
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$ceilometer_hash = hiera_hash('ceilometer', $default_ceilometer_hash)
|
||||
$ceilometer_region = pick($ceilometer_hash['region'], $region)
|
||||
|
|
|
@ -98,20 +98,11 @@ $cinder_rate_limits = hiera('cinder_rate_limits',
|
|||
}
|
||||
)
|
||||
|
||||
$default_gateway = get_default_gateways()
|
||||
|
||||
$internal_int = get_network_role_property('management', 'interface')
|
||||
$public_int = get_network_role_property('ex', 'interface')
|
||||
$internal_address = get_network_role_property('management', 'ipaddr')
|
||||
$internal_netmask = get_network_role_property('management', 'netmask')
|
||||
$public_address = get_network_role_property('ex', 'ipaddr')
|
||||
$public_netmask = get_network_role_property('ex', 'netmask')
|
||||
$storage_address = get_network_role_property('storage', 'ipaddr')
|
||||
$storage_netmask = get_network_role_property('storage', 'netmask')
|
||||
$public_vip = $network_metadata['vips']['public']['ipaddr']
|
||||
$management_vip = $network_metadata['vips']['management']['ipaddr']
|
||||
$public_vrouter_vip = $network_metadata['vips']['vrouter_pub']['ipaddr']
|
||||
$management_vrouter_vip = $network_metadata['vips']['vrouter']['ipaddr']
|
||||
$default_gateway = get_default_gateways()
|
||||
$public_vip = $network_metadata['vips']['public']['ipaddr']
|
||||
$management_vip = $network_metadata['vips']['management']['ipaddr']
|
||||
$public_vrouter_vip = $network_metadata['vips']['vrouter_pub']['ipaddr']
|
||||
$management_vrouter_vip = $network_metadata['vips']['vrouter']['ipaddr']
|
||||
|
||||
$database_vip = is_hash($network_metadata['vips']['database']) ? {
|
||||
true => pick($network_metadata['vips']['database']['ipaddr'], $management_vip),
|
||||
|
@ -285,6 +276,18 @@ $mongo_roles = ['primary-mongo', 'mongo']
|
|||
# todo: use special node-roles instead controllers in the future
|
||||
$neutron_nodes = get_nodes_hash_by_roles($network_metadata, ['primary-controller', 'controller'])
|
||||
|
||||
##################### DO NOT USE BELOW VARIABLES ANYMORE ############################
|
||||
# THEY ARE DEPRECATED AND WILL BE REMOVED IN NEXT RELEASE
|
||||
$internal_int = get_network_role_property('management', 'interface')
|
||||
$public_int = get_network_role_property('ex', 'interface')
|
||||
$internal_address = get_network_role_property('management', 'ipaddr')
|
||||
$internal_netmask = get_network_role_property('management', 'netmask')
|
||||
$public_address = get_network_role_property('ex', 'ipaddr')
|
||||
$public_netmask = get_network_role_property('ex', 'netmask')
|
||||
$storage_address = get_network_role_property('storage', 'ipaddr')
|
||||
$storage_netmask = get_network_role_property('storage', 'netmask')
|
||||
############################## END DEPRECATED VARIABLES #############################
|
||||
|
||||
# save all these global variables into hiera yaml file for later use
|
||||
# by other manifests with hiera function
|
||||
file { $globals_yaml_file :
|
||||
|
|
|
@ -2,9 +2,6 @@ notice('MODULAR: openstack-cinder.pp')
|
|||
|
||||
#Network stuff
|
||||
prepare_network_config(hiera('network_scheme', {}))
|
||||
$internal_address = get_network_role_property('cinder/api', 'ipaddr')
|
||||
$storage_address = get_network_role_property('cinder/iscsi', 'ipaddr')
|
||||
|
||||
$cinder_hash = hiera_hash('cinder_hash', {})
|
||||
$management_vip = hiera('management_vip')
|
||||
$queue_provider = hiera('queue_provider', 'rabbitmq')
|
||||
|
@ -74,8 +71,8 @@ class {'openstack::cinder':
|
|||
enabled => true,
|
||||
glance_api_servers => $glance_api_servers,
|
||||
auth_host => $service_endpoint,
|
||||
bind_host => $internal_address,
|
||||
iscsi_bind_host => $storage_address,
|
||||
bind_host => get_network_role_property('cinder/api', 'ipaddr'),
|
||||
iscsi_bind_host => get_network_role_property('cinder/iscsi', 'ipaddr'),
|
||||
keystone_user => $keystone_user,
|
||||
keystone_tenant => $keystone_tenant,
|
||||
auth_uri => $auth_uri,
|
||||
|
|
|
@ -17,7 +17,6 @@ $syslog_log_facility_nova = hiera('syslog_log_facility_nova','LOG_LOCAL6')
|
|||
$syslog_log_facility_keystone = hiera('syslog_log_facility_keystone', 'LOG_LOCAL7')
|
||||
$management_vip = hiera('management_vip')
|
||||
$public_vip = hiera('public_vip')
|
||||
$storage_address = hiera('storage_address')
|
||||
$sahara_hash = hiera_hash('sahara', {})
|
||||
$nodes_hash = hiera('nodes', {})
|
||||
$mysql_hash = hiera_hash('mysql', {})
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
notice('MODULAR: openstack-network-compute.pp')
|
||||
|
||||
$network_scheme = hiera('network_scheme', {})
|
||||
prepare_network_config($network_scheme)
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
$nova_hash = hiera_hash('nova_hash', {})
|
||||
$internal_address = hiera('internal_address')
|
||||
$bind_address = get_network_role_property('nova/api', 'ipaddr')
|
||||
$management_vip = hiera('management_vip')
|
||||
$service_endpoint = hiera('service_endpoint')
|
||||
$public_int = hiera('public_int', undef)
|
||||
$auto_assign_floating_ip = hiera('auto_assign_floating_ip', false)
|
||||
$controllers = hiera('controllers')
|
||||
$rabbit_hash = hiera_hash('rabbit_hash', {})
|
||||
$network_scheme = hiera('network_scheme', {})
|
||||
$neutron_endpoint = hiera('neutron_endpoint', $management_vip)
|
||||
$region = hiera('region', 'RegionOne')
|
||||
|
||||
|
@ -98,7 +99,7 @@ if $network_provider == 'nova' {
|
|||
admin_user => 'nova',
|
||||
admin_password => $nova_hash[user_password],
|
||||
enabled_apis => $enabled_apis,
|
||||
api_bind_address => $internal_address,
|
||||
api_bind_address => $bind_address,
|
||||
ratelimits => hiera('nova_rate_limits'),
|
||||
# NOTE(bogdando) 1 api worker for compute node is enough
|
||||
osapi_compute_workers => 1,
|
||||
|
@ -113,7 +114,7 @@ if $network_provider == 'nova' {
|
|||
nova_config {
|
||||
'DEFAULT/multi_host': value => 'True';
|
||||
'DEFAULT/send_arp_for_ha': value => 'True';
|
||||
'DEFAULT/metadata_host': value => $internal_address;
|
||||
'DEFAULT/metadata_host': value => $bind_address;
|
||||
}
|
||||
|
||||
if ! $public_interface {
|
||||
|
@ -288,9 +289,6 @@ if $network_provider == 'neutron' {
|
|||
$bridge_mappings = []
|
||||
}
|
||||
|
||||
# Required to use get_network_role_property
|
||||
prepare_network_config($network_scheme)
|
||||
|
||||
if $neutron_settings['L2']['segmentation_type'] != 'vlan' {
|
||||
# tunneling_mode
|
||||
$net_role_property = 'neutron/mesh'
|
||||
|
|
|
@ -2,7 +2,6 @@ notice('MODULAR: cinder.pp')
|
|||
|
||||
# Pulling hiera
|
||||
prepare_network_config(hiera('network_scheme', {}))
|
||||
$internal_address = get_network_role_property('cinder/api', 'ipaddr')
|
||||
$storage_address = get_network_role_property('cinder/iscsi', 'ipaddr')
|
||||
$public_vip = hiera('public_vip')
|
||||
$management_vip = hiera('management_vip')
|
||||
|
@ -231,7 +230,7 @@ if ($use_ceph and !$storage_hash['volumes_lvm']) {
|
|||
'controller', 'ceph-mon'], 'name'),
|
||||
mon_ip_addresses => nodes_with_roles($nodes_hash, ['primary-controller',
|
||||
'controller', 'ceph-mon'], 'internal_address'),
|
||||
cluster_node_address => $controller_node_public,
|
||||
cluster_node_address => $public_vip,
|
||||
osd_pool_default_size => $storage_hash['osd_pool_size'],
|
||||
osd_pool_default_pg_num => $storage_hash['pg_num'],
|
||||
osd_pool_default_pgp_num => $storage_hash['pg_num'],
|
||||
|
@ -258,7 +257,7 @@ package { 'python-amqp':
|
|||
ensure => present
|
||||
}
|
||||
if member($roles, 'controller') or member($roles, 'primary-controller') {
|
||||
$bind_host = $internal_address
|
||||
$bind_host = get_network_role_property('cinder/api', 'ipaddr')
|
||||
} else {
|
||||
$bind_host = false
|
||||
# Configure auth_strategy on cinder node, if cinder and controller are
|
||||
|
|
|
@ -11,7 +11,6 @@ $public_vip = hiera('public_vip')
|
|||
$management_vip = hiera('management_vip')
|
||||
$database_vip = hiera('database_vip')
|
||||
$service_endpoint = hiera('service_endpoint')
|
||||
$internal_address = get_network_role_property('nova/api', 'ipaddr')
|
||||
$primary_controller = hiera('primary_controller')
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
$sahara_hash = hiera('sahara', {})
|
||||
|
@ -120,16 +119,6 @@ $floating_hash = {}
|
|||
|
||||
##CALCULATED PARAMETERS
|
||||
|
||||
|
||||
##NO NEED TO CHANGE
|
||||
|
||||
#todo:(sv): temporary commented. Will be uncommented while
|
||||
# 'multiple-l2-network' feature re-implemented
|
||||
# if $use_neutron {
|
||||
# $vip_mgmt_other_nets = join($network_scheme['endpoints']["$internal_int"]['other_nets'], ' ')
|
||||
# }
|
||||
|
||||
|
||||
##TODO: simply parse nodes array
|
||||
$memcache_nodes = get_nodes_hash_by_roles(hiera('network_metadata'), hiera('memcache_roles'))
|
||||
$memcache_ipaddrs = ipsort(values(get_node_to_ipaddr_map_by_network_role($memcache_nodes,'mgmt/memcache')))
|
||||
|
@ -240,7 +229,7 @@ class { 'openstack::compute':
|
|||
enabled => false,
|
||||
public_interface => $public_int ? { undef=>'', default=>$public_int},
|
||||
private_interface => $use_neutron ? { true=>false, default=>hiera('private_int', undef)},
|
||||
internal_address => $internal_address,
|
||||
internal_address => get_network_role_property('nova/api', 'ipaddr'),
|
||||
libvirt_type => hiera('libvirt_type', undef),
|
||||
fixed_range => $use_neutron ? { true=>false, default=>hiera('fixed_network_range', undef)},
|
||||
network_manager => hiera('network_manager', undef),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
notice('MODULAR: conntrackd.pp')
|
||||
|
||||
prepare_network_config(hiera('network_scheme', {}))
|
||||
|
||||
case $operatingsystem {
|
||||
Centos: { $conntrackd_package = "conntrack-tools" }
|
||||
Ubuntu: { $conntrackd_package = "conntrackd" }
|
||||
|
@ -9,7 +11,7 @@ case $operatingsystem {
|
|||
### CONNTRACKD for CentOS 6 doesn't work under namespaces ##
|
||||
|
||||
if $operatingsystem == 'Ubuntu' {
|
||||
$internal_address = hiera('internal_address')
|
||||
$bind_address = get_network_role_property('mgmt/vip', 'ipaddr')
|
||||
|
||||
package { $conntrackd_package:
|
||||
ensure => installed,
|
||||
|
|
|
@ -387,6 +387,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -381,6 +381,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -381,6 +381,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex:
|
||||
public/vip:
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -389,6 +389,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -389,6 +389,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -387,6 +387,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -387,6 +387,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -395,6 +395,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -387,6 +387,7 @@ network_scheme:
|
|||
provider: lnx
|
||||
roles:
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -329,6 +329,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth0.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -329,6 +329,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth0.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -329,6 +329,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth0.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -824,6 +824,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -436,6 +436,7 @@ network_scheme:
|
|||
novanetwork/fixed: eth3.103
|
||||
ceilometer/api: br-mgmt
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
ceph/public: br-mgmt
|
||||
mgmt/messaging: br-mgmt
|
||||
management: br-mgmt
|
||||
|
|
|
@ -834,6 +834,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -834,6 +834,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -834,6 +834,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -823,6 +823,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -834,6 +834,7 @@ network_scheme:
|
|||
roles:
|
||||
novanetwork/fixed: eth3.103
|
||||
ex: br-ex
|
||||
public/vip: br-ex
|
||||
neutron/floating: br-floating
|
||||
storage: br-storage
|
||||
keystone/api: br-mgmt
|
||||
|
|
|
@ -5,7 +5,7 @@ manifest = 'horizon/horizon.pp'
|
|||
describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
|
||||
internal_address = Noop.node_hash['internal_address']
|
||||
bind_address = Noop.node_hash['internal_address'] # TODO: smakar change AFTER https://bugs.launchpad.net/fuel/+bug/1486048
|
||||
nova_quota = Noop.hiera 'nova_quota'
|
||||
management_vip = Noop.hiera('management_vip')
|
||||
keystone_url = "http://#{management_vip}:5000/v2.0"
|
||||
|
@ -17,7 +17,7 @@ describe manifest do
|
|||
it 'should declare openstack::horizon class' do
|
||||
should contain_class('openstack::horizon').with(
|
||||
'nova_quota' => nova_quota,
|
||||
'bind_address' => internal_address,
|
||||
'bind_address' => bind_address,
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -36,4 +36,4 @@ describe manifest do
|
|||
end
|
||||
end
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ describe manifest do
|
|||
node_role = Noop.hiera('node_role')
|
||||
public_ip = Noop.hiera('public_vip')
|
||||
management_ip = Noop.hiera('management_vip')
|
||||
internal_address = Noop.hiera('internal_address')
|
||||
bind_address = Noop.hiera('internal_address') # TODO: smakar change AFTER https://bugs.launchpad.net/fuel/+bug/1486048
|
||||
region = Noop.hiera('region', 'RegionOne')
|
||||
use_neutron = Noop.hiera('use_neutron', false)
|
||||
service_endpoint = Noop.hiera('service_endpoint', management_ip)
|
||||
|
@ -38,7 +38,7 @@ describe manifest do
|
|||
|
||||
if murano_enabled
|
||||
api_bind_port = '8082'
|
||||
api_bind_host = internal_address
|
||||
api_bind_host = bind_address
|
||||
|
||||
internal_url = "http://#{service_endpoint}:#{api_bind_port}"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ describe manifest do
|
|||
|
||||
# TODO All this stuff should be moved to shared examples controller* tests.
|
||||
|
||||
internal_address = Noop.node_hash['internal_address']
|
||||
metadata_host = Noop.node_hash['internal_address'] # TODO: smakar change AFTER https://bugs.launchpad.net/fuel/+bug/1486048
|
||||
use_neutron = Noop.hiera 'use_neutron'
|
||||
|
||||
it 'should declare openstack::network with use_stderr disabled' do
|
||||
|
@ -177,7 +177,7 @@ describe manifest do
|
|||
'value' => 'True',
|
||||
)
|
||||
should contain_nova_config('DEFAULT/metadata_host').with(
|
||||
'value' => internal_address,
|
||||
'value' => metadata_host,
|
||||
)
|
||||
end
|
||||
it 'should declare openstack::network with neutron disabled' do
|
||||
|
|
|
@ -16,8 +16,8 @@ describe manifest do
|
|||
primary_controller = Noop.hiera('primary_controller')
|
||||
service_endpoint = Noop.hiera('service_endpoint')
|
||||
public_vip = Noop.hiera('public_vip')
|
||||
internal_address = Noop.hiera('internal_address')
|
||||
database_vip = Noop.hiera('database_vip', internal_address)
|
||||
bind_address = Noop.hiera('internal_address') # TODO: smakar change AFTER https://bugs.launchpad.net/fuel/+bug/1486048
|
||||
database_vip = Noop.hiera('database_vip', bind_address)
|
||||
amqp_port = Noop.hiera('amqp_port')
|
||||
amqp_hosts = Noop.hiera('amqp_hosts')
|
||||
debug = Noop.hiera('debug', false)
|
||||
|
@ -30,7 +30,7 @@ describe manifest do
|
|||
if sahara_enabled
|
||||
firewall_rule = '201 sahara-api'
|
||||
api_bind_port = '8386'
|
||||
api_bind_host = internal_address
|
||||
api_bind_host = bind_address
|
||||
sahara_plugins = [ 'ambari', 'cdh', 'mapr', 'spark', 'vanilla' ]
|
||||
if public_ssl
|
||||
public_address = Noop.hiera_structure('public_ssl/hostname')
|
||||
|
|
Loading…
Reference in New Issue