On 08/17/2012 03:04 PM, Tomas Babej wrote:
> Hi,
> The sssd.conf file is no longer left behind in case sssd was not
> configured before the installation.
> https://fedorahosted.org/freeipa/ticket/2740
> Tomas

I found few issues with this approach:

1) (major) We do not want to delete sssd.conf when there were more domain's
that just the IPA one configured (was_sssd_configured variable).

I would consider changing it like that:

if was_sssd_installed and was_sssd_configured:
        # SSSD was installed before our installation, config now is restored,
restart it
elif not was_sssd_configured:
    - remove sssd.conf file (or move it to sssd.conf.deleted as Stephen
suggested if we want to be more defensive)

If we choose the rename operation over delete operation, we should inform a
user about the rename as well.

2) (minor) As I mentioned earlier, as a rule of thumb it is better to catch
more specific exceptions that just bare "except" clause, PEP8 should contain
more info to this cause. In this case, I would catch just for OSError exception.


Freeipa-devel mailing list

Reply via email to