Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-order tasks.restore_pkcs11_modules() to run earlier #3675

Closed
wants to merge 1 commit into from

Conversation

rcritten
Copy link
Contributor

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 rcritten@redhat.com

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 <rcritten@redhat.com>
@rcritten rcritten added the ipa-4-8 Mark for backport to ipa 4.8 label Sep 17, 2019
@flo-renaud flo-renaud self-assigned this Sep 19, 2019
@flo-renaud
Copy link
Contributor

Hi @rcritten
thanks for the PR, works for me:

  • create a file /etc/pkcs11/modules/softhsm2.module
  • install server
  • the file is overwritten
  • uninstall server
  • the original file is restored.

While testing I discovered that ipa-backup/ipa-restore does not backup the file /etc/pkcs11/modules/softhsm2.module. Issue tracked as 8073, which can be handled in a different fix.

@flo-renaud flo-renaud added ack Pull Request approved, can be merged ipa-4-7 labels Sep 19, 2019
@flo-renaud
Copy link
Contributor

Adding the ipa-4-7 label as the module files were added also in ipa-4-7 branch (commit 74e0908 + backported to ipa-4-7 with ae5831b)

@rcritten rcritten added the pushed Pull Request has already been pushed label Sep 19, 2019
@rcritten
Copy link
Contributor Author

master:

  • ffb4b62 Re-order tasks.restore_pkcs11_modules() to run earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged ipa-4-8 Mark for backport to ipa 4.8 pushed Pull Request has already been pushed
Projects
None yet
2 participants