|
1 Patch based on https://review.openstack.org/#/c/439140/ and modified |
|
2 for this version. |
|
3 |
|
4 From 70cef4ef5b1740b52b4555581066340fa14a96ee Mon Sep 17 00:00:00 2001 |
|
5 From: Drew Fisher <[email protected]> |
|
6 Date: Tue, 28 Feb 2017 06:24:06 -0700 |
|
7 Subject: [PATCH] Update default Swift ports |
|
8 |
|
9 https://bugs.launchpad.net/swift/+bug/1521339 changed the default ports |
|
10 from 6000-6002 to 6200-6202 so as not to conflict with X or other |
|
11 services. This patch updates the module to match. |
|
12 |
|
13 Change-Id: Ib3b2309ec89e6d324f937cc141cb2d0bc3a7cd10 |
|
14 --- |
|
15 README.md | 18 +++++++++--------- |
|
16 manifests/storage/all.pp | 12 ++++++------ |
|
17 manifests/storage/server.pp | 2 +- |
|
18 spec/acceptance/basic_swift_spec.rb | 12 ++++++------ |
|
19 spec/classes/swift_ringbuilder_spec.rb | 18 +++++++++--------- |
|
20 spec/classes/swift_storage_all_spec.rb | 8 ++++---- |
|
21 tests/site.pp | 12 ++++++------ |
|
22 8 files changed, 44 insertions(+), 44 deletions(-) |
|
23 |
|
24 diff --git a/README.md b/README.md |
|
25 index 12ee409..f602abc 100644 |
|
26 --- a/README.md |
|
27 +++ b/README.md |
|
28 @@ -56,31 +56,31 @@ class { 'swift::storage::all': |
|
29 storage_local_net_ip => $ipaddress_eth0 |
|
30 } |
|
31 |
|
32 -@@ring_object_device { "${ipaddress_eth0}:6000/1": |
|
33 +@@ring_object_device { "${ipaddress_eth0}:6200/1": |
|
34 region => 1, # optional, defaults to 1 |
|
35 zone => 1, |
|
36 weight => 1, |
|
37 } |
|
38 -@@ring_container_device { "${ipaddress_eth0}:6001/1": |
|
39 +@@ring_container_device { "${ipaddress_eth0}:6201/1": |
|
40 zone => 1, |
|
41 weight => 1, |
|
42 } |
|
43 -@@ring_account_device { "${ipaddress_eth0}:6002/1": |
|
44 +@@ring_account_device { "${ipaddress_eth0}:6202/1": |
|
45 zone => 1, |
|
46 weight => 1, |
|
47 } |
|
48 |
|
49 -@@ring_object_device { "${ipaddress_eth0}:6000/2": |
|
50 +@@ring_object_device { "${ipaddress_eth0}:6200/2": |
|
51 region => 2, |
|
52 zone => 1, |
|
53 weight => 1, |
|
54 } |
|
55 -@@ring_container_device { "${ipaddress_eth0}:6001/2": |
|
56 +@@ring_container_device { "${ipaddress_eth0}:6201/2": |
|
57 region => 2, |
|
58 zone => 1, |
|
59 weight => 1, |
|
60 } |
|
61 -@@ring_account_device { "${ipaddress_eth0}:6002/2": |
|
62 +@@ring_account_device { "${ipaddress_eth0}:6202/2": |
|
63 region => 2, |
|
64 zone => 1, |
|
65 weight => 1, |
|
66 |
|
67 diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp |
|
68 index 1b08136..07a4c6b 100644 |
|
69 --- a/manifests/storage/all.pp |
|
70 +++ b/manifests/storage/all.pp |
|
71 @@ -10,16 +10,16 @@ |
|
72 # Optional. Defaults to /srv/node/ |
|
73 # |
|
74 # [*object_port*] Port where object storage server should be hosted. |
|
75 -# Optional. Defaults to 6000. |
|
76 +# Optional. Defaults to 6200. |
|
77 # |
|
78 # [*allow_versions*] Boolean to enable the versioning in swift container |
|
79 # Optional. Default to false. |
|
80 # |
|
81 # [*container_port*] Port where the container storage server should be hosted. |
|
82 -# Optional. Defaults to 6001. |
|
83 +# Optional. Defaults to 6201. |
|
84 # |
|
85 # [*account_port*] Port where the account storage server should be hosted. |
|
86 -# Optional. Defaults to 6002. |
|
87 +# Optional. Defaults to 6202. |
|
88 # |
|
89 # [*object_pipeline*] |
|
90 # (optional) Specify the object pipeline |
|
91 @@ -74,9 +74,9 @@ |
|
92 class swift::storage::all( |
|
93 $storage_local_net_ip, |
|
94 $devices = '/srv/node', |
|
95 - $object_port = '6000', |
|
96 - $container_port = '6001', |
|
97 - $account_port = '6002', |
|
98 + $object_port = '6200', |
|
99 + $container_port = '6201', |
|
100 + $account_port = '6202', |
|
101 $object_pipeline = undef, |
|
102 $container_pipeline = undef, |
|
103 $allow_versions = false, |
|
104 |
|
105 diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp |
|
106 index c032b03..1569317 100644 |
|
107 --- a/manifests/storage/server.pp |
|
108 +++ b/manifests/storage/server.pp |
|
109 @@ -9,7 +9,7 @@ |
|
110 # === Parameters: |
|
111 # |
|
112 # [*title*] The port the server will be exposed to |
|
113 -# Mandatory. Usually 6000, 6001 and 6002 for respectively |
|
114 +# Mandatory. Usually 6200, 6201 and 6202 for respectively |
|
115 # object, container and account. |
|
116 # |
|
117 # [*type*] |
|
118 |
|
119 diff --git a/spec/classes/swift_ringbuilder_spec.rb b/spec/classes/swift_ringbuilder_spec.rb |
|
120 index b455b05..10f6d2e 100644 |
|
121 --- a/spec/classes/swift_ringbuilder_spec.rb |
|
122 +++ b/spec/classes/swift_ringbuilder_spec.rb |
|
123 @@ -58,17 +58,17 @@ describe 'swift::ringbuilder' do |
|
124 let :pre_condition do |
|
125 'class { memcached: max_memory => 1} |
|
126 class { swift: swift_hash_suffix => string } |
|
127 - ring_object_device { "127.0.0.1:6000/1": |
|
128 + ring_object_device { "127.0.0.1:6200/1": |
|
129 zone => 1, |
|
130 weight => 1, |
|
131 } |
|
132 |
|
133 - ring_container_device { "127.0.0.1:6001/1": |
|
134 + ring_container_device { "127.0.0.1:6201/1": |
|
135 zone => 2, |
|
136 weight => 1, |
|
137 } |
|
138 |
|
139 - ring_account_device { "127.0.0.1:6002/1": |
|
140 + ring_account_device { "127.0.0.1:6202/1": |
|
141 zone => 3, |
|
142 weight => 1, |
|
143 }' |
|
144 @@ -76,21 +76,21 @@ describe 'swift::ringbuilder' do |
|
145 |
|
146 it 'should set up all of the correct dependencies' do |
|
147 is_expected.to contain_swift__ringbuilder__create('object').with( |
|
148 - {:before => ['Ring_object_device[127.0.0.1:6000/1]']} |
|
149 + {:before => ['Ring_object_device[127.0.0.1:6200/1]']} |
|
150 ) |
|
151 is_expected.to contain_swift__ringbuilder__create('container').with( |
|
152 - {:before => ['Ring_container_device[127.0.0.1:6001/1]']} |
|
153 + {:before => ['Ring_container_device[127.0.0.1:6201/1]']} |
|
154 ) |
|
155 is_expected.to contain_swift__ringbuilder__create('account').with( |
|
156 - {:before => ['Ring_account_device[127.0.0.1:6002/1]']} |
|
157 + {:before => ['Ring_account_device[127.0.0.1:6202/1]']} |
|
158 ) |
|
159 - is_expected.to contain_ring_object_device('127.0.0.1:6000/1').with( |
|
160 + is_expected.to contain_ring_object_device('127.0.0.1:6200/1').with( |
|
161 {:notify => ['Swift::Ringbuilder::Rebalance[object]']} |
|
162 ) |
|
163 - is_expected.to contain_ring_container_device('127.0.0.1:6001/1').with( |
|
164 + is_expected.to contain_ring_container_device('127.0.0.1:6201/1').with( |
|
165 {:notify => ['Swift::Ringbuilder::Rebalance[container]']} |
|
166 ) |
|
167 - is_expected.to contain_ring_account_device('127.0.0.1:6002/1').with( |
|
168 + is_expected.to contain_ring_account_device('127.0.0.1:6202/1').with( |
|
169 {:notify => ['Swift::Ringbuilder::Rebalance[account]']} |
|
170 ) |
|
171 end |
|
172 diff --git a/spec/classes/swift_storage_all_spec.rb b/spec/classes/swift_storage_all_spec.rb |
|
173 index 5d8e1ee..47e044d 100644 |
|
174 --- a/spec/classes/swift_storage_all_spec.rb |
|
175 +++ b/spec/classes/swift_storage_all_spec.rb |
|
176 @@ -17,9 +17,9 @@ describe 'swift::storage::all' do |
|
177 let :default_params do |
|
178 { |
|
179 :devices => '/srv/node', |
|
180 - :object_port => '6000', |
|
181 - :container_port => '6001', |
|
182 - :account_port => '6002', |
|
183 + :object_port => '6200', |
|
184 + :container_port => '6201', |
|
185 + :account_port => '6202', |
|
186 :log_facility => 'LOG_LOCAL2', |
|
187 :incoming_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r', |
|
188 :outgoing_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r', |
|
189 |
|
190 diff --git a/tests/site.pp b/tests/site.pp |
|
191 index e1a38af..8e20d5b 100644 |
|
192 --- a/tests/site.pp |
|
193 +++ b/tests/site.pp |
|
194 @@ -152,32 +152,32 @@ node /swift-storage/ { |
|
195 } |
|
196 |
|
197 # specify endpoints per device to be added to the ring specification |
|
198 - @@ring_object_device { "${swift_local_net_ip}:6000/1": |
|
199 + @@ring_object_device { "${swift_local_net_ip}:6200/1": |
|
200 zone => $swift_zone, |
|
201 weight => 1, |
|
202 } |
|
203 |
|
204 - @@ring_object_device { "${swift_local_net_ip}:6000/2": |
|
205 + @@ring_object_device { "${swift_local_net_ip}:6200/2": |
|
206 zone => $swift_zone, |
|
207 weight => 1, |
|
208 } |
|
209 |
|
210 - @@ring_container_device { "${swift_local_net_ip}:6001/1": |
|
211 + @@ring_container_device { "${swift_local_net_ip}:6201/1": |
|
212 zone => $swift_zone, |
|
213 weight => 1, |
|
214 } |
|
215 |
|
216 - @@ring_container_device { "${swift_local_net_ip}:6001/2": |
|
217 + @@ring_container_device { "${swift_local_net_ip}:6201/2": |
|
218 zone => $swift_zone, |
|
219 weight => 1, |
|
220 } |
|
221 # TODO should device be changed to volume |
|
222 - @@ring_account_device { "${swift_local_net_ip}:6002/1": |
|
223 + @@ring_account_device { "${swift_local_net_ip}:6202/1": |
|
224 zone => $swift_zone, |
|
225 weight => 1, |
|
226 } |
|
227 |
|
228 - @@ring_account_device { "${swift_local_net_ip}:6002/2": |
|
229 + @@ring_account_device { "${swift_local_net_ip}:6202/2": |
|
230 zone => $swift_zone, |
|
231 weight => 1, |
|
232 } |
|
233 -- |
|
234 1.9.1 |
|
235 |