live: revisit logging for partition setup, image create and restore

master
OpenGnSys Support Team 2024-04-23 10:30:36 +02:00
parent 7d26f0f69b
commit 84c2944bf3
1 changed files with 5 additions and 7 deletions

View File

@ -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