Bug 723624

Summary: Regression: Internal Error: Adding Host Groups
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.1CC: benl, grajaiya, mkosek
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.1.0-1.el6 Doc Type: Bug Fix
Doc Text:
Do not document
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 18:41:32 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 Jenny Severance 2011-07-20 17:50:36 UTC
Description of problem:

Adding new host groups is causing internal error with latest ipa-server build.
The hostgroup is added successfully though

# ipa hostgroup-add  --desc="hostgrp1" "hostgrp1"
ipa: ERROR: an internal error has occurred

[root@apollo tasks]# echo $?
1

[root@apollo tasks]# ipa hostgroup-find hostgrp1
-------------------
1 hostgroup matched
-------------------
  Host-group: hostgrp1
  Description: hostgrp1
----------------------------
Number of entries returned 1

errors_log:

[Wed Jul 20 13:45:38 2011] [error] ipa: ERROR: non-public: UnboundLocalError: local variable 'newentry' referenced before assignment
[Wed Jul 20 13:45:38 2011] [error] Traceback (most recent call last):
[Wed Jul 20 13:45:38 2011] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 220, in wsgi_execute
[Wed Jul 20 13:45:38 2011] [error]     result = self.Command[name](*args, **options)
[Wed Jul 20 13:45:38 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 425, in __call__
[Wed Jul 20 13:45:38 2011] [error]     ret = self.run(*args, **options)
[Wed Jul 20 13:45:38 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 731, in run
[Wed Jul 20 13:45:38 2011] [error]     return self.execute(*args, **options)
[Wed Jul 20 13:45:38 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 726, in execute
[Wed Jul 20 13:45:38 2011] [error]     dn = callback(ldap, dn, entry_attrs, *keys, **options)
[Wed Jul 20 13:45:38 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.py", line 104, in post_callback
[Wed Jul 20 13:45:38 2011] [error]     entry_from_entry(entry_attrs, newentry)
[Wed Jul 20 13:45:38 2011] [error] UnboundLocalError: local variable 'newentry' referenced before assignment


From today's acceptance tests:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hostgroup-cli-01: Add Host Groups
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [13:30:36] ::  Executing: ipa hostgroup-add --desc="hostgrp1" "hostgrp1"
ipa: ERROR: an internal error has occurred
:: [13:30:37] ::  WARNING: Adding new Host Group "hostgrp1" failed.
:: [   FAIL   ] :: Adding host group "hostgrp1" (Expected 0, got 1)
:: [13:30:37] ::  Executing: ipa hostgroup-add --desc="host group 2" "host group 2"
ipa: ERROR: an internal error has occurred
:: [13:30:39] ::  WARNING: Adding new Host Group "host group 2" failed.
:: [   FAIL   ] :: Adding host group "host group 2" (Expected 0, got 1)
:: [13:30:39] ::  Executing: ipa hostgroup-add --desc="host-group_3" "host-group_3"
ipa: ERROR: an internal error has occurred
:: [13:30:41] ::  WARNING: Adding new Host Group "host-group_3" failed.
:: [   FAIL   ] :: Adding host group "host-group_3" (Expected 0, got 1)
:: [13:30:41] ::  Executing: ipa hostgroup-add --desc="parent" "parent"
ipa: ERROR: an internal error has occurred
:: [13:30:42] ::  WARNING: Adding new Host Group "parent" failed.
:: [   FAIL   ] :: Adding host group "parent" (Expected 0, got 1)
:: [13:30:42] ::  Executing: ipa hostgroup-add --desc="child" "child"
ipa: ERROR: an internal error has occurred
:: [13:30:44] ::  WARNING: Adding new Host Group "child" failed.
:: [   FAIL   ] :: Adding host group "child" (Expected 0, got 1)
'b2d43ac4-8656-48fa-9d58-82d3e20ea2d9'
ipa-hostgroup-cli-01 result: FAIL



Version-Release number of selected component (if applicable):
# rpm -qi ipa-server
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.99                            Vendor: (none)
Release     : 3.20110720T0524zgit9821160.el6   Build Date: Wed 20 Jul 2011 01:37:16 AM EDT
Install Date: Wed 20 Jul 2011 09:59:08 AM EDT      Build Host: goofy-vm16.dsdev.sjc.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.99-3.20110720T0524zgit9821160.el6.src.rpm
Size        : 3309048                          License: GPLv3+
Signature   : (none)
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server
Description :
IPA is an integrated solution to provide centrally managed Identity (machine,
user, virtual machines, groups, authentication credentials), Policy
(configuration settings, access control information) and Audit (events,
logs, analysis thereof). If you are installing an IPA server you need
to install this package (in other words, most people should NOT install
this package).


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Rob Crittenden 2011-07-20 18:12:17 UTC
master: 7ce57e38c43b4a1f3e422a644760f94043058feb

Comment 6 Rob Crittenden 2011-10-31 21:03:52 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Do not document

Comment 7 Gowrishankar Rajaiyan 2011-11-02 18:16:55 UTC
# ipa hostgroup-add hostgrp1
Description: hostgroup 1
--------------------------
Added hostgroup "hostgrp1"
--------------------------
  Host-group: hostgrp1
  Description: hostgroup 1



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hostgroup-cli-01: Add Host Groups
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [14:55:39] ::  Executing: ipa group-add --desc="hostgrp1" "hostgrp1"
--------------------------
Added hostgroup "hostgrp1"
--------------------------
  Host-group: hostgrp1
  Description: hostgrp1
:: [14:55:40] ::  Adding new Host Group "hostgrp1" successful.
:: [   PASS   ] :: Adding host group "hostgrp1"
:: [14:55:41] ::  Executing: ipa group-add --desc="host group 2" "host group 2"
------------------------------
Added hostgroup "host group 2"
------------------------------
  Host-group: host group 2
  Description: host group 2
:: [14:55:42] ::  Adding new Host Group "host group 2" successful.
:: [   PASS   ] :: Adding host group "host group 2"
:: [14:55:42] ::  Executing: ipa group-add --desc="host-group_3" "host-group_3"
------------------------------
Added hostgroup "host-group_3"
------------------------------
  Host-group: host-group_3
  Description: host-group_3
:: [14:55:44] ::  Adding new Host Group "host-group_3" successful.
:: [   PASS   ] :: Adding host group "host-group_3"
:: [14:55:44] ::  Executing: ipa group-add --desc="parent" "parent"
------------------------
Added hostgroup "parent"
------------------------
  Host-group: parent
  Description: parent
:: [14:55:46] ::  Adding new Host Group "parent" successful.
:: [   PASS   ] :: Adding host group "parent"
:: [14:55:46] ::  Executing: ipa group-add --desc="child" "child"
-----------------------
Added hostgroup "child"
-----------------------
  Host-group: child
  Description: child
:: [14:55:47] ::  Adding new Host Group "child" successful.
:: [   PASS   ] :: Adding host group "child"
'f4233a9c-bfe7-490e-b19c-6e80d27e4ad8'
ipa-hostgroup-cli-01 result: PASS
   metric: 0
   Log: /tmp/beakerlib-3401817/journal.txt
    Info: Searching AVC errors produced since 1319741739.28 (Thu Oct 27 14:55:39 2011)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.AQhtw9
:
   AvcLog: /mnt/testarea/tmp.AQhtw9

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Verified. Version: ipa-server-2.1.3-7.el6.x86_64

Comment 8 errata-xmlrpc 2011-12-06 18:41:32 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-2011-1533.html