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 1351119 - Multiple issues while uninstalling ipa-server
Summary: Multiple issues while uninstalling ipa-server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-29 10:00 UTC by Abhijeet Kasurde
Modified: 2016-11-04 05:55 UTC (History)
4 users (show)

Fixed In Version: ipa-4.4.0-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 05:55:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ipaserver-install.log (38.61 KB, text/plain)
2016-06-29 10:03 UTC, Abhijeet Kasurde
no flags Details
ipa-client-install.log (39.55 KB, text/plain)
2016-06-29 10:03 UTC, Abhijeet Kasurde
no flags Details
ipa-server-install.latest.log (3.91 MB, text/plain)
2016-07-07 05:14 UTC, Abhijeet Kasurde
no flags Details
console.log (12.31 KB, text/plain)
2016-07-07 05:14 UTC, Abhijeet Kasurde
no flags Details
ipa-client-install.latest.log (58.50 KB, text/plain)
2016-07-07 05:15 UTC, Abhijeet Kasurde
no flags Details
ipa-server-uninstall.latest.log (62.55 KB, text/plain)
2016-07-07 05:16 UTC, Abhijeet Kasurde
no flags Details
ipa-client-uninstall.latest.log (42.08 KB, text/plain)
2016-07-07 05:16 UTC, Abhijeet Kasurde
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2404 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2016-11-03 13:56:18 UTC

Description Abhijeet Kasurde 2016-06-29 10:00:54 UTC
Description of problem:
Seen following three issues while uninstalling ipa-server

1. Uninstallation complains about missing 'ipa.conf'
2. Uninstallation complains about ipa-client-automount --uninstall as command unable to get Kerberos Credentials
3. Uninstallation complains while removing '/etc/krb5.keytab' file

Version-Release number of selected component (if applicable):
ipa-server-4.4.0-0.el7.2.alpha1.x86_64

How reproducible:
100%

Steps to Reproduce:
1. ipa-server-install --uninstall -U

Actual results:
Uninstallation complains about above mentioned errors

Expected results:
Uninstallation should be successful.

Comment 1 Abhijeet Kasurde 2016-06-29 10:03:03 UTC
Created attachment 1173736 [details]
ipaserver-install.log

Comment 2 Abhijeet Kasurde 2016-06-29 10:03:34 UTC
Created attachment 1173737 [details]
ipa-client-install.log

Comment 3 Petr Vobornik 2016-06-29 10:29:41 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6012

Comment 6 Petr Vobornik 2016-07-01 12:39:03 UTC
Settting to post, we can't reproduce with most recent upstream build which was used for rebase.

Comment 7 Abhijeet Kasurde 2016-07-05 10:04:25 UTC
I am able to reproduce this using latest build,

# rpm -qa |grep ipa-server
ipa-server-dns-4.4.0-1.el7.noarch
ipa-server-common-4.4.0-1.el7.noarch
ipa-server-4.4.0-1.el7.x86_64


# ipa-server-install --uninstall -U
Updating DNS system records
ipa         : ERROR    unable to resolve host name server1.testrelm.test. to IP address, ipa-ca DNS record will be incomplete
------------------------------------------
Deleted IPA server "server1.testrelm.test"
------------------------------------------
Shutting down all IPA services
Unconfiguring ntpd
Configuring certmonger to stop tracking system certificates for KRA
Configuring certmonger to stop tracking system certificates for CA
Unconfiguring CA
Unconfiguring named
Unconfiguring ipa-dnskeysyncd
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring kadmin
Unconfiguring directory server
Unconfiguring ipa-custodia
Unconfiguring ipa_memcached
Unconfiguring ipa-otpd
Removing IPA client configuration
Removing Kerberos service principals from /etc/krb5.keytab
Failed to remove Kerberos service principals: Command '/usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r TESTRELM.TEST' returned non-zero exit status 5
Disabling client Kerberos and LDAP configurations
Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted
Restoring client configuration files
Unconfiguring the NIS domain.
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Systemwide CA database updated.
Client uninstall complete.
[root@server1 ~]# sestatus
SELinux status:                 disabled

Comment 8 Sudhir Menon 2016-07-05 12:22:08 UTC
Able to reproduce the below issue with ipa-server-4.4.0-1.el7.x86_64 on 
Red Hat Enterprise Linux Server release 7.3 Beta (Maipo) during uninstall.

Failed to remove Kerberos service principals: Command '/usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r TESTRELM.TEST' returned non-zero exit status 5

