Ticket #1384: fix-1384.darcs.patch

File fix-1384.darcs.patch, 15.9 KB (added by davidsarah, at 2011-07-19T03:30:26Z)

src/allmydata/storage/server.py: use the filesystem of storage/shares/, rather than storage/, to calculate remaining space. fixes #1384

Line 
11 patch for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk:
2
3Tue Jul 19 03:27:52 BST 2011  david-sarah@jacaranda.org
4  * src/allmydata/storage/server.py: use the filesystem of storage/shares/, rather than storage/, to calculate remaining space. fixes #1384
5
6New patches:
7
8[src/allmydata/storage/server.py: use the filesystem of storage/shares/, rather than storage/, to calculate remaining space. fixes #1384
9david-sarah@jacaranda.org**20110719022752
10 Ignore-this: a4781043cfd453dbb66ae4f108d80bea
11] {
12hunk ./src/allmydata/storage/server.py 175
13                 stats['storage_server.latencies.%s.%s' % (category, name)] = v
14 
15         try:
16-            disk = fileutil.get_disk_stats(self.storedir, self.reserved_space)
17+            disk = fileutil.get_disk_stats(self.sharedir, self.reserved_space)
18             writeable = disk['avail'] > 0
19 
20             # spacetime predictors should use disk_avail / (d(disk_used)/dt)
21hunk ./src/allmydata/storage/server.py 207
22 
23         if self.readonly_storage:
24             return 0
25-        return fileutil.get_available_space(self.storedir, self.reserved_space)
26+        return fileutil.get_available_space(self.sharedir, self.reserved_space)
27 
28     def allocated_size(self):
29         space = 0
30}
31
32Context:
33
34[docs/running.rst: use 'tahoe run ~/.tahoe' instead of 'tahoe run' (the default is the current directory, unlike 'tahoe start').
35david-sarah@jacaranda.org**20110718005949
36 Ignore-this: 81837fbce073e93d88a3e7ae3122458c
37]
38[docs/running.rst: say to put the introducer.furl in tahoe.cfg.
39david-sarah@jacaranda.org**20110717194315
40 Ignore-this: 954cc4c08e413e8c62685d58ff3e11f3
41]
42[setup: remove the dependency on foolscap's "secure_connections" extra, add a dependency on pyOpenSSL
43zooko@zooko.com**20110717114226
44 Ignore-this: df222120d41447ce4102616921626c82
45 fixes #1383
46]
47[docs: add missing link in NEWS.rst
48zooko@zooko.com**20110712153307
49 Ignore-this: be7b7eb81c03700b739daa1027d72b35
50]
51[contrib: remove the contributed fuse modules and the entire contrib/ directory, which is now empty
52zooko@zooko.com**20110712153229
53 Ignore-this: 723c4f9e2211027c79d711715d972c5
54 Also remove a couple of vestigial references to figleaf, which is long gone.
55 fixes #1409 (remove contrib/fuse)
56]
57[README.txt: say that quickstart.rst is in the docs directory.
58david-sarah@jacaranda.org**20110717192400
59 Ignore-this: bc6d35a85c496b77dbef7570677ea42a
60]
61[test_sftp.py cleanup: remove a redundant definition of failUnlessReallyEqual.
62david-sarah@jacaranda.org**20110716181813
63 Ignore-this: 50113380b368c573f07ac6fe2eb1e97f
64]
65[add Protovis.js-based download-status timeline visualization
66Brian Warner <warner@lothar.com>**20110629222606
67 Ignore-this: 477ccef5c51b30e246f5b6e04ab4a127
68 
69 provide status overlap info on the webapi t=json output, add decode/decrypt
70 rate tooltips, add zoomin/zoomout buttons
71]
72[add more download-status data, fix tests
73Brian Warner <warner@lothar.com>**20110629222555
74 Ignore-this: e9e0b7e0163f1e95858aa646b9b17b8c
75]
76[prepare for viz: improve DownloadStatus events
77Brian Warner <warner@lothar.com>**20110629222542
78 Ignore-this: 16d0bde6b734bb501aa6f1174b2b57be
79 
80 consolidate IDownloadStatusHandlingConsumer stuff into DownloadNode
81]
82[docs: fix error in crypto specification that was noticed by Taylor R Campbell <campbell+tahoe@mumble.net>
83zooko@zooko.com**20110629185711
84 Ignore-this: b921ed60c1c8ba3c390737fbcbe47a67
85]
86[setup.py: don't make bin/tahoe.pyscript executable. fixes #1347
87david-sarah@jacaranda.org**20110130235809
88 Ignore-this: 3454c8b5d9c2c77ace03de3ef2d9398a
89]
90[Makefile: remove targets relating to 'setup.py check_auto_deps' which no longer exists. fixes #1345
91david-sarah@jacaranda.org**20110626054124
92 Ignore-this: abb864427a1b91bd10d5132b4589fd90
93]
94[Makefile: add 'make check' as an alias for 'make test'. Also remove an unnecessary dependency of 'test' on 'build' and 'src/allmydata/_version.py'. fixes #1344
95david-sarah@jacaranda.org**20110623205528
96 Ignore-this: c63e23146c39195de52fb17c7c49b2da
97]
98[Rename test_package_initialization.py to (much shorter) test_import.py .
99Brian Warner <warner@lothar.com>**20110611190234
100 Ignore-this: 3eb3dbac73600eeff5cfa6b65d65822
101 
102 The former name was making my 'ls' listings hard to read, by forcing them
103 down to just two columns.
104]
105[tests: fix tests to accomodate [20110611153758-92b7f-0ba5e4726fb6318dac28fb762a6512a003f4c430]
106zooko@zooko.com**20110611163741
107 Ignore-this: 64073a5f39e7937e8e5e1314c1a302d1
108 Apparently none of the two authors (stercor, terrell), three reviewers (warner, davidsarah, terrell), or one committer (me) actually ran the tests. This is presumably due to #20.
109 fixes #1412
110]
111[wui: right-align the size column in the WUI
112zooko@zooko.com**20110611153758
113 Ignore-this: 492bdaf4373c96f59f90581c7daf7cd7
114 Thanks to Ted "stercor" Rolle Jr. and Terrell Russell.
115 fixes #1412
116]
117[docs: three minor fixes
118zooko@zooko.com**20110610121656
119 Ignore-this: fec96579eb95aceb2ad5fc01a814c8a2
120 CREDITS for arc for stats tweak
121 fix link to .zip file in quickstart.rst (thanks to ChosenOne for noticing)
122 English usage tweak
123]
124[docs/running.rst: fix stray HTML (not .rst) link noticed by ChosenOne.
125david-sarah@jacaranda.org**20110609223719
126 Ignore-this: fc50ac9c94792dcac6f1067df8ac0d4a
127]
128[server.py:  get_latencies now reports percentiles _only_ if there are sufficient observations for the interpretation of the percentile to be unambiguous.
129wilcoxjg@gmail.com**20110527120135
130 Ignore-this: 2e7029764bffc60e26f471d7c2b6611e
131 interfaces.py:  modified the return type of RIStatsProvider.get_stats to allow for None as a return value
132 NEWS.rst, stats.py: documentation of change to get_latencies
133 stats.rst: now documents percentile modification in get_latencies
134 test_storage.py:  test_latencies now expects None in output categories that contain too few samples for the associated percentile to be unambiguously reported.
135 fixes #1392
136]
137[docs: revert link in relnotes.txt from NEWS.rst to NEWS, since the former did not exist at revision 5000.
138david-sarah@jacaranda.org**20110517011214
139 Ignore-this: 6a5be6e70241e3ec0575641f64343df7
140]
141[docs: convert NEWS to NEWS.rst and change all references to it.
142david-sarah@jacaranda.org**20110517010255
143 Ignore-this: a820b93ea10577c77e9c8206dbfe770d
144]
145[docs: remove out-of-date docs/testgrid/introducer.furl and containing directory. fixes #1404
146david-sarah@jacaranda.org**20110512140559
147 Ignore-this: 784548fc5367fac5450df1c46890876d
148]
149[scripts/common.py: don't assume that the default alias is always 'tahoe' (it is, but the API of get_alias doesn't say so). refs #1342
150david-sarah@jacaranda.org**20110130164923
151 Ignore-this: a271e77ce81d84bb4c43645b891d92eb
152]
153[setup: don't catch all Exception from check_requirement(), but only PackagingError and ImportError
154zooko@zooko.com**20110128142006
155 Ignore-this: 57d4bc9298b711e4bc9dc832c75295de
156 I noticed this because I had accidentally inserted a bug which caused AssertionError to be raised from check_requirement().
157]
158[M-x whitespace-cleanup
159zooko@zooko.com**20110510193653
160 Ignore-this: dea02f831298c0f65ad096960e7df5c7
161]
162[docs: fix typo in running.rst, thanks to arch_o_median
163zooko@zooko.com**20110510193633
164 Ignore-this: ca06de166a46abbc61140513918e79e8
165]
166[relnotes.txt: don't claim to work on Cygwin (which has been untested for some time). refs #1342
167david-sarah@jacaranda.org**20110204204902
168 Ignore-this: 85ef118a48453d93fa4cddc32d65b25b
169]
170[relnotes.txt: forseeable -> foreseeable. refs #1342
171david-sarah@jacaranda.org**20110204204116
172 Ignore-this: 746debc4d82f4031ebf75ab4031b3a9
173]
174[replace remaining .html docs with .rst docs
175zooko@zooko.com**20110510191650
176 Ignore-this: d557d960a986d4ac8216d1677d236399
177 Remove install.html (long since deprecated).
178 Also replace some obsolete references to install.html with references to quickstart.rst.
179 Fix some broken internal references within docs/historical/historical_known_issues.txt.
180 Thanks to Ravi Pinjala and Patrick McDonald.
181 refs #1227
182]
183[docs: FTP-and-SFTP.rst: fix a minor error and update the information about which version of Twisted fixes #1297
184zooko@zooko.com**20110428055232
185 Ignore-this: b63cfb4ebdbe32fb3b5f885255db4d39
186]
187[munin tahoe_files plugin: fix incorrect file count
188francois@ctrlaltdel.ch**20110428055312
189 Ignore-this: 334ba49a0bbd93b4a7b06a25697aba34
190 fixes #1391
191]
192[corrected "k must never be smaller than N" to "k must never be greater than N"
193secorp@allmydata.org**20110425010308
194 Ignore-this: 233129505d6c70860087f22541805eac
195]
196[Fix a test failure in test_package_initialization on Python 2.4.x due to exceptions being stringified differently than in later versions of Python. refs #1389
197david-sarah@jacaranda.org**20110411190738
198 Ignore-this: 7847d26bc117c328c679f08a7baee519
199]
200[tests: add test for including the ImportError message and traceback entry in the summary of errors from importing dependencies. refs #1389
201david-sarah@jacaranda.org**20110410155844
202 Ignore-this: fbecdbeb0d06a0f875fe8d4030aabafa
203]
204[allmydata/__init__.py: preserve the message and last traceback entry (file, line number, function, and source line) of ImportErrors in the package versions string. fixes #1389
205david-sarah@jacaranda.org**20110410155705
206 Ignore-this: 2f87b8b327906cf8bfca9440a0904900
207]
208[remove unused variable detected by pyflakes
209zooko@zooko.com**20110407172231
210 Ignore-this: 7344652d5e0720af822070d91f03daf9
211]
212[allmydata/__init__.py: Nicer reporting of unparseable version numbers in dependencies. fixes #1388
213david-sarah@jacaranda.org**20110401202750
214 Ignore-this: 9c6bd599259d2405e1caadbb3e0d8c7f
215]
216[update FTP-and-SFTP.rst: the necessary patch is included in Twisted-10.1
217Brian Warner <warner@lothar.com>**20110325232511
218 Ignore-this: d5307faa6900f143193bfbe14e0f01a
219]
220[control.py: remove all uses of s.get_serverid()
221warner@lothar.com**20110227011203
222 Ignore-this: f80a787953bd7fa3d40e828bde00e855
223]
224[web: remove some uses of s.get_serverid(), not all
225warner@lothar.com**20110227011159
226 Ignore-this: a9347d9cf6436537a47edc6efde9f8be
227]
228[immutable/downloader/fetcher.py: remove all get_serverid() calls
229warner@lothar.com**20110227011156
230 Ignore-this: fb5ef018ade1749348b546ec24f7f09a
231]
232[immutable/downloader/fetcher.py: fix diversity bug in server-response handling
233warner@lothar.com**20110227011153
234 Ignore-this: bcd62232c9159371ae8a16ff63d22c1b
235 
236 When blocks terminate (either COMPLETE or CORRUPT/DEAD/BADSEGNUM), the
237 _shares_from_server dict was being popped incorrectly (using shnum as the
238 index instead of serverid). I'm still thinking through the consequences of
239 this bug. It was probably benign and really hard to detect. I think it would
240 cause us to incorrectly believe that we're pulling too many shares from a
241 server, and thus prefer a different server rather than asking for a second
242 share from the first server. The diversity code is intended to spread out the
243 number of shares simultaneously being requested from each server, but with
244 this bug, it might be spreading out the total number of shares requested at
245 all, not just simultaneously. (note that SegmentFetcher is scoped to a single
246 segment, so the effect doesn't last very long).
247]
248[immutable/downloader/share.py: reduce get_serverid(), one left, update ext deps
249warner@lothar.com**20110227011150
250 Ignore-this: d8d56dd8e7b280792b40105e13664554
251 
252 test_download.py: create+check MyShare instances better, make sure they share
253 Server objects, now that finder.py cares
254]
255[immutable/downloader/finder.py: reduce use of get_serverid(), one left
256warner@lothar.com**20110227011146
257 Ignore-this: 5785be173b491ae8a78faf5142892020
258]
259[immutable/offloaded.py: reduce use of get_serverid() a bit more
260warner@lothar.com**20110227011142
261 Ignore-this: b48acc1b2ae1b311da7f3ba4ffba38f
262]
263[immutable/upload.py: reduce use of get_serverid()
264warner@lothar.com**20110227011138
265 Ignore-this: ffdd7ff32bca890782119a6e9f1495f6
266]
267[immutable/checker.py: remove some uses of s.get_serverid(), not all
268warner@lothar.com**20110227011134
269 Ignore-this: e480a37efa9e94e8016d826c492f626e
270]
271[add remaining get_* methods to storage_client.Server, NoNetworkServer, and
272warner@lothar.com**20110227011132
273 Ignore-this: 6078279ddf42b179996a4b53bee8c421
274 MockIServer stubs
275]
276[upload.py: rearrange _make_trackers a bit, no behavior changes
277warner@lothar.com**20110227011128
278 Ignore-this: 296d4819e2af452b107177aef6ebb40f
279]
280[happinessutil.py: finally rename merge_peers to merge_servers
281warner@lothar.com**20110227011124
282 Ignore-this: c8cd381fea1dd888899cb71e4f86de6e
283]
284[test_upload.py: factor out FakeServerTracker
285warner@lothar.com**20110227011120
286 Ignore-this: 6c182cba90e908221099472cc159325b
287]
288[test_upload.py: server-vs-tracker cleanup
289warner@lothar.com**20110227011115
290 Ignore-this: 2915133be1a3ba456e8603885437e03
291]
292[happinessutil.py: server-vs-tracker cleanup
293warner@lothar.com**20110227011111
294 Ignore-this: b856c84033562d7d718cae7cb01085a9
295]
296[upload.py: more tracker-vs-server cleanup
297warner@lothar.com**20110227011107
298 Ignore-this: bb75ed2afef55e47c085b35def2de315
299]
300[upload.py: fix var names to avoid confusion between 'trackers' and 'servers'
301warner@lothar.com**20110227011103
302 Ignore-this: 5d5e3415b7d2732d92f42413c25d205d
303]
304[refactor: s/peer/server/ in immutable/upload, happinessutil.py, test_upload
305warner@lothar.com**20110227011100
306 Ignore-this: 7ea858755cbe5896ac212a925840fe68
307 
308 No behavioral changes, just updating variable/method names and log messages.
309 The effects outside these three files should be minimal: some exception
310 messages changed (to say "server" instead of "peer"), and some internal class
311 names were changed. A few things still use "peer" to minimize external
312 changes, like UploadResults.timings["peer_selection"] and
313 happinessutil.merge_peers, which can be changed later.
314]
315[storage_client.py: clean up test_add_server/test_add_descriptor, remove .test_servers
316warner@lothar.com**20110227011056
317 Ignore-this: efad933e78179d3d5fdcd6d1ef2b19cc
318]
319[test_client.py, upload.py:: remove KiB/MiB/etc constants, and other dead code
320warner@lothar.com**20110227011051
321 Ignore-this: dc83c5794c2afc4f81e592f689c0dc2d
322]
323[test: increase timeout on a network test because Francois's ARM machine hit that timeout
324zooko@zooko.com**20110317165909
325 Ignore-this: 380c345cdcbd196268ca5b65664ac85b
326 I'm skeptical that the test was proceeding correctly but ran out of time. It seems more likely that it had gotten hung. But if we raise the timeout to an even more extravagant number then we can be even more certain that the test was never going to finish.
327]
328[docs/configuration.rst: add a "Frontend Configuration" section
329Brian Warner <warner@lothar.com>**20110222014323
330 Ignore-this: 657018aa501fe4f0efef9851628444ca
331 
332 this points to docs/frontends/*.rst, which were previously underlinked
333]
334[web/filenode.py: avoid calling req.finish() on closed HTTP connections. Closes #1366
335"Brian Warner <warner@lothar.com>"**20110221061544
336 Ignore-this: 799d4de19933f2309b3c0c19a63bb888
337]
338[Add unit tests for cross_check_pkg_resources_versus_import, and a regression test for ref #1355. This requires a little refactoring to make it testable.
339david-sarah@jacaranda.org**20110221015817
340 Ignore-this: 51d181698f8c20d3aca58b057e9c475a
341]
342[allmydata/__init__.py: .name was used in place of the correct .__name__ when printing an exception. Also, robustify string formatting by using %r instead of %s in some places. fixes #1355.
343david-sarah@jacaranda.org**20110221020125
344 Ignore-this: b0744ed58f161bf188e037bad077fc48
345]
346[Refactor StorageFarmBroker handling of servers
347Brian Warner <warner@lothar.com>**20110221015804
348 Ignore-this: 842144ed92f5717699b8f580eab32a51
349 
350 Pass around IServer instance instead of (peerid, rref) tuple. Replace
351 "descriptor" with "server". Other replacements:
352 
353  get_all_servers -> get_connected_servers/get_known_servers
354  get_servers_for_index -> get_servers_for_psi (now returns IServers)
355 
356 This change still needs to be pushed further down: lots of code is now
357 getting the IServer and then distributing (peerid, rref) internally.
358 Instead, it ought to distribute the IServer internally and delay
359 extracting a serverid or rref until the last moment.
360 
361 no_network.py was updated to retain parallelism.
362]
363[TAG allmydata-tahoe-1.8.2
364warner@lothar.com**20110131020101]
365Patch bundle hash:
366109764ed87151ce89c51df433258c1060e0bfd2e