Fix disabling of old murano services
Because of bug in fuel-yaql there is no other way as using some hardcoded ps-similar constructions. Change-Id: Ifcbe44c77f2266753b2916bcf2a06a9d37ee87d5
This commit is contained in:
parent
2ee501c3ab
commit
93f6141107
|
@ -1,25 +1,18 @@
|
|||
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', {})
|
||||
$plugin_cfapi = hiera_hash('murano_cfapi_plugin', {})
|
||||
if pick($base_cfapi['enabled'], false) or pick($plugin_cfapi['enabled'], false) {
|
||||
service { 'murano-cfapi':
|
||||
ensure => 'stopped',
|
||||
name => $::murano::params::cfapi_service_name
|
||||
define stop_service(
|
||||
$service_name = $name,
|
||||
) {
|
||||
exec { "stop ${name}":
|
||||
command => "/usr/sbin/service ${service_name} stop || true",
|
||||
onlyif => "/usr/sbin/service ${service_name} status",
|
||||
}
|
||||
}
|
||||
|
||||
include ::murano::params
|
||||
$murano_services = [ $::murano::params::api_service_name ,
|
||||
$::murano::params::engine_service_name ,
|
||||
$::murano::params::cfapi_service_name ,
|
||||
'murano-rabbitmq' ]
|
||||
|
||||
stop_service { $murano_services: }
|
||||
|
|
|
@ -180,9 +180,7 @@
|
|||
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))
|
||||
$.network_metadata.nodes.values().any('primary-murano-node' in $.node_roles)
|
||||
required_for: [murano-controller-end]
|
||||
parameters:
|
||||
puppet_manifest: manifests/murano_disable_old.pp
|
||||
|
|
Loading…
Reference in New Issue