Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Setup monitoring for STONITH resources
Browse files Browse the repository at this point in the history
Couple of hours is good kind of interval value for
STONITH monitoring.
  • Loading branch information
jsuchome committed Feb 24, 2016
1 parent 506de1e commit 7ee5dbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chef/cookbooks/pacemaker/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions chef/cookbooks/pacemaker/recipes/stonith.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7ee5dbb

Please sign in to comment.