mirror of https://git.48k.eu/ogcp
views: improve cache check messages in image/restore
Improve the wording of the error message reporting the clients without enough cache to hold the image to be restored.master
parent
521b7c81ac
commit
2ae6f37e60
|
@ -767,10 +767,10 @@ def image_fits_in_cache(server, ips, image_size):
|
|||
free_cache = cache_size - used_cache
|
||||
if free_cache < image_size:
|
||||
missing_cache = image_size - free_cache
|
||||
err_report += f'{ip}: needs {(missing_cache / (1024 ** 3)):.3f} free GiB<br>'
|
||||
err_report += f'{ip} requires {(missing_cache / (1024 ** 3)):.3f} free GiB<br>'
|
||||
|
||||
if err_report:
|
||||
flash(f'Client cache error:<br>{err_report}', category='error')
|
||||
flash(f'No space left on cache:<br>{err_report}', category='error')
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue