1 Move recon's locks to /var/run/swift and caches to /var/lib/swift/recon-cache. |
1 Move recon's locks to /var/run/swift and caches to /var/lib/swift/recon-cache. |
2 Change some of the ways we gather information, since those are normally |
2 Change some of the ways we gather information, since those are normally |
3 Linux-specific. Make the tests acknowledge these changes. |
3 Linux-specific. Make the tests acknowledge these changes. |
4 |
4 |
5 --- swift-2.2.2/bin/swift-recon-cron.~1~ 2015-02-01 23:44:11.000000000 -0800 |
5 --- swift-2.3.0/bin/swift-recon-cron.~1~ 2015-04-30 06:57:42.000000000 -0700 |
6 +++ swift-2.2.2/bin/swift-recon-cron 2015-02-26 16:49:51.937806748 -0800 |
6 +++ swift-2.3.0/bin/swift-recon-cron 2016-02-08 00:58:57.095754838 -0800 |
7 @@ -57,8 +57,8 @@ def main(): |
7 @@ -57,8 +57,9 @@ def main(): |
8 sys.exit(1) |
8 sys.exit(1) |
9 conf = dict(c.items('filter:recon')) |
9 conf = dict(c.items('filter:recon')) |
10 device_dir = conf.get('devices', '/srv/node') |
10 device_dir = conf.get('devices', '/srv/node') |
11 - recon_cache_path = conf.get('recon_cache_path', '/var/cache/swift') |
11 - recon_cache_path = conf.get('recon_cache_path', '/var/cache/swift') |
12 - recon_lock_path = conf.get('recon_lock_path', '/var/lock') |
12 - recon_lock_path = conf.get('recon_lock_path', '/var/lock') |
13 + recon_cache_path = conf.get('recon_cache_path', '/var/lib/swift/recon-cache') |
13 + recon_cache_path = conf.get('recon_cache_path', |
|
14 + '/var/lib/swift/recon-cache') |
14 + recon_lock_path = conf.get('recon_lock_path', '/var/run/swift') |
15 + recon_lock_path = conf.get('recon_lock_path', '/var/run/swift') |
15 cache_file = os.path.join(recon_cache_path, "object.recon") |
16 cache_file = os.path.join(recon_cache_path, "object.recon") |
16 lock_dir = os.path.join(recon_lock_path, "swift-recon-object-cron") |
17 lock_dir = os.path.join(recon_lock_path, "swift-recon-object-cron") |
17 conf['log_name'] = conf.get('log_name', 'recon-cron') |
18 conf['log_name'] = conf.get('log_name', 'recon-cron') |
18 --- swift-2.2.2/etc/account-server.conf-sample.~1~ 2015-02-01 23:44:11.000000000 -0800 |
19 --- swift-2.3.0/etc/account-server.conf-sample.~1~ 2015-04-30 06:57:42.000000000 -0700 |
19 +++ swift-2.2.2/etc/account-server.conf-sample 2015-02-26 16:49:51.938107313 -0800 |
20 +++ swift-2.3.0/etc/account-server.conf-sample 2016-02-08 00:56:36.131898549 -0800 |
20 @@ -81,7 +81,7 @@ use = egg:swift#healthcheck |
21 @@ -81,7 +81,7 @@ use = egg:swift#healthcheck |
21 |
22 |
22 [filter:recon] |
23 [filter:recon] |
23 use = egg:swift#recon |
24 use = egg:swift#recon |
24 -# recon_cache_path = /var/cache/swift |
25 -# recon_cache_path = /var/cache/swift |
80 -# recon_cache_path = /var/cache/swift |
81 -# recon_cache_path = /var/cache/swift |
81 +# recon_cache_path = /var/lib/swift/recon-cache |
82 +# recon_cache_path = /var/lib/swift/recon-cache |
82 |
83 |
83 [container-sync] |
84 [container-sync] |
84 # You can override the default log routing for this app here (don't use set!): |
85 # You can override the default log routing for this app here (don't use set!): |
85 --- swift-2.2.2/etc/drive-audit.conf-sample.~1~ 2015-02-01 23:44:11.000000000 -0800 |
86 --- swift-2.3.0/etc/drive-audit.conf-sample.~1~ 2015-04-30 06:57:42.000000000 -0700 |
86 +++ swift-2.2.2/etc/drive-audit.conf-sample 2015-02-26 17:03:18.476812691 -0800 |
87 +++ swift-2.3.0/etc/drive-audit.conf-sample 2016-02-08 00:56:36.132840827 -0800 |
87 @@ -8,7 +8,7 @@ |
88 @@ -8,7 +8,7 @@ |
88 # log_max_line_length = 0 |
89 # log_max_line_length = 0 |
89 # minutes = 60 |
90 # minutes = 60 |
90 # error_limit = 1 |
91 # error_limit = 1 |
91 -# recon_cache_path = /var/cache/swift |
92 -# recon_cache_path = /var/cache/swift |
92 +# recon_cache_path = /var/lib/swift/recon-cache |
93 +# recon_cache_path = /var/lib/swift/recon-cache |
93 # unmount_failed_device = True |
94 # unmount_failed_device = True |
94 # |
95 # |
95 # By default, drive-audit logs only to syslog. Setting this option True |
96 # By default, drive-audit logs only to syslog. Setting this option True |
96 --- swift-2.2.2/etc/object-expirer.conf-sample.~1~ 2015-02-01 23:44:11.000000000 -0800 |
97 --- swift-2.3.0/etc/object-expirer.conf-sample.~1~ 2015-04-30 06:57:42.000000000 -0700 |
97 +++ swift-2.2.2/etc/object-expirer.conf-sample 2015-02-26 17:03:28.102759740 -0800 |
98 +++ swift-2.3.0/etc/object-expirer.conf-sample 2016-02-08 00:56:36.133283025 -0800 |
98 @@ -50,7 +50,7 @@ |
99 @@ -50,7 +50,7 @@ |
99 # up to reclaim_age seconds before it gives up and deletes the entry in the |
100 # up to reclaim_age seconds before it gives up and deletes the entry in the |
100 # queue. |
101 # queue. |
101 # reclaim_age = 604800 |
102 # reclaim_age = 604800 |
102 -# recon_cache_path = /var/cache/swift |
103 -# recon_cache_path = /var/cache/swift |
103 +# recon_cache_path = /var/lib/swift/recon-cache |
104 +# recon_cache_path = /var/lib/swift/recon-cache |
104 |
105 |
105 [pipeline:main] |
106 [pipeline:main] |
106 pipeline = catch_errors proxy-logging cache proxy-server |
107 pipeline = catch_errors proxy-logging cache proxy-server |
107 --- swift-2.2.2/etc/object-server.conf-sample.~1~ 2015-02-01 23:44:11.000000000 -0800 |
108 --- swift-2.3.0/etc/object-server.conf-sample.~1~ 2015-04-30 06:57:42.000000000 -0700 |
108 +++ swift-2.2.2/etc/object-server.conf-sample 2015-02-26 16:49:51.938657130 -0800 |
109 +++ swift-2.3.0/etc/object-server.conf-sample 2016-02-08 00:56:36.133858983 -0800 |
109 @@ -143,8 +143,8 @@ use = egg:swift#healthcheck |
110 @@ -143,8 +143,8 @@ use = egg:swift#healthcheck |
110 |
111 |
111 [filter:recon] |
112 [filter:recon] |
112 use = egg:swift#recon |
113 use = egg:swift#recon |
113 -#recon_cache_path = /var/cache/swift |
114 -#recon_cache_path = /var/cache/swift |
124 -# recon_cache_path = /var/cache/swift |
125 -# recon_cache_path = /var/cache/swift |
125 +# recon_cache_path = /var/lib/swift/recon-cache |
126 +# recon_cache_path = /var/lib/swift/recon-cache |
126 # |
127 # |
127 # limits how long rsync error log lines are |
128 # limits how long rsync error log lines are |
128 # 0 means to log the entire line |
129 # 0 means to log the entire line |
129 @@ -224,7 +224,7 @@ use = egg:swift#recon |
130 @@ -247,7 +247,7 @@ use = egg:swift#recon |
130 # slowdown will sleep that amount between objects |
131 # slowdown will sleep that amount between objects |
131 # slowdown = 0.01 |
132 # slowdown = 0.01 |
132 # |
133 # |
133 -# recon_cache_path = /var/cache/swift |
134 -# recon_cache_path = /var/cache/swift |
134 +# recon_cache_path = /var/lib/swift/recon-cache |
135 +# recon_cache_path = /var/lib/swift/recon-cache |
135 |
136 |
136 [object-auditor] |
137 [object-auditor] |
137 # You can override the default log routing for this app here (don't use set!): |
138 # You can override the default log routing for this app here (don't use set!): |
138 @@ -241,7 +241,7 @@ use = egg:swift#recon |
139 @@ -264,7 +264,7 @@ use = egg:swift#recon |
139 # bytes_per_second = 10000000 |
140 # bytes_per_second = 10000000 |
140 # log_time = 3600 |
141 # log_time = 3600 |
141 # zero_byte_files_per_second = 50 |
142 # zero_byte_files_per_second = 50 |
142 -# recon_cache_path = /var/cache/swift |
143 -# recon_cache_path = /var/cache/swift |
143 +# recon_cache_path = /var/lib/swift/recon-cache |
144 +# recon_cache_path = /var/lib/swift/recon-cache |
144 |
145 |
145 # Takes a comma separated list of ints. If set, the object auditor will |
146 # Takes a comma separated list of ints. If set, the object auditor will |
146 # increment a counter for every object whose size is <= to the given break |
147 # increment a counter for every object whose size is <= to the given break |
147 --- swift-2.2.2/swift/account/auditor.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
148 --- swift-2.3.0/swift/account/auditor.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
148 +++ swift-2.2.2/swift/account/auditor.py 2015-02-26 16:49:51.938879416 -0800 |
149 +++ swift-2.3.0/swift/account/auditor.py 2016-02-08 00:56:36.134366990 -0800 |
149 @@ -46,7 +46,7 @@ class AccountAuditor(Daemon): |
150 @@ -46,7 +46,7 @@ class AccountAuditor(Daemon): |
150 swift.common.db.DB_PREALLOCATION = \ |
151 swift.common.db.DB_PREALLOCATION = \ |
151 config_true_value(conf.get('db_preallocation', 'f')) |
152 config_true_value(conf.get('db_preallocation', 'f')) |
152 self.recon_cache_path = conf.get('recon_cache_path', |
153 self.recon_cache_path = conf.get('recon_cache_path', |
153 - '/var/cache/swift') |
154 - '/var/cache/swift') |
154 + '/var/lib/swift/recon-cache') |
155 + '/var/lib/swift/recon-cache') |
155 self.rcache = os.path.join(self.recon_cache_path, "account.recon") |
156 self.rcache = os.path.join(self.recon_cache_path, "account.recon") |
156 |
157 |
157 def _one_audit_pass(self, reported): |
158 def _one_audit_pass(self, reported): |
158 --- swift-2.2.2/swift/common/db_replicator.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
159 --- swift-2.3.0/swift/common/db_replicator.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
159 +++ swift-2.2.2/swift/common/db_replicator.py 2015-02-26 16:49:51.939223420 -0800 |
160 +++ swift-2.3.0/swift/common/db_replicator.py 2016-02-08 00:56:36.135027676 -0800 |
160 @@ -171,7 +171,7 @@ class Replicator(Daemon): |
161 @@ -172,7 +172,7 @@ class Replicator(Daemon): |
161 config_true_value(conf.get('db_preallocation', 'f')) |
162 config_true_value(conf.get('db_preallocation', 'f')) |
162 self._zero_stats() |
163 self._zero_stats() |
163 self.recon_cache_path = conf.get('recon_cache_path', |
164 self.recon_cache_path = conf.get('recon_cache_path', |
164 - '/var/cache/swift') |
165 - '/var/cache/swift') |
165 + '/var/lib/swift/recon-cache') |
166 + '/var/lib/swift/recon-cache') |
166 self.recon_replicator = '%s.recon' % self.server_type |
167 self.recon_replicator = '%s.recon' % self.server_type |
167 self.rcache = os.path.join(self.recon_cache_path, |
168 self.rcache = os.path.join(self.recon_cache_path, |
168 self.recon_replicator) |
169 self.recon_replicator) |
169 --- swift-2.2.2/swift/common/middleware/recon.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
170 --- swift-2.3.0/swift/common/middleware/recon.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
170 +++ swift-2.2.2/swift/common/middleware/recon.py 2015-02-26 16:49:51.939514933 -0800 |
171 +++ swift-2.3.0/swift/common/middleware/recon.py 2016-02-08 00:59:32.515208787 -0800 |
171 @@ -15,6 +15,7 @@ |
172 @@ -15,6 +15,7 @@ |
172 |
173 |
173 import errno |
174 import errno |
174 import os |
175 import os |
175 +import sys |
176 +import sys |
234 + if sys.platform == 'sunos5': |
236 + if sys.platform == 'sunos5': |
235 + return {} |
237 + return {} |
236 meminfo = {} |
238 meminfo = {} |
237 with openr('/proc/meminfo', 'r') as memlines: |
239 with openr('/proc/meminfo', 'r') as memlines: |
238 for i in memlines: |
240 for i in memlines: |
239 --- swift-2.2.2/swift/container/auditor.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
241 --- swift-2.3.0/swift/container/auditor.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
240 +++ swift-2.2.2/swift/container/auditor.py 2015-02-26 16:49:51.939751504 -0800 |
242 +++ swift-2.3.0/swift/container/auditor.py 2016-02-08 00:56:36.136109394 -0800 |
241 @@ -44,7 +44,7 @@ class ContainerAuditor(Daemon): |
243 @@ -44,7 +44,7 @@ class ContainerAuditor(Daemon): |
242 swift.common.db.DB_PREALLOCATION = \ |
244 swift.common.db.DB_PREALLOCATION = \ |
243 config_true_value(conf.get('db_preallocation', 'f')) |
245 config_true_value(conf.get('db_preallocation', 'f')) |
244 self.recon_cache_path = conf.get('recon_cache_path', |
246 self.recon_cache_path = conf.get('recon_cache_path', |
245 - '/var/cache/swift') |
247 - '/var/cache/swift') |
246 + '/var/lib/swift/recon-cache') |
248 + '/var/lib/swift/recon-cache') |
247 self.rcache = os.path.join(self.recon_cache_path, "container.recon") |
249 self.rcache = os.path.join(self.recon_cache_path, "container.recon") |
248 |
250 |
249 def _one_audit_pass(self, reported): |
251 def _one_audit_pass(self, reported): |
250 --- swift-2.2.2/swift/container/updater.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
252 --- swift-2.3.0/swift/container/updater.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
251 +++ swift-2.2.2/swift/container/updater.py 2015-02-26 16:49:51.939968905 -0800 |
253 +++ swift-2.3.0/swift/container/updater.py 2016-02-08 00:56:36.136593440 -0800 |
252 @@ -60,7 +60,7 @@ class ContainerUpdater(Daemon): |
254 @@ -60,7 +60,7 @@ class ContainerUpdater(Daemon): |
253 swift.common.db.DB_PREALLOCATION = \ |
255 swift.common.db.DB_PREALLOCATION = \ |
254 config_true_value(conf.get('db_preallocation', 'f')) |
256 config_true_value(conf.get('db_preallocation', 'f')) |
255 self.recon_cache_path = conf.get('recon_cache_path', |
257 self.recon_cache_path = conf.get('recon_cache_path', |
256 - '/var/cache/swift') |
258 - '/var/cache/swift') |
257 + '/var/lib/swift/recon-cache') |
259 + '/var/lib/swift/recon-cache') |
258 self.rcache = os.path.join(self.recon_cache_path, "container.recon") |
260 self.rcache = os.path.join(self.recon_cache_path, "container.recon") |
259 self.user_agent = 'container-updater %s' % os.getpid() |
261 self.user_agent = 'container-updater %s' % os.getpid() |
260 |
262 |
261 --- swift-2.2.2/swift/obj/auditor.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
263 --- swift-2.3.0/swift/obj/auditor.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
262 +++ swift-2.2.2/swift/obj/auditor.py 2015-02-26 16:49:51.940188415 -0800 |
264 +++ swift-2.3.0/swift/obj/auditor.py 2016-02-08 00:56:36.137103648 -0800 |
263 @@ -227,7 +227,7 @@ class ObjectAuditor(Daemon): |
265 @@ -227,7 +227,7 @@ class ObjectAuditor(Daemon): |
264 self.conf_zero_byte_fps = int( |
266 self.conf_zero_byte_fps = int( |
265 conf.get('zero_byte_files_per_second', 50)) |
267 conf.get('zero_byte_files_per_second', 50)) |
266 self.recon_cache_path = conf.get('recon_cache_path', |
268 self.recon_cache_path = conf.get('recon_cache_path', |
267 - '/var/cache/swift') |
269 - '/var/cache/swift') |
268 + '/var/lib/swift/recon-cache') |
270 + '/var/lib/swift/recon-cache') |
269 self.rcache = os.path.join(self.recon_cache_path, "object.recon") |
271 self.rcache = os.path.join(self.recon_cache_path, "object.recon") |
270 |
272 |
271 def _sleep(self): |
273 def _sleep(self): |
272 --- swift-2.2.2/swift/obj/expirer.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
274 --- swift-2.3.0/swift/obj/expirer.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
273 +++ swift-2.2.2/swift/obj/expirer.py 2015-02-26 16:49:51.940400670 -0800 |
275 +++ swift-2.3.0/swift/obj/expirer.py 2016-02-08 00:56:36.137585778 -0800 |
274 @@ -57,7 +57,7 @@ class ObjectExpirer(Daemon): |
276 @@ -57,7 +57,7 @@ class ObjectExpirer(Daemon): |
275 self.report_first_time = self.report_last_time = time() |
277 self.report_first_time = self.report_last_time = time() |
276 self.report_objects = 0 |
278 self.report_objects = 0 |
277 self.recon_cache_path = conf.get('recon_cache_path', |
279 self.recon_cache_path = conf.get('recon_cache_path', |
278 - '/var/cache/swift') |
280 - '/var/cache/swift') |
279 + '/var/lib/swift/recon-cache') |
281 + '/var/lib/swift/recon-cache') |
280 self.rcache = join(self.recon_cache_path, 'object.recon') |
282 self.rcache = join(self.recon_cache_path, 'object.recon') |
281 self.concurrency = int(conf.get('concurrency', 1)) |
283 self.concurrency = int(conf.get('concurrency', 1)) |
282 if self.concurrency < 1: |
284 if self.concurrency < 1: |
283 --- swift-2.2.2/swift/obj/replicator.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
285 --- swift-2.3.0/swift/obj/replicator.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
284 +++ swift-2.2.2/swift/obj/replicator.py 2015-02-26 16:49:51.940644907 -0800 |
286 +++ swift-2.3.0/swift/obj/replicator.py 2016-02-08 00:56:36.138119411 -0800 |
285 @@ -77,7 +77,7 @@ class ObjectReplicator(Daemon): |
287 @@ -79,7 +79,7 @@ class ObjectReplicator(Daemon): |
286 self.http_timeout = int(conf.get('http_timeout', 60)) |
288 self.http_timeout = int(conf.get('http_timeout', 60)) |
287 self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) |
289 self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) |
288 self.recon_cache_path = conf.get('recon_cache_path', |
290 self.recon_cache_path = conf.get('recon_cache_path', |
289 - '/var/cache/swift') |
291 - '/var/cache/swift') |
290 + '/var/lib/swift/recon-cache') |
292 + '/var/lib/swift/recon-cache') |
291 self.rcache = os.path.join(self.recon_cache_path, "object.recon") |
293 self.rcache = os.path.join(self.recon_cache_path, "object.recon") |
292 self.conn_timeout = float(conf.get('conn_timeout', 0.5)) |
294 self.conn_timeout = float(conf.get('conn_timeout', 0.5)) |
293 self.node_timeout = float(conf.get('node_timeout', 10)) |
295 self.node_timeout = float(conf.get('node_timeout', 10)) |
294 --- swift-2.2.2/swift/obj/updater.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
296 --- swift-2.3.0/swift/obj/updater.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
295 +++ swift-2.2.2/swift/obj/updater.py 2015-02-26 16:49:51.940853387 -0800 |
297 +++ swift-2.3.0/swift/obj/updater.py 2016-02-08 00:56:36.138592637 -0800 |
296 @@ -52,7 +52,7 @@ class ObjectUpdater(Daemon): |
298 @@ -53,7 +53,7 @@ class ObjectUpdater(Daemon): |
297 self.successes = 0 |
299 self.successes = 0 |
298 self.failures = 0 |
300 self.failures = 0 |
299 self.recon_cache_path = conf.get('recon_cache_path', |
301 self.recon_cache_path = conf.get('recon_cache_path', |
300 - '/var/cache/swift') |
302 - '/var/cache/swift') |
301 + '/var/lib/swift/recon-cache') |
303 + '/var/lib/swift/recon-cache') |
302 self.rcache = os.path.join(self.recon_cache_path, 'object.recon') |
304 self.rcache = os.path.join(self.recon_cache_path, 'object.recon') |
303 |
305 |
304 def _listdir(self, path): |
306 def _listdir(self, path): |
305 --- swift-2.2.2/test/unit/common/middleware/test_recon.py.~1~ 2015-02-01 23:44:11.000000000 -0800 |
307 --- swift-2.3.0/test/unit/common/middleware/test_recon.py.~1~ 2015-04-30 06:57:42.000000000 -0700 |
306 +++ swift-2.2.2/test/unit/common/middleware/test_recon.py 2015-02-26 16:49:51.941363136 -0800 |
308 +++ swift-2.3.0/test/unit/common/middleware/test_recon.py 2016-02-08 01:01:12.393031484 -0800 |
307 @@ -21,7 +21,9 @@ import array |
309 @@ -21,7 +21,9 @@ import array |
308 from swift.common import ring, utils |
310 from swift.common import ring, utils |
309 from shutil import rmtree |
311 from shutil import rmtree |
310 import os |
312 import os |
311 +import sys |
313 +import sys |
312 import mock |
314 import mock |
313 +from nose import SkipTest |
315 +from nose import SkipTest |
314 |
316 |
315 from swift import __version__ as swiftver |
317 from swift import __version__ as swiftver |
316 from swift.common.swob import Request |
318 from swift.common.swob import Request |
317 @@ -384,10 +386,12 @@ class TestReconSuccess(TestCase): |
319 @@ -387,10 +389,12 @@ class TestReconSuccess(TestCase): |
318 {'device': 'none', 'path': '/proc/fs/vmblock/mountPoint'}] |
320 {'device': 'none', 'path': '/proc/fs/vmblock/mountPoint'}] |
319 oart = OpenAndReadTester(mounts_content) |
321 oart = OpenAndReadTester(mounts_content) |
320 rv = self.app.get_mounted(openr=oart.open) |
322 rv = self.app.get_mounted(openr=oart.open) |
321 - self.assertEquals(oart.open_calls, [(('/proc/mounts', 'r'), {})]) |
323 - self.assertEquals(oart.open_calls, [(('/proc/mounts', 'r'), {})]) |
322 + self.assertEquals(oart.open_calls, [(('/etc/mnttab', 'r'), {})]) |
324 + self.assertEquals(oart.open_calls, [(('/etc/mnttab', 'r'), {})]) |
326 + if sys.platform == 'sunos5': |
328 + if sys.platform == 'sunos5': |
327 + raise SkipTest |
329 + raise SkipTest |
328 oart = OpenAndReadTester(['0.03 0.03 0.00 1/220 16306']) |
330 oart = OpenAndReadTester(['0.03 0.03 0.00 1/220 16306']) |
329 rv = self.app.get_load(openr=oart.open) |
331 rv = self.app.get_load(openr=oart.open) |
330 self.assertEquals(oart.read_calls, [((), {})]) |
332 self.assertEquals(oart.read_calls, [((), {})]) |
331 @@ -397,6 +401,8 @@ class TestReconSuccess(TestCase): |
333 @@ -400,6 +404,8 @@ class TestReconSuccess(TestCase): |
332 '1m': 0.029999999999999999}) |
334 '1m': 0.029999999999999999}) |
333 |
335 |
334 def test_get_mem(self): |
336 def test_get_mem(self): |
335 + if sys.platform == 'sunos5': |
337 + if sys.platform == 'sunos5': |
336 + raise SkipTest |
338 + raise SkipTest |
337 meminfo_content = ['MemTotal: 505840 kB', |
339 meminfo_content = ['MemTotal: 505840 kB', |
338 'MemFree: 26588 kB', |
340 'MemFree: 26588 kB', |
339 'Buffers: 44948 kB', |
341 'Buffers: 44948 kB', |
340 @@ -508,7 +514,7 @@ class TestReconSuccess(TestCase): |
342 @@ -514,7 +520,8 @@ class TestReconSuccess(TestCase): |
341 self.assertEquals(self.fakecache.fakeout_calls, |
343 self.assertEquals(self.fakecache.fakeout_calls, |
342 [((['replication_time', 'replication_stats', |
344 [((['replication_time', 'replication_stats', |
343 'replication_last'], |
345 'replication_last'], |
344 - '/var/cache/swift/account.recon'), {})]) |
346 - '/var/cache/swift/account.recon'), {})]) |
345 + '/var/lib/swift/recon-cache/account.recon'), {})]) |
347 + '/var/lib/swift/recon-cache/account.recon'), |
|
348 + {})]) |
346 self.assertEquals(rv, { |
349 self.assertEquals(rv, { |
347 "replication_stats": { |
350 "replication_stats": { |
348 "attempted": 1, "diff": 0, |
351 "attempted": 1, "diff": 0, |
349 @@ -539,7 +545,7 @@ class TestReconSuccess(TestCase): |
352 @@ -545,7 +552,8 @@ class TestReconSuccess(TestCase): |
350 self.assertEquals(self.fakecache.fakeout_calls, |
353 self.assertEquals(self.fakecache.fakeout_calls, |
351 [((['replication_time', 'replication_stats', |
354 [((['replication_time', 'replication_stats', |
352 'replication_last'], |
355 'replication_last'], |
353 - '/var/cache/swift/container.recon'), {})]) |
356 - '/var/cache/swift/container.recon'), {})]) |
354 + '/var/lib/swift/recon-cache/container.recon'), {})]) |
357 + '/var/lib/swift/recon-cache/container.recon'), |
|
358 + {})]) |
355 self.assertEquals(rv, { |
359 self.assertEquals(rv, { |
356 "replication_time": 200.0, |
360 "replication_time": 200.0, |
357 "replication_stats": { |
361 "replication_stats": { |
358 @@ -561,7 +567,7 @@ class TestReconSuccess(TestCase): |
362 @@ -567,7 +575,7 @@ class TestReconSuccess(TestCase): |
359 self.assertEquals(self.fakecache.fakeout_calls, |
363 self.assertEquals(self.fakecache.fakeout_calls, |
360 [((['object_replication_time', |
364 [((['object_replication_time', |
361 'object_replication_last'], |
365 'object_replication_last'], |
362 - '/var/cache/swift/object.recon'), {})]) |
366 - '/var/cache/swift/object.recon'), {})]) |
363 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
367 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
364 self.assertEquals(rv, {'object_replication_time': 200.0, |
368 self.assertEquals(rv, {'object_replication_time': 200.0, |
365 'object_replication_last': 1357962809.15}) |
369 'object_replication_last': 1357962809.15}) |
366 |
370 |
367 @@ -572,7 +578,7 @@ class TestReconSuccess(TestCase): |
371 @@ -578,7 +586,8 @@ class TestReconSuccess(TestCase): |
368 rv = self.app.get_updater_info('container') |
372 rv = self.app.get_updater_info('container') |
369 self.assertEquals(self.fakecache.fakeout_calls, |
373 self.assertEquals(self.fakecache.fakeout_calls, |
370 [((['container_updater_sweep'], |
374 [((['container_updater_sweep'], |
371 - '/var/cache/swift/container.recon'), {})]) |
375 - '/var/cache/swift/container.recon'), {})]) |
372 + '/var/lib/swift/recon-cache/container.recon'), {})]) |
376 + '/var/lib/swift/recon-cache/container.recon'), |
|
377 + {})]) |
373 self.assertEquals(rv, {"container_updater_sweep": 18.476239919662476}) |
378 self.assertEquals(rv, {"container_updater_sweep": 18.476239919662476}) |
374 |
379 |
375 def test_get_updater_info_object(self): |
380 def test_get_updater_info_object(self): |
376 @@ -582,7 +588,7 @@ class TestReconSuccess(TestCase): |
381 @@ -588,7 +597,7 @@ class TestReconSuccess(TestCase): |
377 rv = self.app.get_updater_info('object') |
382 rv = self.app.get_updater_info('object') |
378 self.assertEquals(self.fakecache.fakeout_calls, |
383 self.assertEquals(self.fakecache.fakeout_calls, |
379 [((['object_updater_sweep'], |
384 [((['object_updater_sweep'], |
380 - '/var/cache/swift/object.recon'), {})]) |
385 - '/var/cache/swift/object.recon'), {})]) |
381 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
386 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
382 self.assertEquals(rv, {"object_updater_sweep": 0.79848217964172363}) |
387 self.assertEquals(rv, {"object_updater_sweep": 0.79848217964172363}) |
383 |
388 |
384 def test_get_auditor_info_account(self): |
389 def test_get_expirer_info_object(self): |
385 @@ -598,7 +604,7 @@ class TestReconSuccess(TestCase): |
390 @@ -615,7 +624,8 @@ class TestReconSuccess(TestCase): |
386 'account_auditor_pass_completed', |
391 'account_auditor_pass_completed', |
387 'account_audits_since', |
392 'account_audits_since', |
388 'account_audits_failed'], |
393 'account_audits_failed'], |
389 - '/var/cache/swift/account.recon'), {})]) |
394 - '/var/cache/swift/account.recon'), {})]) |
390 + '/var/lib/swift/recon-cache/account.recon'), {})]) |
395 + '/var/lib/swift/recon-cache/account.recon'), |
|
396 + {})]) |
391 self.assertEquals(rv, {"account_auditor_pass_completed": 0.24, |
397 self.assertEquals(rv, {"account_auditor_pass_completed": 0.24, |
392 "account_audits_failed": 0, |
398 "account_audits_failed": 0, |
393 "account_audits_passed": 6, |
399 "account_audits_passed": 6, |
394 @@ -617,7 +623,7 @@ class TestReconSuccess(TestCase): |
400 @@ -634,7 +644,8 @@ class TestReconSuccess(TestCase): |
395 'container_auditor_pass_completed', |
401 'container_auditor_pass_completed', |
396 'container_audits_since', |
402 'container_audits_since', |
397 'container_audits_failed'], |
403 'container_audits_failed'], |
398 - '/var/cache/swift/container.recon'), {})]) |
404 - '/var/cache/swift/container.recon'), {})]) |
399 + '/var/lib/swift/recon-cache/container.recon'), {})]) |
405 + '/var/lib/swift/recon-cache/container.recon'), |
|
406 + {})]) |
400 self.assertEquals(rv, {"container_auditor_pass_completed": 0.24, |
407 self.assertEquals(rv, {"container_auditor_pass_completed": 0.24, |
401 "container_audits_failed": 0, |
408 "container_audits_failed": 0, |
402 "container_audits_passed": 6, |
409 "container_audits_passed": 6, |
403 @@ -645,7 +651,7 @@ class TestReconSuccess(TestCase): |
410 @@ -662,7 +673,7 @@ class TestReconSuccess(TestCase): |
404 self.assertEquals(self.fakecache.fakeout_calls, |
411 self.assertEquals(self.fakecache.fakeout_calls, |
405 [((['object_auditor_stats_ALL', |
412 [((['object_auditor_stats_ALL', |
406 'object_auditor_stats_ZBF'], |
413 'object_auditor_stats_ZBF'], |
407 - '/var/cache/swift/object.recon'), {})]) |
414 - '/var/cache/swift/object.recon'), {})]) |
408 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
415 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
409 self.assertEquals(rv, { |
416 self.assertEquals(rv, { |
410 "object_auditor_stats_ALL": { |
417 "object_auditor_stats_ALL": { |
411 "audit_time": 115.14418768882751, |
418 "audit_time": 115.14418768882751, |
412 @@ -692,7 +698,7 @@ class TestReconSuccess(TestCase): |
419 @@ -709,7 +720,7 @@ class TestReconSuccess(TestCase): |
413 self.assertEquals(self.fakecache.fakeout_calls, |
420 self.assertEquals(self.fakecache.fakeout_calls, |
414 [((['object_auditor_stats_ALL', |
421 [((['object_auditor_stats_ALL', |
415 'object_auditor_stats_ZBF'], |
422 'object_auditor_stats_ZBF'], |
416 - '/var/cache/swift/object.recon'), {})]) |
423 - '/var/cache/swift/object.recon'), {})]) |
417 + '/var/lib/swift/recon-cache/object.recon'), {})]) |
424 + '/var/lib/swift/recon-cache/object.recon'), {})]) |