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 918261 - Some managed netgroups are not suppressed in host and hostgroup commands output
Summary: Some managed netgroups are not suppressed in host and hostgroup commands output
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 19:09 UTC by Namita Soman
Modified: 2014-06-18 00:07 UTC (History)
3 users (show)

Fixed In Version: ipa-3.2.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:57:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Namita Soman 2013-03-05 19:09:40 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/3464

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.

Comment 1 Namita Soman 2013-03-05 19:18:11 UTC
Please add steps to verify

Comment 2 Jan Cholasta 2013-03-06 07:59:54 UTC
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
  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

Comment 4 Xiyang Dong 2013-08-06 18:16:34 UTC
Verified.

Version : ipa-server-3.2.2-1.el7.x86_64


Automated Test Results :

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-host-bugzilla-003: BZ918261 - Some managed netgroups are not suppressed in host and hostgroup commands output
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-------------------------------------
Added host "mytesthost1.testrelm.com"
-------------------------------------
  Host name: mytesthost1.testrelm.com
  Principal name: host/mytesthost1.testrelm.com
  Password: False
  Keytab: False
  Managed by: mytesthost1.testrelm.com
:: [ 13:42:59 ] ::  Adding new host mytesthost1.testrelm.com successful with force option.
:: [ 13:42:59 ] ::  Executing: ipa group-add --desc="mytesthostgroup1" "mytesthostgroup1"
----------------------------------
Added hostgroup "mytesthostgroup1"
----------------------------------
  Host-group: mytesthostgroup1
  Description: mytesthostgroup1
:: [ 13:43:00 ] ::  Adding new Host Group "mytesthostgroup1" successful.
:: [ 13:43:00 ] ::  Executing: ipa group-add --desc="mytesthostgroup2" "mytesthostgroup2"
----------------------------------
Added hostgroup "mytesthostgroup2"
----------------------------------
  Host-group: mytesthostgroup2
  Description: mytesthostgroup2
:: [ 13:43:02 ] ::  Adding new Host Group "mytesthostgroup2" successful.
:: [ 13:43:02 ] ::  Executing: ipa hostgroup-add-member --hosts=mytesthost1.testrelm.com "mytesthostgroup2"
  Host-group: mytesthostgroup2
  Description: mytesthostgroup2
  Member hosts: mytesthost1.testrelm.com
-------------------------
Number of members added 1
-------------------------
:: [ 13:43:03 ] ::  Adding hosts "mytesthost1.testrelm.com" to host group mytesthostgroup2 successful.
:: [   PASS   ] :: Adding host mytesthost1.testrelm.com to host group "mytesthostgroup2"
:: [ 13:43:03 ] ::  Executing: ipa hostgroup-add-member --hostgroups=mytesthostgroup2 "mytesthostgroup1"
  Host-group: mytesthostgroup1
  Description: mytesthostgroup1
  Member host-groups: mytesthostgroup2
  Indirect Member hosts: mytesthost1.testrelm.com
-------------------------
Number of members added 1
-------------------------
:: [ 13:43:06 ] ::  Adding hostgroups "mytesthostgroup2" to host group mytesthostgroup1 successful.
:: [   PASS   ] :: Adding host group mytesthostgroup2 to host group "mytesthostgroup1"
  Member of host-groups: mytesthostgroup2
:: [ 13:43:07 ] ::  Value of Member of host-groups: for mytesthost1.testrelm.com is as expected - Member of host-groups: mytesthostgroup2
:: [   PASS   ] :: Verifying host-show has correct info.
  Indirect Member of host-group: mytesthostgroup1
:: [ 13:43:08 ] ::  Value of Indirect Member of host-group: for mytesthost1.testrelm.com is as expected - Indirect Member of host-group: mytesthostgroup1
:: [   PASS   ] :: Verifying host-show has correct info.
:: [ 13:43:09 ] ::  ERROR: mytesthost1.testrelm.com verification failed: Value of Indirect Member of netgroup: - GOT:  EXPECTED: mytesthostgroup2
:: [   PASS   ] :: Verifying host-show has correct info.
---------------------------------------
Deleted host "mytesthost1.testrelm.com"
---------------------------------------
:: [ 13:43:10 ] ::  Host mytesthost1.testrelm.com deleted successfully.
------------------------------------
Deleted hostgroup "mytesthostgroup1"
------------------------------------
:: [ 13:43:12 ] ::  Host group mytesthostgroup1 deleted successfully.
------------------------------------
Deleted hostgroup "mytesthostgroup2"
------------------------------------
:: [ 13:43:13 ] ::  Host group mytesthostgroup2 deleted successfully.

Comment 5 Ludek Smid 2014-06-13 12:57:47 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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