Rename 'buckets' to 'sharesets' on storage status page.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
This commit is contained in:
David-Sarah Hopwood 2012-11-18 06:22:18 +00:00 committed by Daira Hopwood
parent 68cb1b4e74
commit 1f61319128
3 changed files with 18 additions and 18 deletions

View File

@ -2788,7 +2788,7 @@ class BucketCounterTest(unittest.TestCase, CrawlerTestMixin, ReallyEqualMixin):
s = remove_tags(html) s = remove_tags(html)
self.failUnlessIn("Accepting new shares: Yes", s) self.failUnlessIn("Accepting new shares: Yes", s)
self.failUnlessIn("Reserved space: - 0 B (0)", s) self.failUnlessIn("Reserved space: - 0 B (0)", s)
self.failUnlessIn("Total buckets: Not computed yet", s) self.failUnlessIn("Total sharesets: Not computed yet", s)
self.failUnlessIn("Next crawl in", s) self.failUnlessIn("Next crawl in", s)
def _after_first_prefix(prefix): def _after_first_prefix(prefix):
@ -2815,7 +2815,7 @@ class BucketCounterTest(unittest.TestCase, CrawlerTestMixin, ReallyEqualMixin):
def _after_yield(ign): def _after_yield(ign):
html = w.renderSynchronously() html = w.renderSynchronously()
s = remove_tags(html) s = remove_tags(html)
self.failUnlessIn("Total buckets: 0 (the number of", s) self.failUnlessIn("Total sharesets: 0 (the number of", s)
self.failUnless("Next crawl in 59 minutes" in s or "Next crawl in 60 minutes" in s, s) self.failUnless("Next crawl in 59 minutes" in s or "Next crawl in 60 minutes" in s, s)
d.addCallback(_after_yield) d.addCallback(_after_yield)
return d return d
@ -3026,9 +3026,9 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
def _check_html_in_cycle(html): def _check_html_in_cycle(html):
s = remove_tags(html) s = remove_tags(html)
self.failUnlessIn("So far, this cycle has examined " self.failUnlessIn("So far, this cycle has examined "
"1 shares in 1 buckets (0 mutable / 1 immutable) ", s) "1 shares in 1 sharesets (0 mutable / 1 immutable) ", s)
self.failUnlessIn("and has recovered: " self.failUnlessIn("and has recovered: "
"0 shares, 0 buckets (0 mutable / 0 immutable), " "0 shares, 0 sharesets (0 mutable / 0 immutable), "
"0 B (0 B / 0 B)", s) "0 B (0 B / 0 B)", s)
return ac.set_hook('after_cycle') return ac.set_hook('after_cycle')
@ -3077,9 +3077,9 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
d.addCallback(lambda ign: self.render1(webstatus)) d.addCallback(lambda ign: self.render1(webstatus))
def _check_html_after_cycle(html): def _check_html_after_cycle(html):
s = remove_tags(html) s = remove_tags(html)
self.failUnlessIn("recovered: 0 shares, 0 buckets " self.failUnlessIn("recovered: 0 shares, 0 sharesets "
"(0 mutable / 0 immutable), 0 B (0 B / 0 B) ", s) "(0 mutable / 0 immutable), 0 B (0 B / 0 B) ", s)
self.failUnlessIn("and saw a total of 4 shares, 4 buckets " self.failUnlessIn("and saw a total of 4 shares, 4 sharesets "
"(2 mutable / 2 immutable),", s) "(2 mutable / 2 immutable),", s)
self.failUnlessIn("but expiration was not enabled", s) self.failUnlessIn("but expiration was not enabled", s)
d.addCallback(_check_html_after_cycle) d.addCallback(_check_html_after_cycle)
@ -3164,10 +3164,10 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
# all. This part of the test depends upon the SIs landing right # all. This part of the test depends upon the SIs landing right
# where they do now. # where they do now.
self.failUnlessIn("The remainder of this cycle is expected to " self.failUnlessIn("The remainder of this cycle is expected to "
"recover: 4 shares, 4 buckets", s) "recover: 4 shares, 4 sharesets", s)
self.failUnlessIn("The whole cycle is expected to examine " self.failUnlessIn("The whole cycle is expected to examine "
"5 shares in 5 buckets and to recover: " "5 shares in 5 sharesets and to recover: "
"5 shares, 5 buckets", s) "5 shares, 5 sharesets", s)
return ac.set_hook('after_cycle') return ac.set_hook('after_cycle')
d.addCallback(_check_html_in_cycle) d.addCallback(_check_html_in_cycle)
@ -3207,7 +3207,7 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
s = remove_tags(html) s = remove_tags(html)
self.failUnlessIn("Expiration Enabled: expired leases will be removed", s) self.failUnlessIn("Expiration Enabled: expired leases will be removed", s)
self.failUnlessIn("Leases created or last renewed more than 33 minutes ago will be considered expired.", s) self.failUnlessIn("Leases created or last renewed more than 33 minutes ago will be considered expired.", s)
self.failUnlessIn(" recovered: 2 shares, 2 buckets (1 mutable / 1 immutable), ", s) self.failUnlessIn(" recovered: 2 shares, 2 sharesets (1 mutable / 1 immutable), ", s)
d.addCallback(_check_html_after_cycle) d.addCallback(_check_html_after_cycle)
d.addBoth(self._wait_for_yield, ac) d.addBoth(self._wait_for_yield, ac)
return d return d
@ -3284,10 +3284,10 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
# all. This part of the test depends upon the SIs landing right # all. This part of the test depends upon the SIs landing right
# where they do now. # where they do now.
self.failUnlessIn("The remainder of this cycle is expected to " self.failUnlessIn("The remainder of this cycle is expected to "
"recover: 4 shares, 4 buckets", s) "recover: 4 shares, 4 sharesets", s)
self.failUnlessIn("The whole cycle is expected to examine " self.failUnlessIn("The whole cycle is expected to examine "
"5 shares in 5 buckets and to recover: " "5 shares in 5 sharesets and to recover: "
"5 shares, 5 buckets", s) "5 shares, 5 sharesets", s)
return ac.set_hook('after_cycle') return ac.set_hook('after_cycle')
d.addCallback(_check_html_in_cycle) d.addCallback(_check_html_in_cycle)
@ -3330,7 +3330,7 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix
date = time.strftime("%Y-%m-%d (%d-%b-%Y) UTC", time.gmtime(then)) date = time.strftime("%Y-%m-%d (%d-%b-%Y) UTC", time.gmtime(then))
substr = "Leases created or last renewed before %s will be considered expired." % date substr = "Leases created or last renewed before %s will be considered expired." % date
self.failUnlessIn(substr, s) self.failUnlessIn(substr, s)
self.failUnlessIn(" recovered: 2 shares, 2 buckets (1 mutable / 1 immutable), ", s) self.failUnlessIn(" recovered: 2 shares, 2 sharesets (1 mutable / 1 immutable), ", s)
d.addCallback(_check_html_after_cycle) d.addCallback(_check_html_after_cycle)
d.addBoth(self._wait_for_yield, ac) d.addBoth(self._wait_for_yield, ac)
return d return d

