le1t0-deprec 2.1.6.053 → 2.1.6.054

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  # deprec changelog
2
2
 
3
+ = 2.1.6.054 (Aug 5, 2010)
4
+
5
+ * added global configurability of intervals and weights for keepalived scripts
6
+
3
7
  = 2.1.6.053 (Aug 5, 2010)
4
8
 
5
9
  * disabled auto restart for syslog_ng
@@ -3,6 +3,12 @@ Capistrano::Configuration.instance(:must_exist).load do
3
3
  namespace :deprec do
4
4
  namespace :keepalived do
5
5
 
6
+ set :keepalived_default_script_weight, 2
7
+ set :keepalived_default_script_interval, 1
8
+ # the two variables below default to the values above
9
+ set :keepalived_chk_wanted_state_weight, nil
10
+ set :keepalived_chk_wanted_state_interval, nil
11
+
6
12
  # :keepalived_scripts should contain a hash where each key is the suffix of the vrrp_script registration,
7
13
  # and the value is again a hash, containing as key => value pairs:
8
14
  # :script => 'killall -0 haproxy' or any script which returns a 0 or 1 exit value
@@ -1,15 +1,15 @@
1
1
  # touch /etc/keepalived/MASTER to make a BACKUP keepalived be MASTER. Remove it to make it BACKUP again.
2
2
  vrrp_script chk_wanted_state {
3
3
  script "test -e /etc/keepalived/MASTER"
4
- interval 1
5
- weight 2
4
+ interval <%= keepalived_chk_wanted_state_interval || keepalived_default_script_interval %>
5
+ weight <%= keepalived_chk_wanted_state_weight || keepalived_default_script_weight %>
6
6
  }
7
7
 
8
8
  <% keepalived_scripts.each do |name, settings| %>
9
9
  vrrp_script chk_<%= name.to_s %> {
10
10
  script "<%= settings[:script] %>"
11
- interval <%= settings[:interval] %>
12
- weight <%= settings[:weight] %>
11
+ interval <%= settings[:interval] || keepalived_default_script_interval %>
12
+ weight <%= settings[:weight] || keepalived_default_script_weight %>
13
13
  }
14
14
  <% end %>
15
15
 
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 1
8
8
  - 6
9
- - 53
10
- version: 2.1.6.053
9
+ - 54
10
+ version: 2.1.6.054
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0