URL: https://github.com/freeipa/freeipa/pull/3690 Author: rcritten Title: #3690: [Backport][ipa-4-7] Re-order tasks.restore_pkcs11_modules() to run earlier Action: opened
PR body: """ This PR was opened automatically because PR #3675 was pushed to master and backport to ipa-4-7 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/3690/head:pr3690 git checkout pr3690
From 4d717b4a2ef404f76f875a94d89f0d54f53134da 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 d41ed74314..b4227efb7f 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -1146,6 +1146,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) @@ -1170,8 +1171,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]
