#7376 clear sssd cache when uninstalling client
Closed: fixed Opened by rcritten.

Issue

The SSSD cache is not cleared when uninstalling an IPA client. For tidiness we should wipe the cache. This can be done with sssctll which is not available everywhere so it should be tested for. On a command line you'd call something like:

% test -x /usr/bin/sssctl && sssctl cache-remove -o

Note that this tool is in sssd-tools which is not currently a dependency.


Though I found this code is present for cache clearing.
# ipaclient/install/client.py
# Clean up the SSSD cache before SSSD service is stopped or restarted
remove_file(paths.SSSD_MC_GROUP)
remove_file(paths.SSSD_MC_PASSWD)

But we can add following as part of change:
remove_file(paths.SSSD_MC_GROUP)
remove_file(paths.SSSD_MC_PASSWD)
try:
run(["sssctl","cache-remove","-o"])
except Exception as e:
raise ScriptError(
"sssd-tools package not installed".format(e),
rval=CLIENT_INSTALL_ERROR)

PR:https://github.com/freeipa/freeipa/pull/1504

master:

  • ccec8c6c4193a204428b7ba0f93dac6f0eb26020 clear sssd cache when uninstalling client
  • b0d8c6c21198e8b0a9604e9ee01c422a6c550c91 clear sssd cache when uninstalling client

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • 1c1089c44df34c04d5ba4572191a49962e859a92 ipa-client package needs sssd-tool
Metadata