p-only, restart cluster services separately.
Change-Id: Ib000203bd5378fa4655eba6c26f0de1fb99019a0
This commit is contained in:
parent
b06d5da31a
commit
357d34c0cc
|
@ -13,6 +13,6 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
notice("MODULAR: bigswitch controller-network-config")
|
||||
notice("MODULAR: bigswitch network-config")
|
||||
include bcf::params
|
||||
include bcf::p_only::controller-network
|
||||
include bcf::p_only::network
|
|
@ -13,11 +13,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
notice("MODULAR: bigswitch controller-config")
|
||||
notice("MODULAR: bigswitch reconfigure-services")
|
||||
include bcf::params
|
||||
if $bcf::params::openstack::bcf_mode == 'P-Only' {
|
||||
include bcf::p_only::controller
|
||||
include bcf::p_only::reconfigure-services
|
||||
}
|
||||
else {
|
||||
include bcf::p_v::controller
|
||||
include bcf::p_v::reconfigure-services
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Copyright 2015 BigSwitch Networks
|
||||
#
|
||||
# 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("MODULAR: bigswitch restart-cluster-services")
|
||||
include bcf::params
|
||||
if $bcf::params::openstack::bcf_mode == 'P-Only' {
|
||||
include bcf::p_only::restart-cluster-services
|
||||
}
|
||||
else {
|
||||
include bcf::p_v::restart-cluster-services
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
class bcf::p_only::controller-network {
|
||||
class bcf::p_only::network {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
class bcf::p_only::controller {
|
||||
class bcf::p_only::reconfigure-services {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
||||
|
@ -28,23 +28,6 @@ class bcf::p_only::controller {
|
|||
require => Package['python-pip']
|
||||
}
|
||||
|
||||
exec { 'restart neutron-dhcp-agent':
|
||||
command => 'crm resource restart p_neutron-dhcp-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
}
|
||||
exec { 'restart neutron-metadata-agent':
|
||||
command => 'crm resource restart p_neutron-metadata-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
}
|
||||
exec { 'restart neutron-l3-agent':
|
||||
command => 'crm resource restart p_neutron-l3-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
}
|
||||
exec { 'restart neutron-plugin-openvswitch-agent':
|
||||
command => 'crm resource restart p_neutron-plugin-openvswitch-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
}
|
||||
|
||||
# purge bcf controller public key
|
||||
exec { 'purge bcf key':
|
||||
command => "rm -rf /etc/neutron/plugins/ml2/host_certs/*",
|
||||
|
@ -60,8 +43,7 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'report_interval',
|
||||
value => '60',
|
||||
notify => [Exec['restart neutron-plugin-openvswitch-agent', 'restart neutron-l3-agent', 'restart neutron-dhcp-agent', 'restart neutron-metadata-agent'], Service['neutron-server']],
|
||||
# notify => Service['neutron-server'],
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf agent_down_time":
|
||||
ensure => present,
|
||||
|
@ -70,7 +52,7 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'agent_down_time',
|
||||
value => '150',
|
||||
notify => [Exec['restart neutron-plugin-openvswitch-agent', 'restart neutron-l3-agent', 'restart neutron-dhcp-agent', 'restart neutron-metadata-agent'], Service['neutron-server']],
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf service_plugins":
|
||||
ensure => present,
|
||||
|
@ -88,7 +70,7 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'dhcp_agents_per_network',
|
||||
value => '1',
|
||||
notify => [Exec['restart neutron-plugin-openvswitch-agent', 'restart neutron-l3-agent', 'restart neutron-dhcp-agent', 'restart neutron-metadata-agent'], Service['neutron-server']],
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf network_scheduler_driver":
|
||||
ensure => present,
|
||||
|
@ -97,7 +79,7 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'network_scheduler_driver',
|
||||
value => 'neutron.scheduler.dhcp_agent_scheduler.WeightScheduler',
|
||||
notify => [Exec['restart neutron-plugin-openvswitch-agent', 'restart neutron-l3-agent', 'restart neutron-dhcp-agent', 'restart neutron-metadata-agent'], Service['neutron-server']],
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf notification driver":
|
||||
ensure => present,
|
||||
|
@ -152,7 +134,6 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'enable_metadata_proxy',
|
||||
value => 'False',
|
||||
notify => Exec['restart neutron-l3-agent'],
|
||||
}
|
||||
ini_setting { "l3 agent external network bridge":
|
||||
ensure => present,
|
||||
|
@ -161,7 +142,6 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'external_network_bridge',
|
||||
value => '',
|
||||
notify => Exec['restart neutron-l3-agent'],
|
||||
}
|
||||
ini_setting { "l3 agent handle_internal_only_routers":
|
||||
ensure => present,
|
||||
|
@ -170,7 +150,6 @@ class bcf::p_only::controller {
|
|||
key_val_separator => '=',
|
||||
setting => 'handle_internal_only_routers',
|
||||
value => 'True',
|
||||
notify => Exec['restart neutron-l3-agent'],
|
||||
}
|
||||
|
||||
# config /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||
|
@ -326,4 +305,3 @@ class bcf::p_only::controller {
|
|||
enable => true,
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# Copyright 2015 BigSwitch Networks, 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.
|
||||
#
|
||||
class bcf::p_only::restart-cluster-services {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
||||
$binpath = "/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
|
||||
$nodes_hash = hiera('nodes', {})
|
||||
$roles = node_roles($nodes_hash, hiera('uid'))
|
||||
|
||||
if member($roles, 'primary-controller') {
|
||||
exec { 'restart neutron-dhcp-agent':
|
||||
command => 'crm resource restart p_neutron-dhcp-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
} ->
|
||||
exec { 'restart neutron-metadata-agent':
|
||||
command => 'crm resource restart p_neutron-metadata-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
} ->
|
||||
exec { 'restart neutron-l3-agent':
|
||||
command => 'crm resource restart p_neutron-l3-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
} ->
|
||||
exec { 'restart neutron-plugin-openvswitch-agent':
|
||||
command => 'crm resource restart p_neutron-plugin-openvswitch-agent',
|
||||
path => '/usr/local/bin/:/bin/:/usr/sbin',
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +1,61 @@
|
|||
# These tasks will be merged into deployment graph. Here you
|
||||
# can specify new tasks for any roles, even built-in ones.
|
||||
|
||||
# Install common packages
|
||||
- id: bigswitch-repo
|
||||
type: puppet
|
||||
groups: [primary-controller, controller, compute]
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/common-repo.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
- id: lacp-bond
|
||||
type: puppet
|
||||
groups: [primary-controller, controller, compute, ceph-osd]
|
||||
required_for: [openstack-controller, connectivity_tests]
|
||||
requires: [netconfig]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/controller-network-config.pp
|
||||
puppet_manifest: puppet/manifests/network-config.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
|
||||
# Install common packages
|
||||
#- id: bigswitch-repo
|
||||
# type: puppet
|
||||
# groups: [primary-controller, controller, compute]
|
||||
# required_for: [post_deployment_end]
|
||||
# requires: [post_deployment_start]
|
||||
# parameters:
|
||||
# puppet_manifest: puppet/manifests/common-repo.pp
|
||||
# puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
# timeout: 720
|
||||
# Only on primary controller: clean up the Neutron objects created
|
||||
# by Fuel default deployment
|
||||
- id: controller-cleanup
|
||||
type: puppet
|
||||
role: [primary-controller]
|
||||
required_for: [post_deployment_end]
|
||||
#requires: [bigswitch-repo]
|
||||
requires: [post_deployment_start]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/purge-os.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
- id: openstack-primary-controller-bigswitch
|
||||
- id: reconfigure-services
|
||||
type: puppet
|
||||
role: [primary-controller]
|
||||
role: [primary-controller, controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [controller-cleanup]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/controller-config.pp
|
||||
puppet_manifest: puppet/manifests/reconfigure-services.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
- id: openstack-controller-bigswitch
|
||||
- id: openstack-restart-cluster-services
|
||||
type: puppet
|
||||
role: [controller]
|
||||
role: [primary-controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [openstack-primary-controller-bigswitch]
|
||||
requires: [reconfigure-services]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/controller-config.pp
|
||||
puppet_manifest: puppet/manifests/restart-cluster-services.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
strategy:
|
||||
type: one-by-one
|
||||
- id: compute-config
|
||||
type: puppet
|
||||
role: [compute]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [post_deployment_start]
|
||||
requires: [openstack-restart-cluster-services]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/compute-config.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
|
Loading…
Reference in New Issue