mirror of https://git.48k.eu/ogclient
live: validate file existence and checksum for unicast cache
after copying file to cache, validate that file exists in cache and checksum correct.master
parent
210a70fc73
commit
8395982244
|
@ -208,6 +208,11 @@ class OgLiveOperations:
|
|||
if (not os.path.exists(image_path) or
|
||||
not tip_check_csum(repo, name)):
|
||||
self._copy_image_to_cache(name)
|
||||
|
||||
if (not os.path.exists(image_path)):
|
||||
raise OgError(f'could not find {image_path} in cache')
|
||||
if (not tip_check_csum(repo, name)):
|
||||
raise OgError(f'Failed to validate checksum for {name}.img')
|
||||
else:
|
||||
if os.access(f'/opt/opengnsys/images', os.R_OK) == False:
|
||||
raise OgError('Cannot access /opt/opengnsys/images in read mode, check permissions')
|
||||
|
|
Loading…
Reference in New Issue