Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1408965

Summary: ipa-ca-install cannot be re-run if failed and requires full uninstallation
Product: Red Hat Enterprise Linux 7 Reporter: German Parente <gparente>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: afarley, pasik, pvoborni, rcritten
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-16 16:34:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description German Parente 2016-12-28 14:52:10 UTC
Description of problem:

imho, we need a better handling of ipa-ca-install.

If for any reason it fails like in this case:

====================================
Installing CA into /var/lib/pki/pki-tomcat.

Installation failed: PKI subsystem 'CA' for instance 'pki-tomcat' does NOT exist!


ipa         : DEBUG    stderr=pkispawn    : ERROR    ....... PKI subsystem 'CA' for instance 'pki-tomcat' already exists!

ipa.ipaserver.install.cainstance.CAInstance: CRITICAL Failed to configure CA instance: Command '/usr/sbin/pkispawn -s CA -f /tmp/tmp1OOvuJ' returned non-zero exit status 1
ipa.ipaserver.install.cainstance.CAInstance: CRITICAL See the installation logs and the following files/directories for more information:
ipa.ipaserver.install.cainstance.CAInstance: CRITICAL   /var/log/pki/pki-tomcat
====================================

I don't have the possibility of doing a "ipa-ca-install --uninstall"


Instead, the proposal is to delete the full replica to cleanup:

=====================================
Your system may be partly configured.
Run /usr/sbin/ipa-server-install --uninstall to clean up.
=====================================

At master side, we can see:

======================
ipa-csreplica-manage list
Directory Manager password: 

ipareplica.gparente.local: CA not configured
ipaserver.gparente.local: master
=======================

If, at replica side, I want to re-install CA, I will find these issues:

========================
ipa         : DEBUG    The ipa-ca-install command failed, exception: DuplicateEntry: This entry already exists
========================

Because of:

[28/Dec/2016:09:46:38.078814164 -0500] conn=39 op=2 ADD dn="cn=o\3Dipaca,cn=mapping tree,cn=config"
[28/Dec/2016:09:46:38.079158862 -0500] conn=39 op=2 RESULT err=68 tag=105 nentries=0 etime=0

I can delete ipaca backend completely so as to have no traces and let installer go on, but if it fails by another reason, it's impossible to go on or repair either than deleting + uninstalling the full replica.


IMHO, either we do a 

ipa-ca-install that performs the exact same steps each time and knows how to skip already performed actions (ipa-dns-install like) or we provide a 

ipa-ca-install --uninstall 

command.

Version-Release number of selected component (if applicable):

rpm -q ipa-server
ipa-server-4.4.0-14.el7_3.x86_64

Comment 2 Petr Vobornik 2017-01-06 17:43:45 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6595

Comment 3 Petr Vobornik 2017-01-06 17:44:49 UTC
This is a bug, therefore changing title.

Comment 6 Amy Farley 2019-08-16 16:34:12 UTC
With all improvements around installation, we are going to close this bz as this should no longer be a factor with the current release.