Disable old Murano services when used old Murano and Murano standalone

When used Murano standalone node with enabled old Murano, we should
stop old Murano services on controllers, to prevent race condition
for murano-engine services.

Change-Id: Id9741713a8ef510b9837929256dd7d15d04ee797
Closes-bug: #1626286
This commit is contained in:
Denis Egorenko 2016-09-27 11:51:23 +03:00
parent ff67b7fa87
commit 6fe8c8dda6
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,24 @@
notice('MURANO PLUGIN: murano_disable_old.pp')
include ::murano::params
service { 'murano-rabbitmq':
ensure => 'stopped',
}
service { 'murano-api':
ensure => 'stopped',
name => $::murano::params::api_service_name
}
service { 'murano-engine':
ensure => 'stopped',
name => $::murano::params::engine_service_name
}
$base_cfapi = hiera_hash('murano-cfapi', {})
if pick($base_cfapi['enabled'], false) {
service { 'murano-cfapi':
ensure => 'stopped',
name => $::murano::params::cfapi_service_name
}
}

View File

@ -173,6 +173,22 @@
puppet_modules: /etc/puppet/modules
timeout: 300
- id: murano-disable-old-services
version: 2.1.0
type: puppet
groups: ['primary-controller', 'controller']
condition:
yaql_exp: >
$.get('detach-murano', {}).get('metadata', {}).get('enabled', false) and
$.murano.enabled and $.network_metadata.nodes.values().any(
('murano-node' in $.node_roles) or
('primary-murano-node' in $.node_roles))
required_for: [murano-controller-end]
parameters:
puppet_manifest: manifests/murano_disable_old.pp
puppet_modules: /etc/puppet/modules
timeout: 900
- id: murano-logging
version: 2.1.0
type: puppet