]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Remove the 'original-*' and 'configured-*' lease crawler output that won't be support...
authorDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Sun, 18 Nov 2012 05:00:13 +0000 (05:00 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 10 Jul 2015 03:06:12 +0000 (04:06 +0100)
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/test/test_storage.py
src/allmydata/web/storage.py

index f45b21cb83c3d63bbb5f72a2b1ccd6fa9c76ff49..28a12e48122f48eebcd534c7c5ab658bdebf5c70 100644 (file)
@@ -3115,8 +3115,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
             self.failUnlessEqual(sr1["examined-buckets"], 1)
             self.failUnlessEqual(sr1["examined-shares"], 1)
             self.failUnlessEqual(sr1["actual-shares"], 0)
-            self.failUnlessEqual(sr1["configured-diskbytes"], 0)
-            self.failUnlessEqual(sr1["original-sharebytes"], 0)
             left = initial_state["estimated-remaining-cycle"]
             sr2 = left["space-recovered"]
             self.failUnless(sr2["examined-buckets"] > 0, sr2["examined-buckets"])
@@ -3133,20 +3131,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
             self.failUnlessIn("and has recovered: "
                               "0 shares, 0 buckets (0 mutable / 0 immutable), "
                               "0 B (0 B / 0 B)", s)
-            self.failUnlessIn("If expiration were enabled, "
-                              "we would have recovered: "
-                              "0 shares, 0 buckets (0 mutable / 0 immutable),"
-                              " 0 B (0 B / 0 B) by now", s)
-            self.failUnlessIn("and the remainder of this cycle "
-                              "would probably recover: "
-                              "0 shares, 0 buckets (0 mutable / 0 immutable),"
-                              " 0 B (0 B / 0 B)", s)
-            self.failUnlessIn("and the whole cycle would probably recover: "
-                              "0 shares, 0 buckets (0 mutable / 0 immutable),"
-                              " 0 B (0 B / 0 B)", s)
-            self.failUnlessIn("if we were strictly using each lease's default "
-                              "31-day lease lifetime", s)
-            self.failUnlessIn("this cycle would be expected to recover: ", s)
         d.addCallback(_check_html_in_cycle)
 
         # wait for the crawler to finish the first cycle. Nothing should have
@@ -3179,17 +3163,8 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
             self.failUnlessEqual(rec["examined-buckets"], 4)
             self.failUnlessEqual(rec["examined-shares"], 4)
             self.failUnlessEqual(rec["actual-buckets"], 0)
-            self.failUnlessEqual(rec["original-buckets"], 0)
-            self.failUnlessEqual(rec["configured-buckets"], 0)
             self.failUnlessEqual(rec["actual-shares"], 0)
-            self.failUnlessEqual(rec["original-shares"], 0)
-            self.failUnlessEqual(rec["configured-shares"], 0)
             self.failUnlessEqual(rec["actual-diskbytes"], 0)
-            self.failUnlessEqual(rec["original-diskbytes"], 0)
-            self.failUnlessEqual(rec["configured-diskbytes"], 0)
-            self.failUnlessEqual(rec["actual-sharebytes"], 0)
-            self.failUnlessEqual(rec["original-sharebytes"], 0)
-            self.failUnlessEqual(rec["configured-sharebytes"], 0)
 
             def _get_sharefile(si):
                 return list(server._iter_share_files(si))[0]
@@ -3275,7 +3250,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
 
         sf0 = _get_sharefile(immutable_si_0)
         self.backdate_lease(sf0, self.renew_secrets[0], now - 1000)
-        sf0_size = os.stat(sf0.home).st_size
 
         # immutable_si_1 gets an extra lease
         sf1 = _get_sharefile(immutable_si_1)
@@ -3283,7 +3257,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
 
         sf2 = _get_sharefile(mutable_si_2)
         self.backdate_lease(sf2, self.renew_secrets[3], now - 1000)
-        sf2_size = os.stat(sf2.home).st_size
 
         # mutable_si_3 gets an extra lease
         sf3 = _get_sharefile(mutable_si_3)
@@ -3341,23 +3314,11 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
             self.failUnlessEqual(rec["examined-buckets"], 4)
             self.failUnlessEqual(rec["examined-shares"], 4)
             self.failUnlessEqual(rec["actual-buckets"], 2)
-            self.failUnlessEqual(rec["original-buckets"], 2)
-            self.failUnlessEqual(rec["configured-buckets"], 2)
             self.failUnlessEqual(rec["actual-shares"], 2)
-            self.failUnlessEqual(rec["original-shares"], 2)
-            self.failUnlessEqual(rec["configured-shares"], 2)
-            size = sf0_size + sf2_size
-            self.failUnlessEqual(rec["actual-sharebytes"], size)
-            self.failUnlessEqual(rec["original-sharebytes"], size)
-            self.failUnlessEqual(rec["configured-sharebytes"], size)
             # different platforms have different notions of "blocks used by
             # this file", so merely assert that it's a number
             self.failUnless(rec["actual-diskbytes"] >= 0,
                             rec["actual-diskbytes"])
-            self.failUnless(rec["original-diskbytes"] >= 0,
-                            rec["original-diskbytes"])
-            self.failUnless(rec["configured-diskbytes"] >= 0,
-                            rec["configured-diskbytes"])
         d.addCallback(_after_first_cycle)
         d.addCallback(lambda ign: self.render1(webstatus))
         def _check_html(html):
@@ -3419,7 +3380,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
 
         sf0 = _get_sharefile(immutable_si_0)
         self.backdate_lease(sf0, self.renew_secrets[0], new_expiration_time)
-        sf0_size = os.stat(sf0.home).st_size
 
         # immutable_si_1 gets an extra lease
         sf1 = _get_sharefile(immutable_si_1)
@@ -3427,7 +3387,6 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
 
         sf2 = _get_sharefile(mutable_si_2)
         self.backdate_lease(sf2, self.renew_secrets[3], new_expiration_time)
-        sf2_size = os.stat(sf2.home).st_size
 
         # mutable_si_3 gets an extra lease
         sf3 = _get_sharefile(mutable_si_3)
@@ -3487,23 +3446,11 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
             self.failUnlessEqual(rec["examined-buckets"], 4)
             self.failUnlessEqual(rec["examined-shares"], 4)
             self.failUnlessEqual(rec["actual-buckets"], 2)
-            self.failUnlessEqual(rec["original-buckets"], 0)
-            self.failUnlessEqual(rec["configured-buckets"], 2)
             self.failUnlessEqual(rec["actual-shares"], 2)
-            self.failUnlessEqual(rec["original-shares"], 0)
-            self.failUnlessEqual(rec["configured-shares"], 2)
-            size = sf0_size + sf2_size
-            self.failUnlessEqual(rec["actual-sharebytes"], size)
-            self.failUnlessEqual(rec["original-sharebytes"], 0)
-            self.failUnlessEqual(rec["configured-sharebytes"], size)
             # different platforms have different notions of "blocks used by
             # this file", so merely assert that it's a number
             self.failUnless(rec["actual-diskbytes"] >= 0,
                             rec["actual-diskbytes"])
-            self.failUnless(rec["original-diskbytes"] >= 0,
-                            rec["original-diskbytes"])
-            self.failUnless(rec["configured-diskbytes"] >= 0,
-                            rec["configured-diskbytes"])
         d.addCallback(_after_first_cycle)
         d.addCallback(lambda ign: self.render1(webstatus))
         def _check_html(html):
@@ -3611,33 +3558,13 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
 
             left = s["estimated-remaining-cycle"]["space-recovered"]
             self.failUnlessEqual(left["actual-buckets"], None)
-            self.failUnlessEqual(left["original-buckets"], None)
-            self.failUnlessEqual(left["configured-buckets"], None)
             self.failUnlessEqual(left["actual-shares"], None)
-            self.failUnlessEqual(left["original-shares"], None)
-            self.failUnlessEqual(left["configured-shares"], None)
             self.failUnlessEqual(left["actual-diskbytes"], None)
-            self.failUnlessEqual(left["original-diskbytes"], None)
-            self.failUnlessEqual(left["configured-diskbytes"], None)
-            self.failUnlessEqual(left["actual-sharebytes"], None)
-            self.failUnlessEqual(left["original-sharebytes"], None)
-            self.failUnlessEqual(left["configured-sharebytes"], None)
 
             full = s["estimated-remaining-cycle"]["space-recovered"]
             self.failUnlessEqual(full["actual-buckets"], None)
-            self.failUnlessEqual(full["original-buckets"], None)
-            self.failUnlessEqual(full["configured-buckets"], None)
             self.failUnlessEqual(full["actual-shares"], None)
-            self.failUnlessEqual(full["original-shares"], None)
-            self.failUnlessEqual(full["configured-shares"], None)
             self.failUnlessEqual(full["actual-diskbytes"], None)
-            self.failUnlessEqual(full["original-diskbytes"], None)
-            self.failUnlessEqual(full["configured-diskbytes"], None)
-            self.failUnlessEqual(full["actual-sharebytes"], None)
-            self.failUnlessEqual(full["original-sharebytes"], None)
-            self.failUnlessEqual(full["configured-sharebytes"], None)
-
-        d.addCallback(_check)
         return d
 
     def BROKEN_test_no_st_blocks(self):
index 6bb2785010ef17edf44676a82277c2fd2777627c..cb3b280413daefa81d4330203d67c4b3ce897c5c 100644 (file)
@@ -208,19 +208,8 @@ class StorageStatus(rend.Page):
             add("The whole cycle is expected to examine %s shares in %s buckets"
                 % (maybe(ecr["examined-shares"]), maybe(ecr["examined-buckets"])))
             add("and to recover: ", self.format_recovered(ecr, "actual"))
-
         else:
-            add("If expiration were enabled, we would have recovered: ",
-                self.format_recovered(sr, "configured"), " by now")
-            add("and the remainder of this cycle would probably recover: ",
-                self.format_recovered(esr, "configured"))
-            add("and the whole cycle would probably recover: ",
-                self.format_recovered(ecr, "configured"))
-
-        add("if we were strictly using each lease's default 31-day lease lifetime "
-            "(instead of our configured behavior), "
-            "this cycle would be expected to recover: ",
-            self.format_recovered(ecr, "original"))
+            add("Expiration was not enabled.")
 
         if so_far["corrupt-shares"]:
             add("Corrupt shares:",
@@ -252,9 +241,7 @@ class StorageStatus(rend.Page):
         add("and saw a total of ", saw)
 
         if not last["expiration-enabled"]:
-            rec = self.format_recovered(last["space-recovered"], "configured")
-            add("but expiration was not enabled. If it had been, "
-                "it would have recovered: ", rec)
+            add("but expiration was not enabled.")
 
         if last["corrupt-shares"]:
             add("Corrupt shares:",