Skip to content

Commit

Permalink
Fixed signed audit logging failure handling
Browse files Browse the repository at this point in the history
The code that handles signed audit logging failures has been
modified to call CMSEngine.disableSubsystem() to undeploy the
web application. Once undeployed, the web application will no
longer accept client requests, then Tomcat will execute
CMSStartServlet.destroy() which will eventually shutdown the
subsystem.

https://pagure.io/dogtagpki/issue/3070
  • Loading branch information
edewata committed Oct 25, 2018
1 parent 7c3711c commit 5e7d7b9
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions base/server/cms/src/com/netscape/cms/logging/LogFile.java
Expand Up @@ -79,6 +79,7 @@
import com.netscape.certsrv.logging.LogSource;
import com.netscape.certsrv.logging.SignedAuditEvent;
import com.netscape.certsrv.logging.SystemEvent;
import com.netscape.cmscore.apps.CMSEngine;
import com.netscape.cmsutil.util.Utils;

import netscape.ldap.client.JDAPAVA;
Expand Down Expand Up @@ -422,20 +423,10 @@ private static synchronized void shutdownCMS() {
// synchronized. We just want to avoid an infinite loop.
mInSignedAuditLogFailureMode = true;

// Block all new incoming requests
if (CMS.areRequestsDisabled() == false) {
// XXX is this a race condition?
CMS.disableRequests();
}

// Terminate all requests in process
CMS.terminateRequests();

// Call graceful shutdown of the CMS server
// Call force shutdown to get added functionality of
// making sure to kill the web server.
CMS.debug("LogFile: Disabling subsystem due to signed logging failure");

CMS.forceShutdown();
CMSEngine engine = (CMSEngine) CMS.getCMSEngine();
engine.disableSubsystem();
}
}

Expand Down

0 comments on commit 5e7d7b9

Please sign in to comment.