New promises for disk space
Adding two new promises:
-
monitor_partition_space
: is intended to be used on erp5. This promise detects bugs/anomalies by observing the behavior of partitions. For example, if a user suddenly uses a lot of disk space (related to a bug), then the promise returns an error. A threshold is set by default but can be changed from the SR. (the promise uses the folder table from the database) -
check_free_disk_space
: by default, has the same behavior as the current promise. Possibility to add parameters from the SR which are by default set toFalse
:-
display_prediction
: uses ARIMA from the statsmodels library. Allows to predict the behavior of the total disk space (uses the disk table of the database) in 10 days by default. If in the last of the predicted days, the remaining space is smaller than the threshold (by default 5% of the disk size), then the promise returns a warning. -
display_partition
: if the current disk size is smaller than the threshold, then the promise returns an error and the 3 biggest partitions of the computer. (this option uses the folder table from the database
-
Both promises use pandas, numpy and check_free_disk_space
also uses statsmodels (and therefore scipy).
To use these libraries, we need to change slapos.cfg as we can see in this commit lisa.casino/slapos@68831d7a on my personal slapos branch.