Comment 9 Rob Crittenden 2016-07-05 13:00:12 UTC
Exit code 5 means Principal name or realm not found in keytab.

It would be helpful to see the contents of the keytab prior to and after running uninstall.

Comment 10 Sudhir Menon 2016-07-05 13:12:42 UTC
Rob, this is what is seen on the test system

1. Upon Installation of ipa-server

ktutil:  rkt /etc/krb5.keytab
ktutil:  l
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    2  host/server.testrelm.test
   2    2  host/server.testrelm.test
   3    2  host/server.testrelm.test
   4    2  host/server.testrelm.test
   5    2  host/server.testrelm.test
   6    2  host/server.testrelm.test
ktutil:  q

2. Post uninstall of ipa-server
[root@server ~]# ktutil 
ktutil:  rkt /etc/krb5.keytab
ktutil:  l
slot KVNO Principal
---- ---- ---------------------------------------------------------------------

Comment 11 Rob Crittenden 2016-07-05 13:50:05 UTC
Need the client and server uninstall logs.

Comment 12 Abhijeet Kasurde 2016-07-07 05:13:03 UTC
Unable to see Krb5 Keytab related issue on fresh installation of RHEL 7.3 and IPA ipa-server-4.4.0-1.el7.x86_64.

Attaching console.log, ipa-{client,server}-{install,uninstall}.log

Comment 13 Abhijeet Kasurde 2016-07-07 05:14:02 UTC
Created attachment 1177137 [details]
ipa-server-install.latest.log

Comment 14 Abhijeet Kasurde 2016-07-07 05:14:21 UTC
Created attachment 1177138 [details]
console.log

Comment 15 Abhijeet Kasurde 2016-07-07 05:15:51 UTC
Created attachment 1177140 [details]
ipa-client-install.latest.log

Comment 16 Abhijeet Kasurde 2016-07-07 05:16:30 UTC
Created attachment 1177141 [details]
ipa-server-uninstall.latest.log

Comment 17 Abhijeet Kasurde 2016-07-07 05:16:58 UTC
Created attachment 1177142 [details]
ipa-client-uninstall.latest.log

Comment 18 Petr Vobornik 2016-07-07 12:16:58 UTC
This bz has incorrect state it should be on QA or assigned(provided it is not fixed).

From the comments it seems that it can be reproduce only under certain conditions which are not known yet.

Comment 19 Petr Vobornik 2016-07-08 13:29:17 UTC
moving to assigned, reproduction scenario of #3 is known:
"""
it happens because the server uninstaller first restores all the files (including /etc/krb5.keytab), then call client-uninstall which tries to run ipa-rmkeytab
"""

Comment 20 Martin Bašti 2016-07-20 14:36:54 UTC
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/a0d90263d62f48f0c04b8b9e7da3aaa10201c3a0

Comment 22 Sudhir Menon 2016-07-25 13:46:36 UTC
Verified using ipa-server-4.4.0-3.el7.x86_64

The below issue is no more seen when ipa-server --uninstall  is run

"Failed to remove Kerberos service principals: Command '/usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r TESTRELM.TEST' returned non-zero exit status 5"

[root@vm92 httpd]# ipa-server-install --uninstall -U
Updating DNS system records
ipa: ERROR    unable to resolve host name vm92.ipa73.test. to IP address, ipa-ca DNS record will be incomplete
------------------------------------
Deleted IPA server "vm92.ipa73.test"
------------------------------------
Shutting down all IPA services
Unconfiguring ntpd
Configuring certmonger to stop tracking system certificates for KRA
Configuring certmonger to stop tracking system certificates for CA
Unconfiguring CA
Unconfiguring named
Unconfiguring ipa-dnskeysyncd
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring kadmin
Unconfiguring directory server
Unconfiguring smb
Unconfiguring ipa-custodia
Unconfiguring ipa_memcached
Unconfiguring ipa-otpd
Removing IPA client configuration
Removing Kerberos service principals from /etc/krb5.keytab
Disabling client Kerberos and LDAP configurations
Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted
Restoring client configuration files
Unconfiguring the NIS domain.
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Systemwide CA database updated.
Client uninstall complete.

2. Checkingkeytab file entries     

ktutil:  rkt /etc/krb5.keytab
ktutil:  l
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
ktutil:

Comment 24 errata-xmlrpc 2016-11-04 05:55:38 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://rhn.redhat.com/errata/RHBA-2016-2404.html


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