Cleanup collector resources at the very end

Dirty operator action to (re)start all collectors on Controller nodes.

Change-Id: Ibe6b270f45ccd9b3add2f06bef21c58707116a15
Closes-bug: #1593137
This commit is contained in:
Swann Croiset 2016-07-07 17:20:51 +02:00
parent 276378b449
commit ef2fd45a39
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# Copyright 2016 Mirantis, 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.
notice('fuel-plugin-lma-collector: cleanup_collector.pp')
Exec {
path => '/usr/sbin:/sbin',
logoutput => on_failure,
}
exec { 'cleanup log_collector':
command => 'crm resource cleanup log_collector'
}
exec { 'cleanup metric collector':
command => 'crm resource cleanup metric_collector'
}

View File

@ -163,3 +163,18 @@
reexecute_on:
- deploy_changes
# This task must be executed at the very end of the deployment.
- id: lma-cleanup-collectors
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [post_deployment_end]
role:
- primary-controller
cross-depends:
- name: lma-base
role: [primary-controller, controller]
parameters:
puppet_manifest: puppet/manifests/cleanup_collectors.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 300