URL: https://github.com/freeipa/freeipa/pull/3675 Author: rcritten Title: #3675: Re-order tasks.restore_pkcs11_modules() to run earlier Action: opened
PR body: """ It was executed after restore_all_files() so PKCS11_MODULES was already restored so that part was a no-op, but the redhat restore_pkcs11_modules() also calls unlink() on each restored file so basically the file would be restored, unlinked, then since it was already restored, skipped. By moving the call to restore_pkcs11_modules() earlier it can do the expected restoration properly. https://pagure.io/freeipa/issue/8034 Signed-off-by: Rob Crittenden <[email protected]> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/3675/head:pr3675 git checkout pr3675
From 3e4aa9182b5d913b36f2b7090898e3bce5e9043d Mon Sep 17 00:00:00 2001 From: Rob Crittenden <[email protected]> Date: Tue, 17 Sep 2019 15:12:28 -0400 Subject: [PATCH] Re-order tasks.restore_pkcs11_modules() to run earlier It was executed after restore_all_files() so PKCS11_MODULES was already restored so that part was a no-op, but the redhat restore_pkcs11_modules() also calls unlink() on each restored file so basically the file would be restored, unlinked, then since it was already restored, skipped. By moving the call to restore_pkcs11_modules() earlier it can do the expected restoration properly. https://pagure.io/freeipa/issue/8034 Signed-off-by: Rob Crittenden <[email protected]> --- ipaserver/install/server/install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index 6a81d57804..7cdf2a510f 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -1145,6 +1145,7 @@ def uninstall(installer): custodiainstance.CustodiaInstance(realm='REALM.INVALID').uninstall() otpdinstance.OtpdInstance().uninstall() tasks.restore_hostname(fstore, sstore) + tasks.restore_pkcs11_modules(fstore) fstore.restore_all_files() try: os.remove(paths.ROOT_IPA_CACHE) @@ -1169,8 +1170,6 @@ def uninstall(installer): # remove upgrade state file sysupgrade.remove_upgrade_file() - tasks.restore_pkcs11_modules(fstore) - if fstore.has_files(): logger.error('Some files have not been restored, see ' '%s/sysrestore.index', SYSRESTORE_DIR_PATH)
_______________________________________________ FreeIPA-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected]
