summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Pasquier <spasquier@mirantis.com>2016-07-27 17:32:40 +0200
committerSimon Pasquier <spasquier@mirantis.com>2016-07-29 08:53:10 +0000
commita9059a0f90bd7e78ed4ceb48cca165bc42fe6b42 (patch)
tree9a8e7e4d3a2f7bf1ff08af82c5cb8a352c0a2402
parent2d74feb3d517485e3d9128fb286239fb1cec1284 (diff)
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
Notes
Notes (review): Code-Review+2: Swann Croiset <scroiset@mirantis.com> Workflow+1: Simon Pasquier <spasquier@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 29 Jul 2016 14:53:15 +0000 Reviewed-on: https://review.openstack.org/347905 Project: openstack/fuel-plugin-elasticsearch-kibana Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/manifests/configure_default_route.pp51
-rw-r--r--deployment_scripts/puppet/manifests/hiera_override.pp6
-rw-r--r--deployment_tasks.yaml14
3 files changed, 71 insertions, 0 deletions
diff --git a/deployment_scripts/puppet/manifests/configure_default_route.pp b/deployment_scripts/puppet/manifests/configure_default_route.pp
new file mode 100644
index 0000000..45c15e7
--- /dev/null
+++ b/deployment_scripts/puppet/manifests/configure_default_route.pp
@@ -0,0 +1,51 @@
1# Copyright 2016 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15notice('fuel-plugin-influxdb-grafana: configure_default_route.pp')
16
17$fuel_version = 0 + hiera('fuel_version')
18
19if $fuel_version < 9.0 {
20 # The code below is a copy-paste from configure_default_route.pp in
21 # fuel-library (branch stable/8.0)
22 # Unfortunately we have no way to do otherwise since we need to support both
23 # MOS 8 and MOS 9
24 $network_scheme = hiera_hash('network_scheme', {})
25 $management_vrouter_vip = hiera('management_vrouter_vip')
26 $management_role = 'management'
27 $fw_admin_role = 'fw-admin'
28
29 if ( $::l23_os =~ /(?i:centos6)/ and $::kernelmajversion == '3.10' ) {
30 $ovs_datapath_package_name = 'kmod-openvswitch-lt'
31 }
32
33 $use_ovs_dkms_datapath_module = $::l23_os ? {
34 /(?i:redhat7|centos7)/ => false,
35 default => true
36 }
37 class { 'l23network' :
38 use_ovs => hiera('use_ovs', false),
39 use_ovs_dkms_datapath_module => $use_ovs_dkms_datapath_module,
40 ovs_datapath_package_name => $ovs_datapath_package_name,
41 }
42
43 $new_network_scheme = configure_default_route($network_scheme, $management_vrouter_vip, $fw_admin_role, $management_role )
44 notice ($new_network_scheme)
45
46 if !empty($new_network_scheme) {
47 prepare_network_config($new_network_scheme)
48 $sdn = generate_network_config()
49 notify {'SDN': message => $sdn }
50 }
51}
diff --git a/deployment_scripts/puppet/manifests/hiera_override.pp b/deployment_scripts/puppet/manifests/hiera_override.pp
index 4b02642..3ef3c38 100644
--- a/deployment_scripts/puppet/manifests/hiera_override.pp
+++ b/deployment_scripts/puppet/manifests/hiera_override.pp
@@ -14,6 +14,8 @@
14 14
15notice('fuel-plugin-elasticsearch-kibana: hiera_override.pp') 15notice('fuel-plugin-elasticsearch-kibana: hiera_override.pp')
16 16
17$fuel_version = 0 + hiera('fuel_version')
18
17# Initialize network-related variables 19# Initialize network-related variables
18$network_scheme = hiera_hash('network_scheme') 20$network_scheme = hiera_hash('network_scheme')
19$network_metadata = hiera_hash('network_metadata') 21$network_metadata = hiera_hash('network_metadata')
@@ -210,3 +212,7 @@ file { $hiera_file:
210 ensure => file, 212 ensure => file,
211 content => $calculated_content, 213 content => $calculated_content,
212} 214}
215
216if $fuel_version >= 9.0 {
217 class { '::osnailyfacter::netconfig::hiera_default_route' :}
218}
diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml
index 8f3957f..eb05d0f 100644
--- a/deployment_tasks.yaml
+++ b/deployment_tasks.yaml
@@ -158,6 +158,20 @@
158# Tasks defintions for the post-deployment 158# Tasks defintions for the post-deployment
159########################################## 159##########################################
160 160
161# Configure the default gateway (required for MOS 8 only)
162- id: elasticsearch-configure-default-route
163 type: puppet
164 version: 2.0.0
165 role: [primary-elasticsearch_kibana, elasticsearch_kibana]
166 requires: [post_deployment_start]
167 required_for: [post_deployment_end]
168 parameters:
169 puppet_manifest: "puppet/manifests/configure_default_route.pp"
170 puppet_modules: /etc/puppet/modules
171 timeout: 120
172 reexecute_on:
173 - deploy_changes
174
161# In order to automatically import dashboards, it is mandatory to create and 175# In order to automatically import dashboards, it is mandatory to create and
162# configure the Kibana index before Kibana4 starts. This task is ran at post-deployment 176# configure the Kibana index before Kibana4 starts. This task is ran at post-deployment
163# stage because the index creation must occur when the Elasticsearch cluster is ready 177# stage because the index creation must occur when the Elasticsearch cluster is ready