URL: https://github.com/freeipa/freeipa/pull/735 Author: pvoborni Title: #735: automount install: do not wait for sssd restart on uninstallation Action: opened
PR body: """ Change in 2d4d1a9dc0ef2bbe86751768d6e6b009a52c0dc9 no longer initializes api in `ipa-client-automount --uninstallation` Which caused error in wait_for_sssd which gets realm from initialized API. In my opinion, there is no reason to check working sssd after uninstallation by running id command. If anything depends on running sssd then it should do the check. Also fix call of xxx_service_class_factory which requires api as param. https://pagure.io/freeipa/issue/6861 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/735/head:pr735 git checkout pr735
From 76651c3b6bf696e1db752f6db424a87bfa1ed9b5 Mon Sep 17 00:00:00 2001 From: Petr Vobornik <pvobo...@redhat.com> Date: Tue, 25 Apr 2017 18:19:21 +0200 Subject: [PATCH] automount install: do not wait for sssd restart on uninstallation Change in 2d4d1a9dc0ef2bbe86751768d6e6b009a52c0dc9 no longer initializes api in `ipa-client-automount --uninstallation` Which caused error in wait_for_sssd which gets realm from initialized API. In my opinion, there is no reason to check working sssd after uninstallation by running id command. If anything depends on running sssd then it should do the check. Also fix call of xxx_service_class_factory which requires api as param. https://pagure.io/freeipa/issue/6861 --- client/ipa-client-automount | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/ipa-client-automount b/client/ipa-client-automount index 18914bd..622abcf 100755 --- a/client/ipa-client-automount +++ b/client/ipa-client-automount @@ -193,7 +193,7 @@ def configure_autofs_sssd(fstore, statestore, autodiscover, options): sssdconfig.write(paths.SSSD_CONF) statestore.backup_state('autofs', 'sssd', True) - sssd = services.service('sssd') + sssd = services.service('sssd', api) sssd.restart() print("Restarting sssd, waiting for it to become available.") wait_for_sssd() @@ -281,9 +281,8 @@ def uninstall(fstore, statestore): break sssdconfig.save_domain(domain) sssdconfig.write(paths.SSSD_CONF) - sssd = services.service('sssd') + sssd = services.service('sssd', api) sssd.restart() - wait_for_sssd() except Exception as e: print('Unable to restore SSSD configuration: %s' % str(e)) root_logger.debug('Unable to restore SSSD configuration: %s' % str(e))
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code