#682 cainstance handles pkisilent incorrectly
Closed: Fixed None Opened 13 years ago by jdennis.

After running pkisilent to configure the CA (which succeeds) it calls
"/sbin/service pki-cad status" which correctly emits the message
"Although 'pki-ca' has been CONFIGURED, it must still be RESTARTED!" and
correctly returns an exit status of 4 (because it isn't configured yet).
The non-zero exit status causes an exception to be raised and which then
executes:

logging.critical("failed to restart ca instance %s" % e)
raise RuntimeError('Configuration of CA failed')

Note, the logging.critical message is wrong.

It calls "/sbin/service pki-cad status" because of this comment:

pkisilent doesn't return 1 on error so look at the output of

/sbin/service pki-cad status. It will tell us if the instance

still needs to be configured.

But pkisilent does in fact return an exit status of 0 for success and
255 for failure.

It should instead call "/sbin/service pki-cad restart" after pkisilent,
a call to "/sbin/service pki-cad status" should then return zero.


fixes ca install, patch submitted as: [PATCH 21/21] fixes CA install problem in trac ticket 682
cainstall.patch

What versions of Fedora and dogtag this this apply to?

This is on F14 with the new dogtag 9.0 packages

Metadata Update from @jdennis:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 2.0 - 2011/01 (cleanup)

7 years ago

Login to comment on this ticket.

Metadata