Merge pull request #586 from enovance/bug/174/emilienm

spof/debian: cleanup corosync resources if not started
This commit is contained in:
Yanis Guenane 2014-08-21 12:14:50 -04:00
commit 9a23dd7c30
2 changed files with 12 additions and 0 deletions

View File

@ -111,6 +111,12 @@ class cloud::spof(
on-fail => 'restart'
}
}
} ->
exec { 'cleanup_ceilometer_agent_central':
command => 'crm resource cleanup ceilometer-agent-central',
unless => 'crm resource show ceilometer-agent-central | grep Started',
user => 'root',
path => ['/usr/sbin', '/bin'],
}
}

View File

@ -48,6 +48,12 @@ describe 'cloud::spof' do
:group => 'root'
)
should contain_class('cloud::telemetry::centralagent').with(:enabled => false)
should contain_exec('cleanup_ceilometer_agent_central').with(
:command => 'crm resource cleanup ceilometer-agent-central',
:path => ['/usr/sbin', '/bin'],
:user => 'root',
:unless => 'crm resource show ceilometer-agent-central | grep Started'
)
end
end