Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 796390

Summary: ipa netgroup-add with both --desc and --addattr=description returns internal error
Product: Red Hat Enterprise Linux 6 Reporter: Scott Poore <spoore>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.3CC: jgalipea, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:09:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Poore 2012-02-22 19:42:42 UTC
Description of problem:

ipa netgroup-add returns an internal error when both --desc and --addattr=description are used.

# ipa netgroup-add testng-002 --desc=testng-002 --nisdomain=mynisdom --addattr=description=DESCRIPTION
ipa: ERROR: an internal error has occurred

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

389-ds-base-1.2.10.1-1.el6.x86_64
389-ds-base-libs-1.2.10.1-1.el6.x86_64
ipa-server-2.2.0-102.20120220T2339zgit7fe095c.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.  <setup ipa server>
2.  kinit admin
3.  ipa netgroup-add testnetgroup --desc=test --addattr=description=testdesc
  
Actual results:

# ipa netgroup-add testnetgroup --desc=test --addattr=description=testdesc
ipa: ERROR: an internal error has occurred

Expected results:

I would expect a message more like this to be returned:

# ipa netgroup-add testnetgroup --desc=test --desc=testdesc
ipa: ERROR: invalid 'description': Only one value is allowed

Additional info:

log entries from /var/log/httpd/error_log:

[Wed Feb 22 13:41:01 2012] [error] ipa: ERROR: non-public: AttributeError: 'unicode' object has no attribute 'extend'
[Wed Feb 22 13:41:01 2012] [error] Traceback (most recent call last):
[Wed Feb 22 13:41:01 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 232, in wsgi_execute
[Wed Feb 22 13:41:01 2012] [error]     result = self.Command[name](*args, **options)
[Wed Feb 22 13:41:01 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 438, in __call__
[Wed Feb 22 13:41:01 2012] [error]     ret = self.run(*args, **options)
[Wed Feb 22 13:41:01 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 696, in run
[Wed Feb 22 13:41:01 2012] [error]     return self.execute(*args, **options)
[Wed Feb 22 13:41:01 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 903, in execute
[Wed Feb 22 13:41:01 2012] [error]     self.process_attr_options(entry_attrs, None, keys, options)
[Wed Feb 22 13:41:01 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 833, in process_attr_options
[Wed Feb 22 13:41:01 2012] [error]     entry_attrs.setdefault(attr, []).extend(adddict[attr])
[Wed Feb 22 13:41:01 2012] [error] AttributeError: 'unicode' object has no attribute 'extend'
[Wed Feb 22 13:41:01 2012] [error] ipa: INFO: admin: netgroup_add(u'testnetgroup', description=u'test', addattr=(u'description=testdesc',), all=False, raw=False, version=u'2.26'): AttributeError

Comment 2 Martin Kosek 2012-02-23 09:39:20 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2429

Comment 4 Rob Crittenden 2012-09-17 15:11:15 UTC
Fixed upstream.

master: cd7a85c12cf6b5455e40fd5440205ff2c5785a62

ipa-3-0: b2bbecf6aa3feb3e28911d9fa221ed81ba83abb3

Comment 7 Scott Poore 2012-11-09 17:58:08 UTC
Verified.

Version ::

ipa-server-3.0.0-7.el6.x86_64

Manual Test Results ::

[root@rhel6-1 ~]# ipa netgroup-add testnetgroup --desc=test --addattr=description=testdesc
ipa: ERROR: description: Only one value allowed.

Comment 9 errata-xmlrpc 2013-02-21 09:09:59 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