[Freeipa-devel] [PATCH] 863 netgroups memberof

Rob Crittenden rcritten at redhat.com
Wed Aug 31 12:22:48 UTC 2011


Martin Kosek wrote:
> On Tue, 2011-08-30 at 23:50 -0400, Rob Crittenden wrote:
>> This was spawned by another recent patch I pushed that showed netgroups
>> that a hostgroup is a member of. We want to suppress the automatic
>> netgroup that is created with hostgroups.
>>
>> rob
>
> NACK. I see several issues with the patch:
>
> 1) Lint problem:
> ipalib/plugins/hostgroup.py:107: [E0602, hostgroup.suppress_netgroup_memberof] Undefined variable 'NotFound'
>
> 2) When there is not hostgroup, `ipa hostgroup-find` throws an
> exception:
> [Wed Aug 31 04:36:11 2011] [error] ipa: ERROR: non-public: UnboundLocalError: local variable 'dn' referenced before assignment
> [Wed Aug 31 04:36:11 2011] [error] Traceback (most recent call last):
> [Wed Aug 31 04:36:11 2011] [error]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 223, in wsgi_execute
> [Wed Aug 31 04:36:11 2011] [error]     result = self.Command[name](*args, **options)
> [Wed Aug 31 04:36:11 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 432, in __call__
> [Wed Aug 31 04:36:11 2011] [error]     ret = self.run(*args, **options)
> [Wed Aug 31 04:36:11 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 738, in run
> [Wed Aug 31 04:36:11 2011] [error]     return self.execute(*args, **options)
> [Wed Aug 31 04:36:11 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/baseldap.py", line 1596, in execute
> [Wed Aug 31 04:36:11 2011] [error]     callback(ldap, entries, truncated, *args, **options)
> [Wed Aug 31 04:36:11 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/hostgroup.py", line 163, in post_callback
> [Wed Aug 31 04:36:11 2011] [error]     return dn
> [Wed Aug 31 04:36:11 2011] [error] UnboundLocalError: local variable 'dn' referenced before assignment
>
> 3) JR's automember tests that were pushed today will need to have
> memberof_netgroup removed too.
>
> Martin
>

All issues addressed.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rcrit-863-2-hostgroup.patch
Type: text/x-patch
Size: 14117 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110831/d55c8f31/attachment.bin>


More information about the Freeipa-devel mailing list