diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-04 10:15:57 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-08 10:07:45 +0200 |
commit | f942b19eae90e9ca468cbe0a93e5dc9ad02b38d0 (patch) | |
tree | 2342c2426a3e77829c712fad5476e13776419fae /src/live | |
parent | fe960010a06471eefc2ffebc1d8bbd06f09b98c4 (diff) |
src: fix cache mount in new ogLive
Mount cache in image_create() image_restore() and cache_fetch().
Remove init_cache() and ensure /opt/opengnsys/images/ exists
within the cache mountpoint if it does not exists in cache_mount().
Diffstat (limited to 'src/live')
-rw-r--r-- | src/live/ogOperations.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index f02a54b..c372d2a 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -543,7 +543,7 @@ class OgLiveOperations: fs = part["filesystem"].lower() if fs == 'cache': - init_cache() + mount_cache() logging.info('Partition setup command OK') result = self.refresh(ogRest) @@ -562,6 +562,8 @@ class OgLiveOperations: cid = request.getId() partdev = get_partition_device(disk, partition) + mount_cache() + self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) @@ -600,6 +602,8 @@ class OgLiveOperations: backup = request.getBackup() image_path = f'/opt/opengnsys/images/{name}.img' + mount_cache() + self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) @@ -772,6 +776,8 @@ class OgLiveOperations: repo = request.getRepo() ctype = request.getType() + mount_cache() + logging.info(f'Request to cache image {image}.img via {ctype} from {repo}') if ctype == 'UNICAST': |