Configure the management gateway on the nodes
Without this change, the nodes are configured to use the Fuel node as their default gateway. Note that the code path is different between MOS 8 and MOS 9 because of this bug fix [1] that hasn't been backported on MOS 8. [1] https://bugs.launchpad.net/fuel/+bug/1541309 Change-Id: I80a2fadf8b16b139d07c48a33c52efd33c66935f Closes-Bug: #1583994
This commit is contained in:
parent
2d74feb3d5
commit
a9059a0f90
|
@ -0,0 +1,51 @@
|
|||
# Copyright 2016 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
notice('fuel-plugin-influxdb-grafana: configure_default_route.pp')
|
||||
|
||||
$fuel_version = 0 + hiera('fuel_version')
|
||||
|
||||
if $fuel_version < 9.0 {
|
||||
# The code below is a copy-paste from configure_default_route.pp in
|
||||
# fuel-library (branch stable/8.0)
|
||||
# Unfortunately we have no way to do otherwise since we need to support both
|
||||
# MOS 8 and MOS 9
|
||||
$network_scheme = hiera_hash('network_scheme', {})
|
||||
$management_vrouter_vip = hiera('management_vrouter_vip')
|
||||
$management_role = 'management'
|
||||
$fw_admin_role = 'fw-admin'
|
||||
|
||||
if ( $::l23_os =~ /(?i:centos6)/ and $::kernelmajversion == '3.10' ) {
|
||||
$ovs_datapath_package_name = 'kmod-openvswitch-lt'
|
||||
}
|
||||
|
||||
$use_ovs_dkms_datapath_module = $::l23_os ? {
|
||||
/(?i:redhat7|centos7)/ => false,
|
||||
default => true
|
||||
}
|
||||
class { 'l23network' :
|
||||
use_ovs => hiera('use_ovs', false),
|
||||
use_ovs_dkms_datapath_module => $use_ovs_dkms_datapath_module,
|
||||
ovs_datapath_package_name => $ovs_datapath_package_name,
|
||||
}
|
||||
|
||||
$new_network_scheme = configure_default_route($network_scheme, $management_vrouter_vip, $fw_admin_role, $management_role )
|
||||
notice ($new_network_scheme)
|
||||
|
||||
if !empty($new_network_scheme) {
|
||||
prepare_network_config($new_network_scheme)
|
||||
$sdn = generate_network_config()
|
||||
notify {'SDN': message => $sdn }
|
||||
}
|
||||
}
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
notice('fuel-plugin-elasticsearch-kibana: hiera_override.pp')
|
||||
|
||||
$fuel_version = 0 + hiera('fuel_version')
|
||||
|
||||
# Initialize network-related variables
|
||||
$network_scheme = hiera_hash('network_scheme')
|
||||
$network_metadata = hiera_hash('network_metadata')
|
||||
|
@ -210,3 +212,7 @@ file { $hiera_file:
|
|||
ensure => file,
|
||||
content => $calculated_content,
|
||||
}
|
||||
|
||||
if $fuel_version >= 9.0 {
|
||||
class { '::osnailyfacter::netconfig::hiera_default_route' :}
|
||||
}
|
||||
|
|
|
@ -158,6 +158,20 @@
|
|||
# Tasks defintions for the post-deployment
|
||||
##########################################
|
||||
|
||||
# Configure the default gateway (required for MOS 8 only)
|
||||
- id: elasticsearch-configure-default-route
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
role: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [post_deployment_start]
|
||||
required_for: [post_deployment_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/configure_default_route.pp"
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 120
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
# In order to automatically import dashboards, it is mandatory to create and
|
||||
# configure the Kibana index before Kibana4 starts. This task is ran at post-deployment
|
||||
# stage because the index creation must occur when the Elasticsearch cluster is ready
|
||||
|
|
Loading…
Reference in New Issue