Bug 1454471

Summary: Enabling all subsystems on startup
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: pki-coreAssignee: Endi Sukma Dewata <edewata>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact: Petr Bokoc <pbokoc>
Priority: unspecified    
Version: 7.4CC: alee, arubin, batkisso, cfu, cheimes, edewata, ftweedal, jmagne, mharmsen, nkinder, pbokoc, ssidhaye
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-10.4.1-7.el7 Doc Type: Bug Fix
Doc Text:
PKI subsystems which failed self tests are now automatically re-enabled on startup Previously, if a PKI subsystem failed to start due to self test failure, it was automatically disabled to prevent it from running in an inconsistent state. The administrator was expected to re-enable the subsystem manually using "pki-server subsystem-enable" after fixing the problem. However, this was not clearly communicated, potentially causing confusion among administrators who were not always aware of this requirement. To alleviate this problem, all PKI subsystems are now re-enabled automatically on startup by default. If a self-test fails, the subsystem is disabled as before, but it will no longer require manual re-enabling. This behavior is controlled by a new boolean option in the `/etc/pki/pki.conf` file, `PKI_SERVER_AUTO_ENABLE_SUBSYSTEMS`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 22:52:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Harmsen 2017-05-22 20:26:58 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/dogtagpki/issue/2699

Currently if selftest fails during startup the subsystem will undeploy (i.e. disable) itself to prevent partially running service which could confuse other services that depend on it.

The admin is expected to investigate and fix the failure, then reenable the subsystem manually with this command (see http://pki.fedoraproject.org/wiki/SelfTest):

    $ pki-server subsystem-enable ca

The selftest error and the instruction to reenable the subsystem is written into the log, but often times the admin does not notice that immediately, leading to confusions.

One possible solution is to automatically reenable all subsystems on Tomcat restart. If the selftest is still failing the subsystem will shut itself down as before, but at least the admin is no longer required to reenable the subsystem manually.

Comment 2 Endi Sukma Dewata 2017-05-23 19:33:37 UTC
Fixed in master:
* https://github.com/dogtagpki/pki/commit/8016ed7972d9211e7f0db14e45bc9658a7b292ef

Comment 3 Endi Sukma Dewata 2017-05-25 14:42:52 UTC
FYI, the auto-enable behavior can be configured using the PKI_SERVER_AUTO_ENABLE_SUBSYSTEMS property in pki.conf. See http://pki.fedoraproject.org/wiki/SelfTest

Comment 4 Endi Sukma Dewata 2017-05-30 15:02:20 UTC
*** Bug 1432229 has been marked as a duplicate of this bug. ***

Comment 6 Sumedh Sidhaye 2017-06-24 10:16:48 UTC
[root@csqa4-guest01 hsm_setup]# rpm -qi pki-server
Name        : pki-server
Version     : 10.4.1
Release     : 10.el7
Architecture: noarch
Install Date: Friday 23 June 2017 12:09:25 AM EDT
Group       : System Environment/Base
Size        : 4634270
License     : GPLv2
Signature   : (none)
Source RPM  : pki-core-10.4.1-10.el7.src.rpm
Build Date  : Tuesday 20 June 2017 01:23:22 AM EDT
Build Host  : ppc-046.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - PKI Server Framework

After setting PKI_SERVER_AUTO_ENABLE_SUBSYSTEMS=True in /etc/pki/pki.conf the subsystem is not disabled, when the selftests fail the subsystem is simply shutdown instead of being disabled.

Comment 7 errata-xmlrpc 2017-08-01 22:52:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2110