#3077 pkispawn throws error if logs exist
Closed: fixed 5 years ago Opened 5 years ago by dmoluguw.

When pkidestroy is run (without --remove-flags), /var/log/pki/<instance> is preserved. When pkispawn is run, it throws an error since logs already exist.

Reason: The recent change to pkidestroy (to keep the logs by default) has introduced this error. PR 79

Proposed Solution: Check for existing logs, prompt the admin on whether it can be removed automatically by pkispawn script

Steps to reproduce:
1. Install CA
2. run pkidestroy
3. Try installing CA again

Actual Results:

pkispawn      : INFO     ....... adding GID 'pkiuser' for group '17' . . .
pkispawn      : INFO     ....... adding UID 'pkiuser' for user '17' . . .
pkispawn      : INFO     ........... FIPS mode is enabled on this operating system.
initialization: INFO     Initialization
pkispawn      : ERROR    ....... PKI instance 'pki-tomcat' would produce a namespace collision with '/var/log/pki/pki-tomcat'!

Installation failed: PKI instance 'pki-tomcat' would produce a namespace collision with '/var/log/pki/pki-tomcat'!

Expected Result:
No error


Instead of asking the admin about removing the existing logs, pkispawn should continue the installation and append to the existing logs. The idea is to eventually support restoring PKI instance with existing data & logs from backup.

Metadata Update from @edewata:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

5 years ago

Fixed in master. PR: 92

This patch should reuse the same log dir (if exists) and log corresponding info

Metadata Update from @dmoluguw:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Metadata Update from @dmoluguw:
- Issue assigned to dmoluguw
- Issue set to the milestone: 10.6.8

5 years ago

Metadata Update from @dmoluguw:
- Issue set to the milestone: None (was: 10.6.8)
- Issue status updated to: Open (was: Closed)

5 years ago

Metadata Update from @dmoluguw:
- Custom field blocking adjusted to 1172
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

The changes have been backported (to 10.5) through PR: https://github.com/dogtagpki/pki/pull/93

10_5 branch:

The commit that fixes this specific bug: https://github.com/dogtagpki/pki/commit/c6c6757b4c566d10d25fe220fa9f59539c7a55ee

This commit ensures that pkispawn reuses the same log dir (if exist) instead of throwing name space collision error

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.5.14

5 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/3194

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata