summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cottam <chris.cottam@bytemark.co.uk>2018-04-03 17:33:54 +0100
committerChris Cottam <chris.cottam@bytemark.co.uk>2018-04-03 17:33:54 +0100
commitc87ae5fce885d2424b22ea49f687c10105d195ed (patch)
tree60e2e78872ca99cafd78c59c78c8a1618283a122
parent9603062b66da3af29c1ec6d764b7101e69c5dd2d (diff)
minimal changes to remove gradient based decision making
-rwxr-xr-xbin/byteback-prune11
1 files changed, 1 insertions, 10 deletions
diff --git a/bin/byteback-prune b/bin/byteback-prune
index da0b72c..ba64df1 100755
--- a/bin/byteback-prune
+++ b/bin/byteback-prune
@@ -75,8 +75,6 @@ rescue => anything_else
raise
end
-gradient_30m = @df_history.gradient(1800)
-
# Check whether we should still be pruning
#
@free = @df_history.list.last.percent_free
@@ -116,14 +114,7 @@ if @do_list
end
end
-# Don't do anything if we've not got two hours of readings
-#
unless @do_prune_force
- if @df_history.list.last.time - @df_history.list.first.time < 1800
- warn('Not enough disc space history to make a decision')
- exit 0
- end
-
#
# Do not prune unless at least one snapshot is a week old
#
@@ -139,7 +130,7 @@ exit 0 unless
(@do_prune && File.exist?(PRUNING_FLAG)) ||
@do_prune_force
-exit 0 unless @do_prune_force || gradient_30m == 0
+exit 0 unless @do_prune_force
if snapshots.empty?
error('No snapshots to delete, is there enough disc space?')