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 1958777 - ipa-client-install --uninstall fails post upgrade from rhel7.9 to rhel8.0 using leapp.
Summary: ipa-client-install --uninstall fails post upgrade from rhel7.9 to rhel8.0 us...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: anuja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-10 06:42 UTC by Sudhir Menon
Modified: 2022-11-08 10:25 UTC (History)
8 users (show)

Fixed In Version: ipa-4.9.10-1.module+el8.7.0+15691+2b2c1dd5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:35:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 9147 0 None None None 2022-05-09 09:14:35 UTC
Red Hat Issue Tracker FREEIPA-6592 0 None None None 2022-03-29 16:01:06 UTC
Red Hat Product Errata RHBA-2022:7540 0 None None None 2022-11-08 09:36:23 UTC

Description Sudhir Menon 2021-05-10 06:42:14 UTC
Description of problem: ipa-client-uninstall fails post upgrade from rhel7.9 to rhel8.0 using leapp

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

RHEL7.9:
ipa-client-4.6.8-5.el7_9.5.x86_64
ipa-server-4.6.8-5.el7_9.5.x86_64

How reproducible: Always

Steps to Reproduce:
1. Install IPA server and IPA client on RHEL7.9
2. Setup repos for leapp on IPA Server/Client and also set repo for rhel8.0 ipa packages.
3. Run "#leapp upgrade --debug" on ipaclient
4. Ensure that upgrade is successful
5. Now try to uninstall IPA client.

Actual results:
ipa-client is upgraded from ipa-client-4.6.8-5.el7_9.5.x86_64 to ipa-client-4.9.2-3.module+el8.4.0+10413+a92f1bfa.x86_64
id command works fine. Now when we try to uninstall ipa-client it fails with the below error.

[root@client etc]# ipa-client-install --uninstall -U 
Unenrolling client from IPA server
Unenrolling host failed: Error obtaining initial credentials: Cannot find KDC for requested realm.

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
Some installation state for authconfig has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
Some installation state has not been restored.
This may cause re-installation to fail.
It should be safe to remove /var/lib/ipa-client/sysrestore.state but it may
 mean your system hasn't been restored to its pre-installation state.
Systemwide CA database updated.
Client uninstall complete.
The ipa-client-install command failed. See /var/log/ipaclient-uninstall.log for more information

Expected results: ipa client uninstall should be successfull post upgrade.

Additional info:

Comment 3 Petr Stodulka 2021-05-10 13:29:08 UTC
Hi Sudhir. Thank you for the report. Can you reproduce the issue with RHEL 8.2 or RHEL 8.4 Beta? Upgrades on RHEL 8.0 are not supported anymore (since 8.1 GA) and there are many other problems on that old version.

Comment 8 Florence Blanc-Renaud 2022-03-29 15:52:10 UTC
Moving to ipa component

Comment 9 Florence Blanc-Renaud 2022-03-29 15:54:40 UTC
The issue happens because the RHEL 7 client is configured with authconfig while the RHEL8 client uninstall expects to work with authselect. If we decide to fix, the patch will go in RHEL8, hence moving to RHEL8 product.

Comment 10 Florence Blanc-Renaud 2022-05-09 09:14:33 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/9147

Comment 11 Rob Crittenden 2022-05-13 20:18:49 UTC
PR https://github.com/freeipa/freeipa/pull/6256

Comment 12 Rob Crittenden 2022-05-13 20:19:03 UTC
master:

* ce0592bd478c184b1c0c2a75f675c5a361f4a9a4 client uninstall: handle uninstall with authconfig

Comment 13 Florence Blanc-Renaud 2022-05-14 10:45:49 UTC
Fixed upstream
ipa-4-9:
https://pagure.io/freeipa/c/d39e232e9ee28da5d4488135d264d2d1b9e671ba

Comment 16 anuja 2022-06-30 14:17:09 UTC
Pre-Verified using test-compose : http://artifacts.osci.redhat.com/comp/rhel-8.7.0-mbs/15690-1076-idm/
Using version : 
RHEL7.9 ipa-client-4.6.8-5.el7_9.11.x86_64 
RHEL8.7 ipa-client-4.9.10-1.module+el8.7.0+15690+c8d45780.x86_64

Steps performed :
1. Install IPA server and IPA client on RHEL7.9
2. Setup repos for leapp upgrade to RHEL8.7
3. leapp upgrade --enablerepo test-baseos --enablerepo test-appstream --no-rhsm
4. Ensure that upgrade is successful
5. Reboot
6. Uninstall ipa-client
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@client ~]# date ; ipa-client-install --uninstall -U
Thu Jun 30 10:13:23 EDT 2022
Unenrolling client from IPA server
Removing Kerberos service principals from /etc/krb5.keytab
Disabling client Kerberos and LDAP configurations
WARNING: Unable to revert to the pre-installation state ('authconfig' tool has been deprecated in favor of 'authselect'). The default sssd profile will be used instead.
The authconfig arguments would have been: authconfig --disablesssdauth
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.
The ipa-client-install command was successful
[root@client ~]# echo $?
0
[root@client ~]# tail /var/log/ipaclient-uninstall.log 
2022-06-30T14:13:27Z DEBUG Restart of sshd.service complete
2022-06-30T14:13:27Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2022-06-30T14:13:27Z DEBUG Starting external process
2022-06-30T14:13:27Z DEBUG args=['/usr/bin/update-ca-trust']
2022-06-30T14:13:27Z DEBUG Process finished, return code=0
2022-06-30T14:13:27Z DEBUG stdout=
2022-06-30T14:13:27Z DEBUG stderr=
2022-06-30T14:13:27Z INFO Systemwide CA database updated.
2022-06-30T14:13:27Z INFO Client uninstall complete.
2022-06-30T14:13:27Z INFO The ipa-client-install command was successful
[root@client ~]#

Comment 21 anuja 2022-07-20 12:41:18 UTC
Using version:
RHEL7 : ipa-client-4.6.8-5.el7_9.11.x86_64
RHEL8 : ipa-client-4.9.10-3.module+el8.7.0+15888+685a878f.x86_64


Verified using nightly run :
2022-07-20T12:20:11+0000 =========================== short test summary info ============================
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_server_inhibitor
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_version
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_kinit
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_provider
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_user_otp_login
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_server_onlypkg_install
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_aduser_id
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_aduser_ssh
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_sudouser
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_client_replica_promotion
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_client_replica_install
2022-07-20T12:20:11+0000 PASSED src/ipa-leapp-upgrade/test_leapp_upgrade.py::Testipaleappupgrade::test_client_uninstall
2022-07-20T12:20:11+0000 ================== 12 passed, 2 warnings in 914.92s (0:15:14) ==================
2022-07-20T12:20:12+0000 AVC not found
2022-07-20T12:20:12+0000 AVC not found
2022-07-20T12:20:12+0000 AVC not found
2022-07-20T12:20:12+0000 AVC not found
2022-07-20T12:20:12+0000 RETURN CODE: 0
2022-07-20T12:20:12+0000 UPSTREAM TESTS STEP END: src/ipa-leapp-upgrade/test_leapp_upgrade.py
2022-07-20T12:20:12+0000 PHASE END: test

Comment 24 errata-xmlrpc 2022-11-08 09:35:45 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 (idm:client and idm:DL1 bug fix and enhancement update), 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-2022:7540


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