Manage new compute/cinder services state

* When deploying or scaling an Openstack environment,
  disable all of the nova-compute/cinder-volume services and use
  a separate post-deploy tasks to re-enable them back.
  That should be done to prohibit nova/cinder schedulers to assign
  tasks for compute/cinder nodes until the deployment or scaling
  is finished.
  (Note, that nova-computes fix may be re-implemented later with
  host-aggregates)

* Add enable_volumes parameter (default true) for openstack::cinder

DocImpact
Related blueprint disable-new-computes
Closes-bug: #1398817

Change-Id: Ia63d043753693360a008ec89924cdcdd93c007f3
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-02-23 16:29:48 +01:00
parent 4e69511ba2
commit ca54e745d5
6 changed files with 54 additions and 1 deletions

View File

@ -17,6 +17,7 @@ class openstack::cinder(
$manage_volumes = false, $manage_volumes = false,
$iser = false, $iser = false,
$enabled = true, $enabled = true,
$enable_volumes = true,
$purge_cinder_config = true, $purge_cinder_config = true,
$auth_host = '127.0.0.1', $auth_host = '127.0.0.1',
$bind_host = '0.0.0.0', $bind_host = '0.0.0.0',
@ -146,7 +147,7 @@ class openstack::cinder(
class { 'cinder::volume': class { 'cinder::volume':
package_ensure => $::openstack_version['cinder'], package_ensure => $::openstack_version['cinder'],
enabled => true, enabled => $enable_volumes,
} }
case $manage_volumes { case $manage_volumes {
true, 'iscsi': { true, 'iscsi': {

View File

@ -0,0 +1,10 @@
include cinder::params
$volume_service = $::cinder::params::volume_service
service { $volume_service:
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}

View File

@ -0,0 +1,10 @@
include nova::params
$compute_service_name = $::nova::params::compute_service_name
service { $compute_service_name:
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}

View File

@ -67,6 +67,28 @@
cmd: /usr/bin/python /etc/puppet/modules/osnailyfacter/modular/astute/vcenter_compute_zones.py cmd: /usr/bin/python /etc/puppet/modules/osnailyfacter/modular/astute/vcenter_compute_zones.py
timeout: 180 timeout: 180
- id: enable_nova_compute_service
type: puppet
role: [compute]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/astute/enable_compute.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
cwd: /
- id: enable_cinder_volume_service
type: puppet
role: [cinder]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/astute/enable_cinder.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
cwd: /
#PRE DEPLOYMENT #PRE DEPLOYMENT
- id: upload_core_repos - id: upload_core_repos
type: upload_file type: upload_file

View File

@ -325,7 +325,12 @@ if member($roles, 'controller') or member($roles, 'primary-controller') {
} else { } else {
$bind_host = false $bind_host = false
} }
# NOTE(bogdando) deploy cinder volume node with disabled cinder-volume
# service #LP1398817. The orchestration will start and enable it back
# after the deployment is done.
class { 'openstack::cinder': class { 'openstack::cinder':
enable_volumes => false,
sql_connection => "mysql://cinder:${cinder_hash[db_password]}@${management_vip}/cinder?charset=utf8&read_timeout=60", sql_connection => "mysql://cinder:${cinder_hash[db_password]}@${management_vip}/cinder?charset=utf8&read_timeout=60",
glance_api_servers => "${management_vip}:9292", glance_api_servers => "${management_vip}:9292",
bind_host => $bind_host, bind_host => $bind_host,

View File

@ -374,7 +374,12 @@ if ($::mellanox_mode == 'ethernet') {
} }
} }
# NOTE(bogdando) deploy compute node with disabled nova-compute
# service #LP1398817. The orchestration will start and enable it back
# after the deployment is done.
# FIXME(bogdando) This should be changed once the host aggregates implemented, bp disable-new-computes
class { 'openstack::compute': class { 'openstack::compute':
enabled => false,
public_interface => $public_int ? { undef=>'', default=>$public_int}, public_interface => $public_int ? { undef=>'', default=>$public_int},
private_interface => $use_neutron ? { true=>false, default=>hiera('private_int', undef)}, private_interface => $use_neutron ? { true=>false, default=>hiera('private_int', undef)},
internal_address => $internal_address, internal_address => $internal_address,