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 733436 - IPA does not always properly detect its configuration status
Summary: IPA does not always properly detect its configuration status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-25 17:22 UTC by Rob Crittenden
Modified: 2015-01-04 23:50 UTC (History)
8 users (show)

Fixed In Version: ipa-2.1.1-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: The IPA server installer and ipactl use two different methods to determine whether IPA is configured. Consequence: If the IPA uninstallation was not complete, ipactl may claim that IPA server is not configured while IPA server installer refuses to continue because IPA is configured. This is confusing for the user. Fix: Use a common function to check if IPA server has been configured. Check for left-overs during IPA server uninstallation and report them to the user so that he can resolve the situation. Result: ipactl and IPA server install check for existing configuration consistently. User has a better feedback when uninstalling IPA server.
Clone Of:
Environment:
Last Closed: 2011-12-06 18:30:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1533 0 normal SHIPPED_LIVE Moderate: ipa security and bug fix update 2011-12-06 01:23:31 UTC

Description Rob Crittenden 2011-08-25 17:22:10 UTC
Description of problem:

The RHEV-M team reports a problem when installing their product, uninstalling it and the rpms, then re-installing it:

2011-08-24 16:34:03::DEBUG::rhevm-setup::2035::root:: checking IPA installation status
2011-08-24 16:34:03::DEBUG::common_utils::164::root:: cmd = /sbin/service ipa status
2011-08-24 16:34:03::DEBUG::common_utils::169::root:: output =
2011-08-24 16:34:03::DEBUG::common_utils::170::root:: stderr = IPA is not configured (see man pages of ipa-server-install for help)

2011-08-24 16:34:03::DEBUG::common_utils::171::root:: retcode = 4

The install later fails with:

An existing Directory Server has been detected.

Only a single Directory Server instance is allowed on an IPA
server, the one used by IPA itself.

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

ipa-server-2.0.0-23.el6

Comment 1 Rob Crittenden 2011-08-25 17:26:17 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/1715

Comment 2 Jenny Severance 2011-08-25 17:40:13 UTC
I think that the real issue here is that yum erase ipa-server  ... should first run ipa-server-install --uninstall .......

Comment 3 Jenny Severance 2011-08-25 18:36:27 UTC
okay ... second thought ... not sure that is correct.  I'm am still in the school of thought that everything happened as expected.  yum erase ipa-server , should not remove 389 or unconfigure it .  and a re-install of ipa-server did exactly what it should have ... errored with message stating that a directory server instance already exists and it must be removed for ipa to be installed.  Can I get a better reason why you think this is an ipa bug?

Comment 4 Mark Wagner 2011-08-25 19:09:53 UTC
If I use yum to remove a product from my system, it should not leave cruft behind that prevents a fresh install from being configured. Why does the product team view that as a feature ?

What is the use case ?

Comment 5 Jenny Severance 2011-08-25 19:20:57 UTC
Because ipa consists of 389, dogtag, kdc  ... it I can see this gets a bit tricky for you.  The proper way to clean up is to ..

ipa-server-install --uninstall (cleans up all configuration and 389 instances)
and then yum erase what ever packages you want to remove.

Comment 6 Dmitri Pal 2011-08-26 16:35:14 UTC
So here is what we should do for this ticket:

Any leftover item from the old install of: 
* IPA
* DS
* CS
* whatever we care about...

that we check on the install that can prevent a successful install should be checked on the uninstall and an appropriate remediation should be provided.
It can be backing up or removing depending upon the situation but the bottom line is that the uninstall should allow the system to be brought into the compliance with the install requirements regarding cleanness of the system.

This ticket does NOT cover other reasons like DNS and hostname resolution that can prevent IPA from successful installation and functioning.

Comment 7 Rob Crittenden 2011-08-30 14:08:30 UTC
fixed upstream in 

master: d7618acb73f57a63aca0a9fcfa8bf5edb1cffdda

ipa-2-1: 91c9e8320932124ff77178383a0531fb2b218f2f

Will now check for leftover when the uninstall finishes and warn about the things it finds.

Comment 9 Martin Kosek 2011-11-01 13:40:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: The IPA server installer and ipactl use two different methods to determine whether IPA is configured.
Consequence: If the IPA uninstallation was not complete, ipactl may claim that IPA server is not configured while IPA server installer refuses to continue because IPA is configured. This is confusing for the user.
Fix: Use a common function to check if IPA server has been configured. Check for left-overs during IPA server uninstallation and report them to the user so that he can resolve the situation.
Result: ipactl and IPA server install check for existing configuration consistently. User has a better feedback when uninstalling IPA server.

Comment 10 Gowrishankar Rajaiyan 2011-11-06 11:44:26 UTC
[root@mudflap ~]# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring ipa_kpasswd
Unconfiguring directory server
^C
Cleaning up...
[root@mudflap ~]# 

