ey_stonith 0.1.5.pre3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +3 -3
- data/bin/stonith-info +5 -0
- data/lib/ey_stonith/commands/check.rb +1 -1
- data/lib/ey_stonith/commands/claim.rb +0 -2
- data/lib/ey_stonith/commands/info.rb +22 -0
- data/lib/ey_stonith/commands/resume.rb +4 -1
- data/lib/ey_stonith/commands.rb +1 -0
- data/lib/ey_stonith/config.rb +35 -0
- metadata +14 -14
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@ Shoot The Other Instance In The Head
|
|
4
4
|
|
5
5
|
= Development
|
6
6
|
|
7
|
-
You need to have gem bundler
|
7
|
+
You need to have gem bundler installed
|
8
8
|
|
9
9
|
gem install bundler
|
10
10
|
|
@@ -12,6 +12,6 @@ Then bundle everything up:
|
|
12
12
|
|
13
13
|
bundle install
|
14
14
|
|
15
|
-
To run the specs
|
15
|
+
To run the specs:
|
16
16
|
|
17
|
-
bundle exec
|
17
|
+
bundle exec rake
|
data/bin/stonith-info
ADDED
@@ -35,7 +35,6 @@ module EY
|
|
35
35
|
return unless master_hostname
|
36
36
|
|
37
37
|
if config.meta_data_hostname == master_hostname
|
38
|
-
history << :claim
|
39
38
|
abort "Already claimed, not claiming."
|
40
39
|
else
|
41
40
|
claim_path.delete
|
@@ -86,7 +85,6 @@ Failed attempts: #{attempts}
|
|
86
85
|
|
87
86
|
if config.meta_data_hostname == master_hostname
|
88
87
|
claim_path.open('w') {}
|
89
|
-
history << :claim
|
90
88
|
abort "Already claimed, not claiming. Touching claim file."
|
91
89
|
else
|
92
90
|
abort "#{master_hostname} is master, not claiming."
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module EY
|
2
|
+
module Stonith
|
3
|
+
module Commands
|
4
|
+
class Info < Abstract
|
5
|
+
def self.command
|
6
|
+
'info'
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.banner
|
10
|
+
"Print the full config file and database contents"
|
11
|
+
end
|
12
|
+
|
13
|
+
def invoke
|
14
|
+
puts config
|
15
|
+
puts "Database:"
|
16
|
+
data = database.with_data { |data| data }
|
17
|
+
puts " #{data}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/ey_stonith/commands.rb
CHANGED
data/lib/ey_stonith/config.rb
CHANGED
@@ -53,6 +53,41 @@ module EY
|
|
53
53
|
|
54
54
|
attr_reader :path
|
55
55
|
|
56
|
+
def to_s()
|
57
|
+
return <<-STRING
|
58
|
+
Config:
|
59
|
+
config file: #{@path}
|
60
|
+
|
61
|
+
log_path: #{log_path}
|
62
|
+
heartbeat: #{heartbeat}
|
63
|
+
|
64
|
+
state_path: #{state_path}
|
65
|
+
stop_path: #{stop_path}
|
66
|
+
claim_path: #{claim_path}
|
67
|
+
checks_path: #{checks_path}
|
68
|
+
notify_path: #{notify_path}
|
69
|
+
history_path: #{history_path}
|
70
|
+
takeover_path: #{takeover_path}
|
71
|
+
|
72
|
+
notify_uri: #{notify_uri}
|
73
|
+
fog_credentials: #{fog_credentials.inspect}
|
74
|
+
awsm_credentials: #{awsm_credentials.inspect}
|
75
|
+
|
76
|
+
meta_data_hostname: #{meta_data_hostname}
|
77
|
+
meta_data_id: #{meta_data_id}
|
78
|
+
meta_data_ip: #{meta_data_ip}
|
79
|
+
|
80
|
+
monitor_host: #{monitor_host}
|
81
|
+
monitor_path: #{monitor_path}
|
82
|
+
|
83
|
+
redis_host: #{redis_host}
|
84
|
+
redis_port: #{redis_port}
|
85
|
+
redis_key: #{redis_key}
|
86
|
+
redis_db: #{redis_db}
|
87
|
+
redis_timeout: #{redis_timeout}
|
88
|
+
STRING
|
89
|
+
end
|
90
|
+
|
56
91
|
def log_path() pathname(log) end
|
57
92
|
def state_path() ensure_exists(pathname(state_dir)) end
|
58
93
|
def stop_path() state_path + 'stop' end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_stonith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.1.5.pre3
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Ezra Zygmuntowicz
|
@@ -17,11 +16,10 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-27 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
24
|
-
type: :runtime
|
25
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - ">="
|
@@ -32,8 +30,8 @@ dependencies:
|
|
32
30
|
requirement: *id001
|
33
31
|
name: json
|
34
32
|
prerelease: false
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
33
|
type: :runtime
|
34
|
+
- !ruby/object:Gem::Dependency
|
37
35
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
36
|
requirements:
|
39
37
|
- - "="
|
@@ -46,8 +44,8 @@ dependencies:
|
|
46
44
|
requirement: *id002
|
47
45
|
name: fog
|
48
46
|
prerelease: false
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
47
|
type: :runtime
|
48
|
+
- !ruby/object:Gem::Dependency
|
51
49
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
50
|
requirements:
|
53
51
|
- - ~>
|
@@ -60,6 +58,7 @@ dependencies:
|
|
60
58
|
requirement: *id003
|
61
59
|
name: redis
|
62
60
|
prerelease: false
|
61
|
+
type: :runtime
|
63
62
|
description: Shoot The Other Node In The Head
|
64
63
|
email: awsmdev@engineyard.com
|
65
64
|
executables:
|
@@ -69,6 +68,7 @@ executables:
|
|
69
68
|
- stonith-commands
|
70
69
|
- stonith-cron
|
71
70
|
- stonith-help
|
71
|
+
- stonith-info
|
72
72
|
- stonith-notify
|
73
73
|
- stonith-reset
|
74
74
|
- stonith-resume
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/ey_stonith/commands/commands.rb
|
91
91
|
- lib/ey_stonith/commands/cron.rb
|
92
92
|
- lib/ey_stonith/commands/help.rb
|
93
|
+
- lib/ey_stonith/commands/info.rb
|
93
94
|
- lib/ey_stonith/commands/not_found.rb
|
94
95
|
- lib/ey_stonith/commands/notify.rb
|
95
96
|
- lib/ey_stonith/commands/reset.rb
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- bin/stonith-commands
|
110
111
|
- bin/stonith-cron
|
111
112
|
- bin/stonith-help
|
113
|
+
- bin/stonith-info
|
112
114
|
- bin/stonith-notify
|
113
115
|
- bin/stonith-reset
|
114
116
|
- bin/stonith-resume
|
@@ -135,13 +137,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
137
|
version: "0"
|
136
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
139
|
requirements:
|
138
|
-
- - "
|
140
|
+
- - ">="
|
139
141
|
- !ruby/object:Gem::Version
|
140
142
|
segments:
|
141
|
-
-
|
142
|
-
|
143
|
-
- 1
|
144
|
-
version: 1.3.1
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
145
|
requirements: []
|
146
146
|
|
147
147
|
rubyforge_project:
|