From 7ee5dbbd9938274dcc2dd3d00bac7feb4ea39e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Wed, 24 Feb 2016 09:25:39 +0100 Subject: [PATCH] Setup monitoring for STONITH resources Couple of hours is good kind of interval value for STONITH monitoring. --- chef/cookbooks/pacemaker/attributes/default.rb | 2 ++ chef/cookbooks/pacemaker/recipes/stonith.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/chef/cookbooks/pacemaker/attributes/default.rb b/chef/cookbooks/pacemaker/attributes/default.rb index d616177e..599eeaff 100644 --- a/chef/cookbooks/pacemaker/attributes/default.rb +++ b/chef/cookbooks/pacemaker/attributes/default.rb @@ -65,6 +65,7 @@ default[:pacemaker][:stonith][:sbd][:nodes] = {} default[:pacemaker][:stonith][:shared][:agent] = "" +default[:pacemaker][:stonith][:shared][:op][:monitor][:interval] = "2h" # This can be either a string (containing a list of parameters) or a hash. # For instance: # default[:pacemaker][:stonith][:shared][:params] = 'hostname="foo" password="bar"' @@ -73,6 +74,7 @@ default[:pacemaker][:stonith][:shared][:params] = {} default[:pacemaker][:stonith][:per_node][:agent] = "" +default[:pacemaker][:stonith][:per_node][:op][:monitor][:interval] = "2h" # This can be "all" or "self": # - if set to "all", then every node will configure the stonith resources for # all nodes in the cluster diff --git a/chef/cookbooks/pacemaker/recipes/stonith.rb b/chef/cookbooks/pacemaker/recipes/stonith.rb index 495fabfd..6d4a3de1 100644 --- a/chef/cookbooks/pacemaker/recipes/stonith.rb +++ b/chef/cookbooks/pacemaker/recipes/stonith.rb @@ -108,6 +108,7 @@ pacemaker_primitive "stonith-shared" do agent "stonith:#{agent}" + op node[:pacemaker][:stonith][:shared][:op] params primitive_params action [:create, :start] end @@ -150,6 +151,7 @@ pacemaker_primitive stonith_resource do agent "stonith:#{agent}" + op node[:pacemaker][:stonith][:per_node][:op] params primitive_params action [:create, :start] end