View File

@ -144,7 +144,7 @@ class StorageStatus(rend.Page):
if d is None: if d is None:
return "?" return "?"
return "%d" % d return "%d" % d
return "%s shares, %s buckets (%s mutable / %s immutable), %s (%s / %s)" % \ return "%s shares, %s sharesets (%s mutable / %s immutable), %s (%s / %s)" % \
(maybe(sr["%s-shares" % a]), (maybe(sr["%s-shares" % a]),
maybe(sr["%s-buckets" % a]), maybe(sr["%s-buckets" % a]),
maybe(sr["%s-buckets-mutable" % a]), maybe(sr["%s-buckets-mutable" % a]),
@ -180,7 +180,7 @@ class StorageStatus(rend.Page):
if d is None: if d is None:
return "?" return "?"
return "%d" % d return "%d" % d
add("So far, this cycle has examined %d shares in %d buckets" add("So far, this cycle has examined %d shares in %d sharesets"
% (sr["examined-shares"], sr["examined-buckets"]), % (sr["examined-shares"], sr["examined-buckets"]),
" (%d mutable / %d immutable)" " (%d mutable / %d immutable)"
% (sr["examined-buckets-mutable"], sr["examined-buckets-immutable"]), % (sr["examined-buckets-mutable"], sr["examined-buckets-immutable"]),
@ -191,7 +191,7 @@ class StorageStatus(rend.Page):
if so_far["expiration-enabled"]: if so_far["expiration-enabled"]:
add("The remainder of this cycle is expected to recover: ", add("The remainder of this cycle is expected to recover: ",
self.format_recovered(esr, "actual")) self.format_recovered(esr, "actual"))
add("The whole cycle is expected to examine %s shares in %s buckets" add("The whole cycle is expected to examine %s shares in %s sharesets"
% (maybe(ecr["examined-shares"]), maybe(ecr["examined-buckets"]))) % (maybe(ecr["examined-shares"]), maybe(ecr["examined-buckets"])))
add("and to recover: ", self.format_recovered(ecr, "actual")) add("and to recover: ", self.format_recovered(ecr, "actual"))
else: else:

View File

@ -59,7 +59,7 @@
<li>Server Nodeid: <span class="nodeid mine data-chars" n:render="string" n:data="nodeid" /></li> <li>Server Nodeid: <span class="nodeid mine data-chars" n:render="string" n:data="nodeid" /></li>
<li n:data="stats">Accepting new shares: <li n:data="stats">Accepting new shares:
<span n:render="bool" n:data="accepting_immutable_shares" /></li> <span n:render="bool" n:data="accepting_immutable_shares" /></li>
<li>Total buckets: <li>Total sharesets:
<span n:render="string" n:data="last_complete_bucket_count" /> <span n:render="string" n:data="last_complete_bucket_count" />
(the number of files and directories for which this server is holding (the number of files and directories for which this server is holding
a share) a share)