Re: [Freeipa-devel] [PATCH] 456 replica creation

2010-06-01 Thread Pavel Zuna

On 05/27/2010 11:51 PM, Rob Crittenden wrote:

If a host is already enrolled (either as a client or a former replica)
then ipa-replica-install will fail spectacularly with an error about a
missing keytab. This is because some entries already exist and it
totally confuses things. We need to start this host from scratch, so
catch this condition and give the admin some hints on how to fix it.

rob


It seems to work, but this:

except Exception, e:
pass

is a very bad practice, because it catches everything (even the 
KeyboardInterrupt exception) and makes code very hard to debug if something 
really unexpected happens. I've already replaced a few things like this in the 
installer, but there are probably more left. Catch errors.ExecutionError instead 
or in this case errors.NotFound.


auto-ack when this is fixed.

Pavel

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 456 replica creation

2010-06-01 Thread Rob Crittenden

Pavel Zuna wrote:

On 05/27/2010 11:51 PM, Rob Crittenden wrote:

If a host is already enrolled (either as a client or a former replica)
then ipa-replica-install will fail spectacularly with an error about a
missing keytab. This is because some entries already exist and it
totally confuses things. We need to start this host from scratch, so
catch this condition and give the admin some hints on how to fix it.

rob


It seems to work, but this:

except Exception, e:
pass

is a very bad practice, because it catches everything (even the 
KeyboardInterrupt exception) and makes code very hard to debug if 
something really unexpected happens. I've already replaced a few things 
like this in the installer, but there are probably more left. Catch 
errors.ExecutionError instead or in this case errors.NotFound.


auto-ack when this is fixed.

Pavel


Ok, switched to errors.NotFound.

pushed to master

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 456 replica creation

2010-05-27 Thread Rob Crittenden
If a host is already enrolled (either as a client or a former replica) 
then ipa-replica-install will fail spectacularly with an error about a 
missing keytab. This is because some entries already exist and it 
totally confuses things. We need to start this host from scratch, so 
catch this condition and give the admin some hints on how to fix it.


rob


freeipa-456-replica.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel