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 887015 - ipa netgroup-mod --setattr with empty value returns internal server error
Summary: ipa netgroup-mod --setattr with empty value returns internal server error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Kosek
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-13 20:21 UTC by Scott Poore
Modified: 2015-01-16 15:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-16 15:17:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scott Poore 2012-12-13 20:21:39 UTC
Description of problem:

ipa netgroup-mod (and maybe others) commands for setattr with empty value returns an internal server error like this:

[root@rhel6-1 ~]# ipa netgroup-add testng1 --desc=desc
------------------------
Added netgroup "testng1"
------------------------
  Netgroup name: testng1
  Description: desc
  NIS domain name: testrelm.com
  IPA unique ID: 3661ef20-418d-11e2-9258-525400640001


[root@rhel6-1 ~]# ipa netgroup-mod --setattr=memberuser="" testng1
ipa: ERROR: an internal error has occurred

[root@rhel6-1 httpd]# ipa netgroup-mod --setattr=memberhost="" testng1
ipa: ERROR: an internal error has occurred

And maybe others?

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

ipa-server-3.0.0-10.el6.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Setup IPA Server
2. ipa netgroup-add testng1 --desc="test netgroup"
3. ipa netgroup-add-member testng1 --users=admin
4. ipa netgroup-mod testng1 --setattr=memberuser=""
5. ipa netgroup-mod testng1 --setattr=memberhost=""
  
Actual results:

Internal Server Errors

Expected results:

Normal error message.

For #4, I'd also expected the users for testng1 to be deleted so they're now empty.

Additional info:

/var/log/httpd/error_log:

[Sat Dec 08 17:16:07 2012] [error] Traceback (most recent call last):
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 334, in wsgi_execute
[Sat Dec 08 17:16:07 2012] [error]     result = self.Command[name](*args, **options)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 435, in __call__
[Sat Dec 08 17:16:07 2012] [error]     ret = self.run(*args, **options)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 747, in run
[Sat Dec 08 17:16:07 2012] [error]     return self.execute(*args, **options)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 1303, in execute
[Sat Dec 08 17:16:07 2012] [error]     self.process_attr_options(entry_attrs, dn, keys, options)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 864, in process_attr_options
[Sat Dec 08 17:16:07 2012] [error]     setdict = self._convert_2_dict(ldap, options.get('setattr', []))
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 817, in _convert_2_dict
[Sat Dec 08 17:16:07 2012] [error]     value = DN(value)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipapython/dn.py", line 1221, in __init__
[Sat Dec 08 17:16:07 2012] [error]     self.rdns = self._rdns_from_sequence(args)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipapython/dn.py", line 1263, in _rdns_from_sequence
[Sat Dec 08 17:16:07 2012] [error]     rdn = self._rdn_from_value(item)
[Sat Dec 08 17:16:07 2012] [error]   File "/usr/lib/python2.6/site-packages/ipapython/dn.py", line 1257, in _rdn_from_value
[Sat Dec 08 17:16:07 2012] [error]     value.__class__.__name__)
[Sat Dec 08 17:16:07 2012] [error] TypeError: must be str,unicode,tuple, or RDN, got NoneType instead
[Sat Dec 08 17:16:07 2012] [error] ipa: INFO: admin: netgroup_mod(u'testng1', setattr=(u'memberuser=',), rights=False, all=False, raw=False, version=u'2.46'): TypeError

Comment 2 Dmitri Pal 2012-12-14 01:01:18 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3301

Comment 3 RHEL Program Management 2012-12-17 06:48:36 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Xiyang Dong 2013-11-08 15:34:07 UTC
Verified:
[root@rhel7 ipa-netgroup-cli]# rpm -q ipa-server
ipa-server-3.2.2-1.el7.x86_64

[root@rhel7 ipa-netgroup-cli]# ipa netgroup-add testng1 --desc="test netgroup"
------------------------
Added netgroup "testng1"
------------------------
  Netgroup name: testng1
  Description: test netgroup
  NIS domain name: testrelm.com
  IPA unique ID: f487a662-4884-11e3-9e0f-5254008fd102
[root@rhel7 ipa-netgroup-cli]# ipa netgroup-add-member testng1 --users=admin
  Netgroup name: testng1
  Description: test netgroup
  NIS domain name: testrelm.com
  Member User: admin
-------------------------
Number of members added 1
-------------------------
[root@rhel7 ipa-netgroup-cli]# ipa netgroup-mod testng1 --setattr=memberuser=""
---------------------------
Modified netgroup "testng1"
---------------------------
  Netgroup name: testng1
  Description: test netgroup
  NIS domain name: testrelm.com
[root@rhel7 ipa-netgroup-cli]# ipa netgroup-mod testng1 --setattr=memberhost=""
ipa: ERROR: no modifications to be performed

Comment 6 Martin Kosek 2015-01-16 15:17:24 UTC
This issue is not reproducible with current FreeIPA/IdM version (4.1):

# ipa netgroup-add testng1 --desc=desc
------------------------
Added netgroup "testng1"
------------------------
  Netgroup name: testng1
  Description: desc
  NIS domain name: mkosek-f21.test
  IPA unique ID: 064533f2-9d2e-11e4-b15d-001a4a104e33

# ipa netgroup-mod --setattr=memberuser="" testng1
ipa: ERROR: no modifications to be performed

# ipa netgroup-mod --setattr=memberhost="" testng1
ipa: ERROR: no modifications to be performed


Closing the bug.


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