[Freeipa-devel] [PATCH] Make enabling the autofs service more robust

Jan Cholasta jcholast at redhat.com
Wed Nov 7 10:51:15 UTC 2012


On 7.11.2012 09:45, Martin Kosek wrote:
> On 11/07/2012 09:14 AM, Jakub Hrozek wrote:
>> On Tue, Nov 06, 2012 at 08:57:06AM +0100, Jan Cholasta wrote:
>>> On 29.10.2012 17:21, Jakub Hrozek wrote:
>>>> An improvement based on Honza's suggestion.
>>>>
>>>
>>> You might want to remove the try block around
>>> "sssdconfig.activate_service('autofs')". If it throws NoServiceError
>>> at this point, there is something really broken in SSSDConfig, in
>>> which case it is better to display a traceback rather than a nice
>>> error message IMO.
>>>
>>
>> I guess this really depends on what the consistent behaviour of the
>> installer tools is.
>>
>> My take would be to print an error message to the terminal and a
>> traceback to a logfile.
>
> +1 for this approach. I do not think that tracebacks is a very user-friendly
> output.

It is not supposed to be user-friendly, as it is not supposed to happen, 
ever. If it does happen, it is a bug in SSSDConfig. AFAIK we don't do 
any other third-party API sanity checks with nice error messages 
anywhere in IPA, hence my suggestion.

>
> Martin
>
>>
>> I can change the patch, technically that's not a problem, just let me
>> know if printing a traceback is the preferred way.
>>

I'm fine with whatever approach, but if you go with the error message, 
please indicate in it that the world has collapsed and SSSDConfig is broken.

Honza

-- 
Jan Cholasta




More information about the Freeipa-devel mailing list