ce0592b client uninstall: handle uninstall with authconfig

2 files Authored by frenaud 2 years ago, Committed by rcritten 2 years ago,
    client uninstall: handle uninstall with authconfig
    
    If the client was installed with authconfig, with
    automount configured to use ldap (--no-sssd), and later
    updated to a version using authselect, the uninstaller
    tries to disable the authselect feature with-custom-automount
    but fails because there is no authselect profile in use.
    
    (Upgrade of a client does not transform authconfig settings
    into authselect settings because we don't have any client
    upgrader, as opposed to the ipa-server-upgrade for the
    servers).
    
    To avoid uninstallation failure, ignore the error and log a
    warning.
    
    The second part of the commit leverages the "complete" state
    stored in the statestore, in order to fix issues when
    a client installation fails and the installation is reverted
    by the ipa-client-install tool itself.
    The fix checks if the statestore shows an incomplete
    installation. If the install was incomplete and failed before
    any attempt to configure authselect, then unconfigure doesn't
    need to do anything. In the other cases, unconfigure needs
    to revert to the pre-ipa state.
    
    Fixes: https://pagure.io/freeipa/issue/9147
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>
    
        
file modified
+7 -1