Bug 499464
| Summary: | ipa hostgroup-add-member: return code 0 even on error | ||
|---|---|---|---|
| Product: | [Retired] freeIPA | Reporter: | Jenny Severance <jgalipea> |
| Component: | ipa-admintools | Assignee: | Rob Crittenden <rcritten> |
| Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.0 | CC: | benl, dpal, jgalipea |
| Target Milestone: | v2 release | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | freeipa-2.0.0-1.fc15 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-03-28 09:29:29 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 431020 | ||
This is marked modified, but does not have any code change / fix associated. The behavior is still that the utility returns 0 , but outputs that the host in question failed to be added. The update is in the task. I don't believe a new build has been done yet.
It works for me:
$ ipa hostgroup-add-member --hosts=foo hg1
Host-group: hg1
Description: hg1
Failed members:
hosts: foo
hostgroups:
-------------------------
Number of members added 0
-------------------------
$ echo $?
1
|
Description of problem: In this case the host does not exist: [root@jennyv2 /]# ipa hostgroup-add-member --hosts=jennyv3.bos.redhat.com test These entries failed to add to the group: 'jennyv3.bos.redhat.com' [root@jennyv2 /]# echo $? 0 In this case the host is already a member: [root@jennyv2 /]# ipa hostgroup-add-member --hosts=jennyv4.bos.redhat.com test These entries failed to add to the group: 'cn=jennyv4.bos.redhat.com,cn=computers,cn=accounts,dc=bos,dc=redhat,dc=com' [root@jennyv2 /]# echo $? 0 Version-Release number of selected component (if applicable): 2.0 How reproducible: always Steps to Reproduce: 1. add a host 2. add a host group 3. add the host to the host group 4. test as the above steps Actual results: generic error message and return code as if successful. Expected results: a better reason as to why the host member was not added and error code returned. Additional info: