Bug 990487 - Headpin Nightly : Attempt to add a already added system to the same system group works fine
Headpin Nightly : Attempt to add a already added system to the same system gr...
Status: CLOSED NOTABUG
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
Nightly
x86_64 Linux
unspecified Severity low (vote)
: Beta
: --
Assigned To: Christine Fouant
Tazim Kolhar
http://projects.theforeman.org/issues...
: Reopened, Triaged
Depends On:
Blocks: sam20-tracker 1010997
  Show dependency treegraph
 
Reported: 2013-07-31 05:48 EDT by Tazim Kolhar
Modified: 2016-04-25 20:59 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1010997 (view as bug list)
Environment:
Last Closed: 2016-04-22 16:48:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 6692 None None None 2016-04-22 12:21 EDT

  None (edit)
Description Tazim Kolhar 2013-07-31 05:48:18 EDT
Description of problem:
 Attempt to add a already added system to the same system group works fine

Version-Release number of selected component (if applicable):
# rpm -qa | grep katello
katello-certs-tools-1.4.2-1.el6.noarch
katello-glue-candlepin-1.4.2-1.git.987.b81455e.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-1.4.2-1.git.137.fea0d84.el6.noarch
katello-cli-common-1.4.2-1.git.137.fea0d84.el6.noarch
katello-glue-elasticsearch-1.4.2-1.git.987.b81455e.el6.noarch
katello-headpin-1.4.2-1.git.987.b81455e.el6.noarch
signo-katello-0.0.9-1.el6.noarch
katello-configure-1.4.3-1.git.67.f71e590.el6.noarch
katello-common-1.4.2-1.git.987.b81455e.el6.noarch
katello-headpin-all-1.4.2-1.git.987.b81455e.el6.noarch
katello-selinux-1.4.3-1.git.4.99dc194.el6.noarch
katello-repos-1.4.2-1.el6.noarch


How reproducible:
# yum install -y katello-headpin-all
# katello-configure --deployment=headpin --user-pass=***

Steps to Reproduce:
1.Add system to system group 
# headpin -u admin -p **** system_group add_systems --name test_sys_group --org ACME_Corporation --system_uuids  ae1deb65-db5e-4562-a37f-87368195bdd0 
Successfully added systems to system group [ test_sys_group ]

2.So a system is added
# headpin -u admin -p **** system_group systems --org ACME_Corporation --name test_sys_group
--------------------------------------------------------------------------------
  Systems within System Group [ test_sys_group ] For Org [ ACME_Corporation ]

ID                                   Name                                        
--------------------------------------------------------------------------------
ae1deb65-db5e-4562-a37f-87368195bdd0 ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com 
8ac1fcfc-3c82-41a0-930d-de32a7b793dc hp-dl320g6-01.rhts.eng.bos.redhat.com       


3.Try to add the same system
# headpin -u admin -p **** system_group add_systems --name test_sys_group --org ACME_Corporation --system_uuids  ae1deb65-db5e-4562-a37f-87368195bdd0 
Successfully added systems to system group [ test_sys_group ]


Actual results:
The command works fine

Expected results:
The command should fail stating 'System [ UUID ] already added to the system group'

Additional info:
Comment 4 Christine Fouant 2014-07-18 10:46:39 EDT
Created redmine issue http://projects.theforeman.org/issues/6692 from this bug
Comment 5 Christine Fouant 2014-07-18 13:23:07 EDT
This behavior works on a few other commands, such as adding hostgroups to an organization, so it seems like the functionality should work this way.  Rather than throwing an error, if a content-host already exists in a host-collection, it should not throw an error if user tries to add it again.
Comment 6 sthirugn@redhat.com 2014-07-18 14:43:29 EDT
I disagree with the recommended solution.  If this problems happen in other commands, we need to fix them all.
Comment 7 Tom McKay 2014-07-21 10:13:42 EDT
Moving back to NEW as the implications of this will need a full design and inventory of all associations.
Comment 8 Bryan Kearney 2015-08-25 13:55:51 EDT
Upstream bug component is Content Management
Comment 9 Bryan Kearney 2015-08-25 13:57:34 EDT
Upstream bug component is Hammer
Comment 10 Bryan Kearney 2015-12-21 14:02:12 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/6692 has been closed
Comment 14 sthirugn@redhat.com 2016-04-22 16:48:03 EDT
This still behaves in the same way in Satellite-6.2-beta-snap-9.

hammer> host-collection add-host --host-ids=2,3 --id=1
The host(s) has been added
hammer> host-collection add-host --host-ids=2,3 --id=1
The host(s) has been added

I am going to close this bug as there are no customer complaints on this.  This can be reopened later as necessary.

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