RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1639710 - PKI subsystem process is not shutdown when there is no space on the disk to write logs
Summary: PKI subsystem process is not shutdown when there is no space on the disk to w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pki-core
Version: 7.6
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Endi Sukma Dewata
QA Contact: Asha Akkiangady
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks: 1643880
TreeView+ depends on / blocked
 
Reported: 2018-10-16 12:37 UTC by Asha Akkiangady
Modified: 2020-10-04 21:45 UTC (History)
7 users (show)

Fixed In Version: pki-core-10.5.16-2.el7
Doc Type: Bug Fix
Doc Text:
.Certificate System automatically shuts down if signed audit logs cannot be stored due to a full file system Previously, if audit signing was enabled and the file system on which Certificate System stored the signed audit logs was full, Certificate System continued operating but did not log further operations. To prevent missing signed audit logs, Certificate System now shuts down automatically in the mentioned scenario.
Clone Of:
: 1643880 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:07:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
CA Agent UI partially responding when audit signing log is full (366.53 KB, image/png)
2018-10-16 13:40 UTC, Asha Akkiangady
no flags Details
Debug log messages attached (9.15 KB, text/plain)
2018-10-16 19:29 UTC, Asha Akkiangady
no flags Details
Browser Screenshot (64.38 KB, image/png)
2019-06-14 09:02 UTC, Deepak Punia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github dogtagpki pki issues 3187 0 None closed Auto shutdown when partition for signed audit log is full 2021-01-13 07:33:33 UTC
Red Hat Product Errata RHBA-2019:2228 0 None None None 2019-08-06 13:07:40 UTC

Description Asha Akkiangady 2018-10-16 12:37:18 UTC
Description of problem:
PKI subsystem (example: CA) process is not shutdown when there is no space on the disk to write logs (example: signed audit log).

Version-Release number of selected component (if applicable):
pki-server-10.5.9-6.el7.noarch

How reproducible:


Steps to Reproduce:
Testing CA instance when signedaudit log is full:
1. pkispawn a CA instance
2. Create a small partition on the disk. 
create a 2M ram-disk for audit logs at /audit-logs:   
Login as a super user   
# mkdir /audit-logs   
# mount -t tmpfs -o size=2M,mode=0755 tmpfs /audit-logs   
# chown pkiuser:pkiuser /audit-logs   
Add appropriate selinux context to the partition:   
# /usr/sbin/semanage fcontext -a -t pki_tps_log_t /audit-logs   
# /sbin/restorecon -vR /audit-logs        

3. Configure CA signed audit true and signed audit log to write to this new partition.
Note: Save value of  parameter log.instance.SignedAudit.fileName. log.instance.SignedAudit.logSigning=true log.instance.SignedAudit.fileName=/audit-logs/ca_audit 

4. Restart the subsystem.      
# systemctl restart pki-tomcatd@<ca-inst>.service
5.Fill the partiton: 
Login to the shell as a super user, fill the new partition by creating a big file using dd command. Modify the "bs" value so that your partion is filled.   example: # dd if=/dev/zero of=/audit-logs/bigfile bs=1M count=117        

6. From CA agent page or using CLI commands make some more requests to CA so that the partition is completely full. Notice that it stops writing to file /audit-logs/ca_audit.

Actual results:
There is no message in CA's debug or Catalina logs indicating disk is full.
CA process is not completely shut down. Some of the requests on the agent UI continue to respond.

# pki ca-cert-find
PKIException: Unable to search certificates: attribute serialno is not registered

Expected results:
An exception indicating disk is full should be logged in Catalina log file.
Servlets should be disabled.
CA process should completely shut down.


Additional info:
Documentation for this feature: https://access.redhat.com/documentation/en-us/red_hat_certificate_system/9/html/administration_guide/java-logs 
See section 15.2.5.7. Handling Audit Logging Failures

Comment 2 Asha Akkiangady 2018-10-16 13:26:08 UTC
One correction needed in step #2.
# /usr/sbin/semanage fcontext -a -t pki_ca_log_t /audit-logs

Comment 3 Asha Akkiangady 2018-10-16 13:40:04 UTC
Created attachment 1494363 [details]
CA Agent UI partially responding when audit signing log is full

Comment 4 Asha Akkiangady 2018-10-16 19:29:15 UTC
Created attachment 1494557 [details]
Debug log messages attached

Comment 6 Christina Fu 2018-10-24 21:26:01 UTC
Endi, is this bug related to the following?
https://bugzilla.redhat.com/show_bug.cgi?id=1248216

Comment 7 Endi Sukma Dewata 2018-10-24 21:32:04 UTC
Not really. Bug #1248216 is about pkidaemon not showing an accurate subsystem status (it can be obtained using pki-server subsystem-find command). The current bug is about one scenario that might cause a subsystem to shutdown.

Comment 8 Endi Sukma Dewata 2018-10-24 21:32:57 UTC
Asha, please provide a qa_ack. Thanks!

Comment 12 Endi Sukma Dewata 2018-12-17 14:33:01 UTC
The verification steps were provided in the original bug description.

Comment 15 Deepak Punia 2019-06-14 09:02:26 UTC
Created attachment 1580599 [details]
Browser Screenshot

Comment 21 errata-xmlrpc 2019-08-06 13:07:19 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-2019:2228


Note You need to log in before you can comment on or make changes to this bug.