Bug 501377 - ipa hostgroup-add-member return code 0 trying to add self as a member
ipa hostgroup-add-member return code 0 trying to add self as a member
Status: CLOSED ERRATA
Product: freeIPA
Classification: Community
Component: ipa-admintools (Show other bugs)
2.0
All Linux
low Severity low
: v2 release
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
Depends On:
Blocks: 431020
  Show dependency treegraph
 
Reported: 2009-05-18 16:21 EDT by Jenny Galipeau
Modified: 2015-01-04 18:38 EST (History)
3 users (show)

See Also:
Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-27 03:16:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jenny Galipeau 2009-05-18 16:21:08 EDT
Description of problem:
ipa hostgroup-add-member returns 0 , when attempting to add self as a member.

[root@jennyv2 ~]# ipa hostgroup-add-member --hostgroups="child" child
These entries failed to add to the group:
        'cn=child,cn=hostgroups,cn=accounts,dc=bos,dc=redhat,dc=com'
[root@

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

How reproducible:
always

Steps to Reproduce:
1.  ipa hostgroup-add --description="blah blah" group1
2.  ipa hostgroup-add-member --hostgroups="group1" group1
3.
  
Actual results:
Vague message returned and return code is 0

Expected results:
Better message returned and return code of non-zero

Additional info:
Comment 2 Rob Crittenden 2010-09-21 15:28:02 EDT
https://fedorahosted.org/freeipa/ticket/273
Comment 3 Jenny Galipeau 2011-06-10 13:51:18 EDT
verified

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server

# ipa hostgroup-add-member --hostgroups="group1" group1
  Host-group: group1
  Description: test
  Failed members: 
    hostgroup: group1: A group may not be added as a member of itself
-------------------------
Number of members added 0
-------------------------
[root@dhcp-100-19-202 data]# echo $?
1

automated regression test added

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