cainstance.is_crlgen_enabled: handle missing ipa-pki-proxy.conf

A failed ipa-ca-install left my installation in an inconsistent
state.  Then, 'ipa-server-install --uninstall' also failed when
is_crlgen_enabled() tried to read ipa-pki-proxy.conf, which was
missing.

Update is_crlgen_enabled() to handle missing ipa-pki-proxy.conf, by
raising InconsistentCRLGenConfigException instead of RuntimeError.
As a result, missing ipa-pki-proxy.conf is handled gracefully
because the calling code already catches
InconsistentCRLGenConfigException.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Fraser Tweedale
2020-07-01 14:21:28 +10:00
committed by Alexander Bokovoy
parent dcdcd1ce88
commit 51d5ec1757

View File

@@ -1402,7 +1402,7 @@ class CAInstance(DogtagInstance):
rewriteRuleDisabled = False
break
except IOError:
raise RuntimeError(
raise InconsistentCRLGenConfigException(
"Unable to read {}".format(paths.HTTPD_IPA_PKI_PROXY_CONF))
# if enableCRLUpdates and rewriteRuleDisabled are different, the config