[Freeipa-devel] [PATCH] 002 Fixed adding host without DNS reverse zone

Petr Vobornik pvoborni at redhat.com
Tue Jul 26 11:27:08 UTC 2011


Fixed adding host without DNS reverse zone

https://fedorahosted.org/freeipa/ticket/1481

Shows status dialog instead of error dialog (error 4304 is treated like
success).

This patch is fixing the problem, but maybe in a wrong way.

Main problem was that error has to be treated like success. This
decision is done in command.execute() method.

There are two ways to do it
1) Interrupt error handling - transform error to success
2) Interrupt success handling - don't let success to be transformed into
error.

Solution is using the second option. But I think first option is better.
But there are obstacles:
- handling is done in private function (for me ipa.js line ~ 290)
- there is an extend point - setting on_error method. Problem is that
this method is executed only if command.retry is false (default is
true). Setting it to false will disable usage of error dialog (which is
private function). So I would lose functionality for normal errors.
Reordering these lines isn't an option because it would affect a lot of
code.
- one way would be to extract code for error dialog and make it a
regular reusable dialog (with command as parameter). This way it can be
used in custom error handler.


Is it ACKable, or is it better to do it as described?

Petr



-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0002-Fixed-adding-host-without-DNS-reverse-zone.patch
Type: text/x-patch
Size: 7119 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110726/8c456a43/attachment.bin>


More information about the Freeipa-devel mailing list