-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
-
False
-
False
-
-
3
-
Testable
We have RestorableFile in files.py. We are using the RestorableFile for backing up the /etc/os-release file, which we restore during registration process of the system. The file is then removed after the registration.
The problem is, that we are now removing the backup when doing the restore even outside the rollback. This doesn't correspond to the comments in the code.
It wasn't a problem before, when we were checking if the backed up file exists. But I've changed that to have this backup error captured, and the error can be provided to the user and not just skip this without capturing it in the final BackupController message about errors during rollback.
But now rollback fails with message the os-release file couldn't been restored due missing the file in backup folder (previously it was just skipped as missing the backup). It's not a big deal as the file is generated again during rollback of the centos-release pkg.
Possible solutions:
- One possible solution is to set the enabled value always when restoring - the file is restored, backup removed and enabled value is set to false. No problem at all,
this solution is already used in https://github.com/oamg/convert2rhel/pull/1153 The file is then restored with the centos-release pkg - Another solution could be: remove the backup only when we are doing rollback, not when restoring for conversion purposes. This would correspond with the comments we have in the code now. This is the used solution in https://github.com/oamg/convert2rhel/pull/1153/files#diff-4699c38cf695fc868cd2ee536df20225305c6897c0c5cf1d7c10dbf9150f7205R134
- Something else
- links to
-
RHEA-2024:132672 convert2rhel bug fix and enhancement update
-
RHEA-2024:132673 convert2rhel bug fix and enhancement update