More fixes for new fuel version
* Added "skip" for new primary-* tasks(tasks for primary-controller) * Added restrictions for hide plugin with neutron and vlan segmentation selected * Change script to configure neutron haproxy config * Added refresh_on for openstack-network-neutron-start task Change-Id: I0a487ec5a81706e853a6ddcceb696fe5f4eaf7f0
This commit is contained in:
parent
18d3e62fdf
commit
439d7a06f8
|
@ -1,31 +1,7 @@
|
|||
notice('fuel-plugin-nsxv: openstack-haproxy-neutron-nsxv.pp')
|
||||
notice('fuel-plugin-nsxv: neutron-haproxy-config.pp')
|
||||
|
||||
# NOT enabled by default
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
|
||||
$neutron_address_map = get_node_to_ipaddr_map_by_network_role(hiera_hash('neutron_nodes'), 'neutron/api')
|
||||
if ($use_neutron) {
|
||||
$server_names = hiera_array('neutron_names', keys($neutron_address_map))
|
||||
$ipaddresses = hiera_array('neutron_ipaddresses', values($neutron_address_map))
|
||||
$public_virtual_ip = hiera('public_vip')
|
||||
$internal_virtual_ip = hiera('management_vip')
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
|
||||
# configure neutron ha proxy
|
||||
openstack::ha::haproxy_service { 'neutron':
|
||||
internal_virtual_ip => $internal_virtual_ip,
|
||||
ipaddresses => $ipaddresses,
|
||||
public_virtual_ip => $public_virtual_ip,
|
||||
server_names => $server_names,
|
||||
order => '085',
|
||||
listen_port => 9696,
|
||||
public => true,
|
||||
public_ssl => $public_ssl_hash['services'],
|
||||
define_backups => true,
|
||||
haproxy_config_options => {
|
||||
option => ['httpchk', 'httplog','httpclose'],
|
||||
timeout => ['client 600s','client-fin 30s','server 600s','server-fin 30s'],
|
||||
},
|
||||
balancermember_options => 'check inter 10s fastinter 2s downinter 3s rise 3 fall 3',
|
||||
}
|
||||
if $use_neutron {
|
||||
class { '::nsxv::neutron_haproxy_config': }
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
notice('fuel-plugin-nsxv: neutron-network-create.pp')
|
||||
|
||||
# NOT enabled by default
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
$plugin_name = 'NAME'
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
|
||||
if ($use_neutron) {
|
||||
$access_hash = hiera_hash('access',{})
|
||||
|
@ -10,7 +11,7 @@ if ($use_neutron) {
|
|||
$floating_net = try_get_value($neutron_config, 'default_floating_net', 'net04_ext')
|
||||
$internal_net = try_get_value($neutron_config, 'default_private_net', 'net04')
|
||||
$os_tenant_name = $access_hash['tenant']
|
||||
$settings = hiera('nsxv')
|
||||
$settings = hiera($plugin_name)
|
||||
|
||||
if !empty($settings['nsxv_floating_ip_range']) and !empty($settings['nsxv_floating_net_cidr']) {
|
||||
$floating_ip_range = split($settings['nsxv_floating_ip_range'], '-')
|
||||
|
|
|
@ -3,5 +3,7 @@ notice('fuel-plugin-nsxv: nsxv-config.pp')
|
|||
$use_neutron = hiera('use_neutron', false)
|
||||
|
||||
if $use_neutron {
|
||||
class { '::nsxv': }
|
||||
class { '::nsxv':
|
||||
plugin_name => 'NAME',
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
neutronHaproxyConf='/etc/haproxy/conf.d/085-neutron.cfg'
|
||||
tempFile="$(mktemp)"
|
||||
|
||||
awk '
|
||||
BEGIN {
|
||||
firstServer=1
|
||||
}
|
||||
{
|
||||
if ($1 == "server") {
|
||||
if (firstServer == 1) {
|
||||
firstServer = 0
|
||||
print $0
|
||||
}
|
||||
else {
|
||||
if ($NF != "backup") {
|
||||
print $0,"backup"
|
||||
} else {
|
||||
print $0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( $1 == "timeout" && $2 == "client" ) { next }
|
||||
if ( $1 == "timeout" && $2 == "client-fin" ) { next }
|
||||
if ( $1 == "timeout" && $2 == "server" ) { next }
|
||||
if ( $1 == "timeout" && $2 == "server-fin" ) { next }
|
||||
print $0
|
||||
}
|
||||
}
|
||||
END {
|
||||
print " timeout client 600s"
|
||||
print " timeout client-fin 30s"
|
||||
print " timeout server 600s"
|
||||
print " timeout server-fin 30s"
|
||||
} ' $neutronHaproxyConf > $tempFile && mv -f $tempFile $neutronHaproxyConf
|
|
@ -1,17 +1,6 @@
|
|||
class nsxv::hiera_override (
|
||||
$plugin_name,
|
||||
) {
|
||||
$override_file = "/etc/hiera/override/${plugin_name}.yaml"
|
||||
$override_dir = dirname($override_file)
|
||||
|
||||
exec { "${plugin_name}_hiera_override":
|
||||
command => "sed -ri 's|^((\\s+-\\s+)\"override/module/%\\{calling_module\\}\")|\\1\\n\\2override/${plugin_name}|' /etc/hiera.yaml",
|
||||
unless => "grep -q \"override/${plugin_name}\" /etc/hiera.yaml",
|
||||
path => '/bin:/usr/bin',
|
||||
provider => 'shell',
|
||||
}
|
||||
file { $override_dir:
|
||||
ensure => directory,
|
||||
}
|
||||
$override_file = "/etc/hiera/plugins/${plugin_name}.yaml"
|
||||
hiera_overrides($override_file)
|
||||
}
|
||||
|
|
|
@ -2,11 +2,12 @@ class nsxv (
|
|||
$nsxv_config_dir = '/etc/neutron/plugins/vmware',
|
||||
$neutron_plugin_name = 'python-vmware-nsx',
|
||||
$lbaas_plugin_name = 'python-neutron-lbaas',
|
||||
$plugin_name = 'nsxv'
|
||||
) {
|
||||
|
||||
$neutron_config = hiera_hash('neutron_config')
|
||||
|
||||
$settings = hiera('nsxv')
|
||||
$settings = hiera($plugin_name)
|
||||
|
||||
# Do not remove unused variables: template nsx.ini.erb refers to them
|
||||
$nova_metadata_ips = hiera('public_vip')
|
||||
|
@ -45,9 +46,10 @@ class nsxv (
|
|||
content => template("${module_name}/nsx.ini.erb"),
|
||||
require => File[$nsxv_config_dirs],
|
||||
}
|
||||
# temprorary workaround for use nsx.ini
|
||||
file { '/etc/default/neutron-server':
|
||||
ensure => file,
|
||||
content => "CONF_ARG='--config-file ${nsxv_config_dir}/nsx.ini'",
|
||||
file { '/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => "${nsxv_config_dir}/nsx.ini",
|
||||
replace => true,
|
||||
require => File[$nsxv_config_dirs]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
class nsxv::neutron_haproxy_config {
|
||||
file { '/tmp/neutron-haproxy-config.sh':
|
||||
ensure => file,
|
||||
mode => '0755',
|
||||
source => "puppet:///modules/${module_name}/neutron-haproxy-config.sh",
|
||||
replace => true,
|
||||
}
|
||||
exec { 'neutron active/backup mode':
|
||||
command => "/tmp/neutron-haproxy-config.sh",
|
||||
logoutput => on_failure,
|
||||
provider => 'shell',
|
||||
require => File['/tmp/neutron-haproxy-config.sh'],
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
- id: hiera-override
|
||||
type: puppet
|
||||
groups: ['primary-controller','controller','compute-vmware']
|
||||
groups: [primary-controller,controller,compute-vmware]
|
||||
required_for: [netconfig]
|
||||
requires: [globals]
|
||||
parameters:
|
||||
|
@ -9,7 +9,7 @@
|
|||
timeout: 120
|
||||
- id: compute-vmware-nova-config
|
||||
type: puppet
|
||||
groups: ['compute-vmware']
|
||||
groups: [compute-vmware]
|
||||
required_for: [top-role-compute-vmware]
|
||||
requires: [top-role-compute]
|
||||
parameters:
|
||||
|
@ -18,7 +18,7 @@
|
|||
timeout: 300
|
||||
- id: openstack-haproxy-nova-metadata-public_vip
|
||||
type: puppet
|
||||
groups: ['primary-controller','controller']
|
||||
groups: [primary-controller,controller]
|
||||
required_for: [openstack-haproxy]
|
||||
requires: [openstack-haproxy-nova]
|
||||
parameters:
|
||||
|
@ -27,7 +27,7 @@
|
|||
timeout: 120
|
||||
- id: nsxv-install
|
||||
type: puppet
|
||||
groups: ['primary-controller','controller']
|
||||
groups: [primary-controller,controller]
|
||||
required_for: [openstack-network-neutron-start]
|
||||
requires: [hiera-override,openstack-network-server-config]
|
||||
parameters:
|
||||
|
@ -36,7 +36,7 @@
|
|||
timeout: 300
|
||||
- id: configure_default_route_cinder_vmware
|
||||
type: puppet
|
||||
groups: ['cinder-vmware']
|
||||
groups: [cinder-vmware]
|
||||
requires: [openstack-cinder]
|
||||
required_for: [top-role-cinder-vmware]
|
||||
parameters:
|
||||
|
@ -45,34 +45,40 @@
|
|||
timeout: 300
|
||||
- id: configure_default_route_compute_vmware
|
||||
type: puppet
|
||||
groups: ['compute-vmware']
|
||||
groups: [compute-vmware]
|
||||
requires: [top-role-compute]
|
||||
required_for: [top-role-compute-vmware]
|
||||
parameters:
|
||||
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/configure_default_route.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 300
|
||||
- id: openstack-haproxy-neutron
|
||||
type: skipped
|
||||
- id: openstack-haproxy-neutron-nsxv
|
||||
type: puppet
|
||||
groups: [primary-controller, controller]
|
||||
required_for: [openstack-haproxy]
|
||||
requires: [deploy_start, cluster-haproxy]
|
||||
requires: [deploy_start, openstack-haproxy-neutron]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/neutron-haproxy-config.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 300
|
||||
puppet_modules: puppet/modules
|
||||
timeout: 120
|
||||
- id: openstack-network-plugins-l2
|
||||
type: skipped
|
||||
- id: primary-openstack-network-plugins-l2
|
||||
type: skipped
|
||||
- id: openstack-network-networks
|
||||
type: skipped
|
||||
- id: openstack-network-agents-l3
|
||||
type: skipped
|
||||
- id: primary-openstack-network-agents-l3
|
||||
type: skipped
|
||||
- id: openstack-network-agents-dhcp
|
||||
type: skipped
|
||||
- id: primary-openstack-network-agents-dhcp
|
||||
type: skipped
|
||||
- id: openstack-network-agents-metadata
|
||||
type: skipped
|
||||
- id: primary-openstack-network-agents-metadata
|
||||
type: skipped
|
||||
- id: openstack-network-neutron-policy
|
||||
type: puppet
|
||||
groups: [primary-controller,controller]
|
||||
|
@ -83,6 +89,7 @@
|
|||
puppet_modules: puppet/modules
|
||||
timeout: 300
|
||||
- id: openstack-network-neutron-start
|
||||
refresh_on: [neutron_config]
|
||||
type: puppet
|
||||
groups: [primary-controller,controller]
|
||||
required_for: [openstack-network-server-nova]
|
||||
|
|
|
@ -2,7 +2,7 @@ attributes:
|
|||
# Show only if vcenter used
|
||||
metadata:
|
||||
restrictions:
|
||||
- condition: "settings:common.use_vcenter.value == false or cluster:net_provider != 'neutron'"
|
||||
- condition: "settings:common.use_vcenter.value == false or not ( cluster:net_provider == 'neutron' and networking_parameters:segmentation_type == 'tun')"
|
||||
action: 'hide'
|
||||
nsxv_manager_host:
|
||||
value: ''
|
||||
|
|
|
@ -10,4 +10,4 @@ ROOT="$(dirname `readlink -f $0`)"
|
|||
version=$(sed -rn 's/^version:\s*([0-9.])/\1/p' $ROOT/metadata.yaml)
|
||||
name=$(sed -rn 's/^name:\s*(.*)/\1/p' $ROOT/metadata.yaml)
|
||||
|
||||
sed -i "s/NAME/$name/" $ROOT/deployment_scripts/puppet/manifests/hiera-override.pp
|
||||
sed -i "s/'NAME'/'$name'/" $ROOT/deployment_scripts/puppet/manifests/*.pp
|
||||
|
|
Loading…
Reference in New Issue