[root@mudflap ~]# ipactl status
Directory Service: STOPPED
Failed to get list of services to probe status:
Directory Server is stopped
[root@mudflap ~]# 

[root@mudflap ~]# ipa-server-install 

The log file for this installation can be found in /var/log/ipaserver-install.log
IPA server is already configured on this system.
If you want to reinstall the IPA server please uninstall it first.
[root@mudflap ~]# 

[root@mudflap ~]# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring directory server
root        : ERROR    IPA cannot be re-installed without removing existing 389-ds instance(s)
[root@mudflap ~]#

[root@mudflap ~]# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.1.3                             Vendor: Red Hat, Inc.
Release     : 8.el6                         Build Date: Wed 02 Nov 2011 03:21:27 AM IST
Install Date: Thu 03 Nov 2011 10:02:33 AM IST      Build Host: x86-012.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.1.3-8.el6.src.rpm
Size        : 3381421                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server
[root@mudflap ~]# 


Is the above verification enough to be marked this as verified ?

Comment 11 Martin Kosek 2011-11-07 11:47:48 UTC
I don't think this is it as ipactl does not say that ipa server is not configured.

You can check test scenarios that Rob added to the upstream ticket though:
https://fedorahosted.org/freeipa/ticket/1715#comment:5

They should help in verifying this.

Comment 12 Rob Crittenden 2011-11-07 15:22:10 UTC
The uninstall log should have additional details on what it found was already installed too.

Comment 13 Gowrishankar Rajaiyan 2011-11-08 12:39:38 UTC
Positive test:
[root@mudflap ~]# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring ipa_kpasswd
Unconfiguring directory server
[root@mudflap ~]# echo $?
0
[root@mudflap ~]# 



Negative test1:

- install
- Add some state (can be any name=value pair) to /var/lib/ipa/sysrestore/sysrestore.state
- uninstall, should get warning about state, rv = 1


[root@sideswipe sysrestore]# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring ipa_kpasswd
Unconfiguring directory server
root        : ERROR    Some installation state for httpd has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
root        : ERROR    Some installation state for ipa_kpasswd has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
root        : ERROR    Some installation state for dirsrv has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
[root@sideswipe sysrestore]# echo $?
1
[root@sideswipe sysrestore]# 


Negative test2:

- install 
- set up a new 389-ds instance
- uninstall


[root@decepticons dirsrv]# ls -l
total 24
drwxr-xr-x. 2 root   root   4096 Oct 19 04:11 config
-rw-------  1 dirsrv dirsrv  616 Nov  7 18:59 ds.keytab
drwxr-xr-x. 2 root   root   4096 Oct 19 04:11 schema
drwxrwx---  3 nobody nobody 4096 Nov  7 19:18 slapd-decepticons
drwxrwx---  3 dirsrv dirsrv 4096 Nov  7 19:11 slapd-LAB-ENG-PNQ-REDHAT-COM
drwxrwx---  3 pkisrv dirsrv 4096 Nov  7 19:00 slapd-PKI-IPA
[root@decepticons dirsrv]# 


[root@decepticons dirsrv]# service dirsrv status
dirsrv decepticons (pid 24801) is running...
dirsrv LAB-ENG-PNQ-REDHAT-COM (pid 24082) is running...
dirsrv PKI-IPA (pid 24150) is running...
[root@decepticons dirsrv]# 


[root@decepticons ~]# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring ipa_kpasswd
Unconfiguring directory server
root        : ERROR    IPA cannot be re-installed without removing existing 389-ds instance(s)
[root@decepticons ~]# echo $?
1
[root@decepticons ~]# 

from ipaserver-uninstall.log:
2011-11-08 07:32:52,073 DEBUG stdout=
2011-11-08 07:32:52,073 DEBUG stderr=
2011-11-08 07:32:52,085 DEBUG Found existing 389-ds instance /etc/dirsrv/slapd-ipaqavma
2011-11-08 07:32:52,086 ERROR IPA cannot be re-installed without removing existing 389-ds instance(s)


There exists a bug (https://bugzilla.redhat.com/show_bug.cgi?id=751769) which tracks the issue where the 389-ds instance is successfully removed and still ipa-server-install --uninstall displays an ERROR.


Verified.

[root@decepticons ~]# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.1.3                             Vendor: Red Hat, Inc.
Release     : 9.el6                         Build Date: Tue 08 Nov 2011 01:30:54 AM IST
Install Date: Tue 08 Nov 2011 11:14:36 AM IST      Build Host: x86-001.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.1.3-9.el6.src.rpm
Size        : 3382131                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server
[root@decepticons ~]#

Comment 14 errata-xmlrpc 2011-12-06 18:30:28 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.

http://rhn.redhat.com/errata/RHSA-2011-1533.html


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