#3464 Some managed netgroups are not suppressed in host and hostgroup commands output
Closed: Fixed None Opened 11 years ago by jcholast.

This is because the suppress_netgroup_memberof method of both host and hostgroup classes is broken - it removes values from a list while the list is being iterated, which causes some items of the list to be skipped.


How to reproduce:

$ ipa host-add host.example.com

$ ipa hostgroup-add hostgroup1 --desc Test

$ ipa hostgroup-add hostgroup2 --desc Test

$ ipa hostgroup-add-member hostgroup2 --hosts host.example.com

$ ipa hostgroup-add-member hostgroup1 --hostgroups hostgroup2

$ ipa host-show host.example.com
  Host name: host.example.com
  Principal name: host/host.example.com@EXAMPLE.COM
  Password: False
  Member of host-groups: hostgroup2
  Roles: Entitlement Compliance
  Indirect Member of netgroup: hostgroup2        # <-- this line should not be here
  Indirect Member of host-group: hostgroup1
  Keytab: True
  Managed by: host.example.com

Metadata Update from @jcholast:
- Issue assigned to jcholast
- Issue set to the milestone: FreeIPA 3.2 - 2013/03

7 years ago

Login to comment on this ticket.

Metadata