diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-04-23 10:30:36 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-04-23 10:55:37 +0200 |
commit | 84c2944bf3ca9be9874ddc774f8a73b619b080cd (patch) | |
tree | 6eba7b22e999f34fddda816d49a3be732a123b4f | |
parent | 7d26f0f69b01016f1a8c563ac734253e2f9c6d5b (diff) |
live: revisit logging for partition setup, image create and restore
-rw-r--r-- | src/live/ogOperations.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 41cf4b0..68aebac 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -151,7 +151,7 @@ class OgLiveOperations: if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass) != 0: self._restartBrowser(self._url) raise OgError(f'Cannot change repository to {repo}') - logging.debug(f'restore_image_unicast: name => {name}') + if cache: image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img' if (not os.path.exists(image_path) or @@ -362,7 +362,7 @@ class OgLiveOperations: else: mkfs(fs, int(disk), partition) - logging.info('Setup command OK') + logging.info('Partition setup command OK') result = self.refresh(ogRest) self._restartBrowser(self._url) @@ -382,11 +382,7 @@ class OgLiveOperations: self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) - logging.debug('Image restore params:') - logging.debug(f'\tname: {name}') - logging.debug(f'\trepo: {repo}') - logging.debug(f'\tprofile: {profile}') - logging.debug(f'\tctype: {ctype}') + logging.info(f'Request to restore image {name}.img via {ctype} from {repo}') if shutil.which('restoreImageCustom'): restoreImageCustom(repo, name, disk, partition, ctype) @@ -418,6 +414,8 @@ class OgLiveOperations: self._restartBrowser(self._url) raise OgError(f'Cannot change image repository to {repo}') + logging.info(f'Request to create image {name}.img at repository {repo}') + if ogRest.terminated: return |