Added hack to deal with the fact that keep servers are reporting each other's disks.
authorMisha Zatsman <misha@curoverse.com>
Wed, 30 Apr 2014 17:37:25 +0000 (17:37 +0000)
committerMisha Zatsman <misha@curoverse.com>
Wed, 30 Apr 2014 17:37:25 +0000 (17:37 +0000)
services/datamanager/experimental/datamanager.py

index 12b8d6ab7acf6963261b9facab2bc09fb1dd8b98..957a3ce2270ce6533b7b882c500cebc38d166958 100755 (executable)
@@ -610,6 +610,11 @@ def loadAllData():
   total_keep_space = sum(map(itemgetter(0), keep_stats))
   free_keep_space = sum(map(itemgetter(1), keep_stats))
 
+  # TODO(misha): Delete this hack when the keep serverse are fixed!
+  # This hack deals with the fact that keep servers report each other's disks.
+  total_keep_space /= len(keep_stats)
+  free_keep_space /= len(keep_stats)
+
   log.info('Total disk space: %s, Free disk space: %s (%d%%).' %
            (fileSizeFormat(total_keep_space),
             fileSizeFormat(free_keep_space),