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 888524 - ipa delegation-find --group option returns internal error
Summary: ipa delegation-find --group option returns internal error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks: 895654
TreeView+ depends on / blocked
 
Reported: 2012-12-18 20:11 UTC by Scott Poore
Modified: 2013-05-22 20:22 UTC (History)
3 users (show)

Fixed In Version: ipa-3.0.0-17.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 09:31:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 0 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 08:22:21 UTC

Description Scott Poore 2012-12-18 20:11:38 UTC
Description of problem:

In RHEL6.4 version of IPA, I'm seeing internal errors when searching for delegations by group:

[root@rhel6-1 ipa-delegation-cli]# ipa delegation-find --group=gr1000
ipa: ERROR: an internal error has occurred

Version-Release number of selected component (if applicable):
ipa-server-3.0.0-15.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Setup IPA server
2. kinit admin
3. ipa group-add mg1000 --desc=mg1000
4. ipa group-add gr1000 --desc=gr1000
5. ipa delegation-add delegation_find_positive_1000 --membergroup=mg1000 --group=gr1000 --attrs=mobile
6. ipa delegation-find --group=gr1000
  
Actual results:
ipa: ERROR: an internal error has occurred

Expected results:
returns delegation_find_positive_1000 listing

Additional info:

[root@rhel6-1 ipa-delegation-cli]# tail -19 /var/log/httpd/error_log 
[Tue Dec 18 14:07:06 2012] [error] ipa: INFO: admin: ping(): SUCCESS
[Tue Dec 18 14:07:06 2012] [error] ipa: ERROR: non-public: AttributeError: 'unicode' object has no attribute 'value'
[Tue Dec 18 14:07:06 2012] [error] Traceback (most recent call last):
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 334, in wsgi_execute
[Tue Dec 18 14:07:06 2012] [error]     result = self.Command[name](*args, **options)
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 435, in __call__
[Tue Dec 18 14:07:06 2012] [error]     ret = self.run(*args, **options)
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 747, in run
[Tue Dec 18 14:07:06 2012] [error]     return self.execute(*args, **options)
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/delegation.py", line 200, in execute
[Tue Dec 18 14:07:06 2012] [error]     results = api.Command['aci_find'](term, **kw)['result']
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 435, in __call__
[Tue Dec 18 14:07:06 2012] [error]     ret = self.run(*args, **options)
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 747, in run
[Tue Dec 18 14:07:06 2012] [error]     return self.execute(*args, **options)
[Tue Dec 18 14:07:06 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/aci.py", line 804, in execute
[Tue Dec 18 14:07:06 2012] [error]     cn = groupdn[0]['cn'].value
[Tue Dec 18 14:07:06 2012] [error] AttributeError: 'unicode' object has no attribute 'value'
[Tue Dec 18 14:07:06 2012] [error] ipa: INFO: admin: delegation_find(None, group=u'gr1000', pkey_only=False, all=False, raw=False, version=u'2.46'): AttributeError

Comment 1 Scott Poore 2012-12-18 20:21:43 UTC
Something confusing me here though.  When I run with --attrs=badattr it fails as expected instead of with internal error.

[root@rhel6-1 ipa-delegation-cli]# ipa delegation-find --membergroup=mg1000 --group=gr1000 --attrs=badattrs
---------------------
0 delegations matched
---------------------
----------------------------
Number of entries returned 0
----------------------------

[root@rhel6-1 ipa-delegation-cli]# tail -1 /var/log/httpd/error_log 
[Tue Dec 18 14:19:36 2012] [error] ipa: INFO: admin: delegation_find(None, attrs=(u'badattrs',), memberof=u'mg1000', group=u'gr1000', pkey_only=False, all=False, raw=False, version=u'2.46'): SUCCESS

So, does that means it searches for the attrs first, finds nothing, so fails before it has a chance to hit the code searching for group?

Comment 4 Martin Kosek 2012-12-19 09:39:44 UTC
Thanks for the report. I will start from your last comment.

When we search with --attrs, we skip --group or any other following checks when this one fails because it is obvious that this particular delegation won't be included in the search result.

About the bug report itself, this is indeed a bug. I will clone it upstream.

Comment 6 Martin Kosek 2012-12-19 09:45:13 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3311

Comment 11 Scott Poore 2012-12-20 15:34:02 UTC
Verified.

Version ::

ipa-server-3.0.0-17.el6.x86_64

Manual Test Results ::

[root@rhel6-1 ~]# kinit admin
Password for admin: 

[root@rhel6-1 ~]# ipa group-add mg1000 --desc=mg1000
--------------------
Added group "mg1000"
--------------------
  Group name: mg1000
  Description: mg1000
  GID: 92400001

[root@rhel6-1 ~]# ipa group-add gr1000 --desc=gr1000
--------------------
Added group "gr1000"
--------------------
  Group name: gr1000
  Description: gr1000
  GID: 92400003

[root@rhel6-1 ~]# ipa delegation-add delegation_find_positive_1000 --membergroup=mg1000 --group=gr1000 --attrs=mobile
------------------------------------------------
Added delegation "delegation_find_positive_1000"
------------------------------------------------
  Delegation name: delegation_find_positive_1000
  Permissions: write
  Attributes: mobile
  Member user group: mg1000
  User group: gr1000

[root@rhel6-1 ~]# ipa delegation-find --group=gr1000
--------------------
1 delegation matched
--------------------
  Delegation name: delegation_find_positive_1000
  Permissions: write
  Attributes: mobile
  Member user group: mg1000
  User group: gr1000
----------------------------
Number of entries returned 1
----------------------------

Comment 14 errata-xmlrpc 2013-02-21 09:31:23 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-2013-0528.html


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