murakumo 0.2.3 → 0.2.4
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.
File without changes
|
data/lib/cli/mrkmctl.rb
CHANGED
data/lib/cli/mrkmctl_options.rb
CHANGED
@@ -9,7 +9,7 @@ def mrkmctl_parse_args
|
|
9
9
|
desc 'displays a list of a record'
|
10
10
|
option :list, '-L', '--list [SEARCH_PHRASE]'
|
11
11
|
|
12
|
-
desc 'adds or updates a record: <hostname>[,<TTL>[,{master|backup}]]'
|
12
|
+
desc 'adds or updates a record: <hostname>[,<TTL>[,{master|secondary|backup}]]'
|
13
13
|
option :add, '-A', '--add RECORD', :type => Array, :multiple => true do |value|
|
14
14
|
(1 <= value.length and value.length <= 3) or invalid_argument
|
15
15
|
|
@@ -25,7 +25,7 @@ def mrkmctl_parse_args
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# Priority
|
28
|
-
priority.nil? or /\A(master|backup)\Z/i =~ priority or invalid_argument
|
28
|
+
priority.nil? or /\A(master|secondary|backup)\Z/i =~ priority or invalid_argument
|
29
29
|
end
|
30
30
|
|
31
31
|
desc 'deletes a record'
|
@@ -85,6 +85,8 @@ def mrkmctl_parse_args
|
|
85
85
|
priority = case r[2].to_s
|
86
86
|
when /master/i
|
87
87
|
Murakumo::MASTER
|
88
|
+
when /secondary/i
|
89
|
+
Murakumo::SECONDARY
|
88
90
|
else
|
89
91
|
Murakumo::BACKUP
|
90
92
|
end
|
data/lib/cli/murakumo_options.rb
CHANGED
@@ -47,7 +47,7 @@ def murakumo_parse_args
|
|
47
47
|
end
|
48
48
|
end # :host
|
49
49
|
|
50
|
-
desc 'resource record of an alias: <hostname>[,<TTL>[,{master|backup}]]'
|
50
|
+
desc 'resource record of an alias: <hostname>[,<TTL>[,{master|secondary|backup}]]'
|
51
51
|
option :aliases, '-A', '--alias RECORD', :type => Array, :multiple => true do |value|
|
52
52
|
(1 <= value.length and value.length <= 3) or invalid_argument
|
53
53
|
|
@@ -63,7 +63,7 @@ def murakumo_parse_args
|
|
63
63
|
end
|
64
64
|
|
65
65
|
# Priority
|
66
|
-
priority.nil? or /\A(master|backup)\Z/i =~ priority or invalid_argument
|
66
|
+
priority.nil? or /\A(master|secondary|backup)\Z/i =~ priority or invalid_argument
|
67
67
|
end # :aliases
|
68
68
|
|
69
69
|
desc 'ip address of a default resolver'
|
@@ -155,6 +155,8 @@ def murakumo_parse_args
|
|
155
155
|
priority = case r[2].to_s
|
156
156
|
when /master/i
|
157
157
|
Murakumo::MASTER
|
158
|
+
when /secondary/i
|
159
|
+
Murakumo::SECONDARY
|
158
160
|
else
|
159
161
|
Murakumo::BACKUP
|
160
162
|
end
|
data/lib/misc/murakumo_const.rb
CHANGED
data/lib/srv/murakumo_cloud.rb
CHANGED
@@ -382,6 +382,9 @@ module Murakumo
|
|
382
382
|
# 優先度の高いレコードを検索
|
383
383
|
records = shuffle_records(@address_records.select {|i| i['priority'] == MASTER })
|
384
384
|
|
385
|
+
# 次に優先度の高いレコードを検索
|
386
|
+
records.concat(shuffle_records(@address_records.select {|i| i['priority'] == SECONDARY }))
|
387
|
+
|
385
388
|
# レコードが見つからなかった場合はバックアップを選択
|
386
389
|
if records.empty?
|
387
390
|
records = shuffle_records(@address_records.select {|i| i['priority'] == BACKUP })
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: murakumo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 4
|
10
|
+
version: 0.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- winebarrel
|
@@ -106,7 +106,8 @@ files:
|
|
106
106
|
- lib/srv/murakumo_cloud.rb
|
107
107
|
- lib/misc/murakumo_const.rb
|
108
108
|
- etc/murakumo-update-config-for-ec2
|
109
|
-
- etc/
|
109
|
+
- etc/gai.conf.example
|
110
|
+
- etc/murakumo.yml.example
|
110
111
|
- etc/dhclient-script.patch
|
111
112
|
- etc/murakumo.server
|
112
113
|
homepage: https://bitbucket.org/winebarrel/murakumo
|