diff --git a/ipaplatform/redhat/authconfig.py b/ipaplatform/redhat/authconfig.py index 89f452d66..b51baf585 100644 --- a/ipaplatform/redhat/authconfig.py +++ b/ipaplatform/redhat/authconfig.py @@ -129,7 +129,14 @@ class RedHatAuthSelect(RedHatAuthToolBase): def unconfigure( self, fstore, statestore, was_sssd_installed, was_sssd_configured ): - if not statestore.has_state('authselect') and was_sssd_installed: + # If the installation failed before doing the authselect part + # nothing to do here + complete = statestore.get_state('installation', 'complete') + if complete is not None and not complete and \ + not statestore.has_state('authselect'): + return + + if not statestore.has_state('authselect'): logger.warning( "WARNING: Unable to revert to the pre-installation state " "('authconfig' tool has been deprecated in favor of " diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py index 63c11b9e3..d056a4829 100644 --- a/ipaplatform/redhat/tasks.py +++ b/ipaplatform/redhat/tasks.py @@ -765,6 +765,12 @@ class RedHatTaskNamespace(BaseTaskNamespace): authselect_cmd = [paths.AUTHSELECT, "disable-feature", "with-custom-automount"] - ipautil.run(authselect_cmd) + try: + ipautil.run(authselect_cmd) + except ipautil.CalledProcessError: + logger.info("Unable to disable with-custom-automount feature") + logger.info("It may happen if the configuration was done " + "using authconfig instead of authselect") + tasks = RedHatTaskNamespace()