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 1623763 - ipa service-del <Principal name> should display principal name instead of Invalid 'principal'.
Summary: ipa service-del <Principal name> should display principal name instead of Inv...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-30 07:10 UTC by Sudhir Menon
Modified: 2020-05-18 12:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-11 19:11:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of service del (164.03 KB, image/png)
2018-08-30 07:11 UTC, Sudhir Menon
no flags Details

Description Sudhir Menon 2018-08-30 07:10:23 UTC
Description of problem: Deleting services from the UI/console should display principal name instead of Invalid 'principal'
 
Version-Release number of selected component (if applicable):
ipa-server-4.6.4-6.el7.x86_64
sssd-1.16.2-12.el7.x86_64
package samba is not installed
pki-server-10.5.9-6.el7.noarch
selinux-policy-3.13.1-220.el7.noarch
389-ds-base-1.3.8.4-11.el7.x86_64


How reproducible: Always

Steps to Reproduce:
1. Install Master and 2 Replicas
2. Navigate to IPA UI --> Identity ---> Services.
3. Select all the services and click the 'Delete' button.


Actual results:
Services required by IPA are not deleted but the pop-up window displays Invalid 'principal' instead of the actual service deleted.

[root@master ~]# ipa service-del ldap/replica1.apollo.test
ipa: ERROR: invalid 'principal': This principal is required by the IPA master

[Thu Aug 30 11:50:39.407794 2018] [:error] [pid 11758] ipa: DEBUG: retrieving schema for SchemaCache url=ldapi://%2fvar%2frun%2fslapd-APOLLO-TEST.socket conn=<ldap.ldapobject.SimpleLDAPObject instance at 0x7f57f3199908>
[Thu Aug 30 11:50:39.697064 2018] [:error] [pid 11758] ipa: DEBUG: WSGI wsgi_execute PublicError: Traceback (most recent call last):
[Thu Aug 30 11:50:39.697083 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 369, in wsgi_execute
[Thu Aug 30 11:50:39.697088 2018] [:error] [pid 11758]     result = command(*args, **options)
[Thu Aug 30 11:50:39.697098 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 450, in __call__
[Thu Aug 30 11:50:39.697103 2018] [:error] [pid 11758]     return self.__do_call(*args, **options)
[Thu Aug 30 11:50:39.697107 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 478, in __do_call
[Thu Aug 30 11:50:39.697112 2018] [:error] [pid 11758]     ret = self.run(*args, **options)
[Thu Aug 30 11:50:39.697116 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 800, in run
[Thu Aug 30 11:50:39.697121 2018] [:error] [pid 11758]     return self.execute(*args, **options)
[Thu Aug 30 11:50:39.697125 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/baseldap.py", line 1587, in execute
[Thu Aug 30 11:50:39.697129 2018] [:error] [pid 11758]     delete_entry(pkey)
[Thu Aug 30 11:50:39.697134 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/baseldap.py", line 1538, in delete_entry
[Thu Aug 30 11:50:39.697138 2018] [:error] [pid 11758]     dn = callback(self, ldap, dn, *nkeys, **options)
[Thu Aug 30 11:50:39.697142 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/service.py", line 669, in pre_callback
[Thu Aug 30 11:50:39.697147 2018] [:error] [pid 11758]     check_required_principal(ldap, keys[-1])
[Thu Aug 30 11:50:39.697151 2018] [:error] [pid 11758]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/service.py", line 287, in check_required_principal
[Thu Aug 30 11:50:39.697156 2018] [:error] [pid 11758]     raise errors.ValidationError(name='principal', error=_('This principal is required by the IPA master'))
[Thu Aug 30 11:50:39.697160 2018] [:error] [pid 11758] ValidationError: invalid 'principal': This principal is required by the IPA master

Expected results: It's better to display the output in console and UI by replacing the Invalid 'principal' with actual principal name to avoid confusion as in that the principal name is invalid.

e.g
[root@master ~]# ipa service-del ldap/replica1.apollo.test
ipa: ERROR: ldap/replica1.apollo.test: This principal is required by the IPA master

Additional info: Logging this as an bug to change the output being displayed while deleting the service.

Comment 2 Sudhir Menon 2018-08-30 07:11:41 UTC
Created attachment 1479689 [details]
Screenshot of service del

Comment 3 Alexander Bokovoy 2018-09-11 18:30:58 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7695

Comment 4 Petr Čech 2019-12-11 19:11:35 UTC
Once the upstream community implements this feature it will be pulled into a corresponding Red Hat Enterprise Linux release following the corresponding schedules.
From now on this issue will be tracked in the community issue tracker only.
Closing this BZ.


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