summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 75114b7..b6a0cd7 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -967,12 +967,17 @@ def image_fits_in_cache(server, clients_info, image):
continue
free_cache = client_info['free_cache']
+ used_cache = client_info['used_cache']
+ if used_cache == 0 and free_cache == 0:
+ err_report += f'{ip} has no cache partition<br>'
+ continue
+
if free_cache < image_size:
missing_cache = image_size - free_cache
err_report += f'{ip} requires {(missing_cache / (1024 ** 3)):.3f} more free GiB<br>'
if err_report:
- flash(f'No space left on cache:<br>{err_report}', category='error')
+ flash(f'{err_report}', category='error')
return False
return True