Bug 849119 - Same systems get registered for diffferent environment
Same systems get registered for diffferent environment
Status: CLOSED UPSTREAM
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.0
x86_64 Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Tom McKay
Katello QA List
:
Depends On: 848716
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 07:30 EDT by Tom McKay
Modified: 2013-03-27 16:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 848716
Environment:
Last Closed: 2012-09-10 11:28:27 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)

  None (edit)
Description Tom McKay 2012-08-17 07:30:42 EDT
+++ This bug was initially created as a clone of Bug #848716 +++

Created attachment 604847 [details]
register same system to different environment

Description of problem:
Registering the same system for different environment is allowed

Version-Release number of selected component (if applicable):
[root@dell-pesc1435-01 ~]# rpm -qa | grep katello
katello-all-1.0.5-1.fc16.noarch
katello-glue-candlepin-1.0.5-1.fc16.noarch
katello-configure-1.1.3-1.fc16.noarch
katello-glue-pulp-1.0.5-1.fc16.noarch
katello-1.0.5-1.fc16.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-selinux-1.0.1-1.fc16.noarch
katello-cli-headpin-1.1.0-1.git.14.d10e8a3.fc16.noarch
katello-glue-foreman-1.0.5-1.fc16.noarch
katello-certs-tools-1.1.8-1.fc16.noarch
katello-cli-common-1.1.1-1.fc16.noarch
katello-common-1.0.5-1.fc16.noarch


How reproducible:
yum install -y katello-all thumbslug
katello-configure --deployment=headpin

Steps to Reproduce:
1.login to the system that is to be registered
2.install the candlepin cert pacakages
3.register and subscribe the system for an organization, environment
  using
4.subscription-manager register --user username --password password --org ORG --environment ENV --autosubscribe --force
  
5.Register the same system using the above command again but with different 
  environment value


Actual results:
The same system is registered for different environment

Expected results:
A system can be registered uniquely for a particular environment only. 




Additional info:

screen shot attached.

--- Additional comment from esammons@redhat.com on 2012-08-16 09:43:48 EDT ---

Can you confirm that the system is still registered in the first environment as well as the second.

--- Additional comment from tkolhar@redhat.com on 2012-08-17 02:19:50 EDT ---


List of system registered 
[root@dell-pesc1435-01 ~]# headpin -u admin -p admin system list --org ACME_Corporation
--------------------------------------------------------------------------------
                  Systems List For Org [ ACME_Corporation ]

 Name                                Uuid                                   Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 dhcp201-123.englab.pnq.redhat.com   a64b46b2-c6e0-4a48-b939-0849d852b494   None                          
 dhcp201-181.englab.pnq.redhat.com   11902057-044d-40ba-970c-f4b46441c73e   None                          
 dhcp201-181.englab.pnq.redhat.com   f2957fe0-8dab-4084-a5d5-4cef89b870c6   None                          



System facts :

http://pastebin.test.redhat.com/102446                      

Following are few details provided .
Please, any other details are needed to confirm the system registration

--- Additional comment from tkolhar@redhat.com on 2012-08-17 02:24:34 EDT ---

List of system registered 
[root@dell-pesc1435-01 ~]# headpin -u admin -p admin system list --org ACME_Corporation
--------------------------------------------------------------------------------
                  Systems List For Org [ ACME_Corporation ]

 Name                                Uuid                                   Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 dhcp201-123.englab.pnq.redhat.com   a64b46b2-c6e0-4a48-b939-0849d852b494   None                          
 dhcp201-181.englab.pnq.redhat.com   11902057-044d-40ba-970c-f4b46441c73e   None                          
 dhcp201-181.englab.pnq.redhat.com   f2957fe0-8dab-4084-a5d5-4cef89b870c6   None                          



System facts :

http://pastebin.test.redhat.com/102446                      

Following are few details provided .
Please, let me know if any other details are needed to confirm the system registration
Comment 2 Tom McKay 2012-09-10 11:28:27 EDT
Cannot reproduce
Comment 3 Tom McKay 2012-09-10 12:59:01 EDT
Cannot reproduce
Comment 5 Tazim Kolhar 2012-09-14 04:12:34 EDT
VERIFIED with packages :
[root@ibm-himalaya script]# rpm -qa | grep katello
katello-cli-common-1.1.8-1.git.2.a0908e7.fc16.noarch
katello-all-1.1.12-1.git.26.d683e16.fc16.noarch
katello-cli-headpin-1.1.1-1.git.59.e8fe8d3.fc16.noarch
katello-glue-candlepin-1.1.12-1.git.26.d683e16.fc16.noarch
katello-glue-pulp-1.1.12-1.git.26.d683e16.fc16.noarch
katello-1.1.12-1.git.26.d683e16.fc16.noarch
katello-certs-tools-1.1.8-1.fc16.noarch
katello-selinux-1.1.1-1.fc16.noarch
katello-glue-foreman-1.1.12-1.git.26.d683e16.fc16.noarch
katello-configure-1.1.9-1.fc16.noarch
katello-common-1.1.12-1.git.26.d683e16.fc16.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-repos-1.1.2-1.fc16.noarch


1. Intially, registered the system using activation key :
# subscription-manager register --name 'localhost-actkey' --org ACME_Corporation --activationkey act_key --autosubscribe --force
The system has been registered with id: 0f07967f-2701-418e-83a2-fdf9db4ef87d 
Installed Product Current Status:

ProductName:         	Red Hat Enterprise Linux Server
Status:               	Not Subscribed           



2. Later, tried to re-register the same system :
# subscription-manager register --username admin --password admin --org ACME_Corporation --autosubscribe --force
The system with UUID 0f07967f-2701-418e-83a2-fdf9db4ef87d has been unregistered
The system has been registered with id: 3f47572e-d81d-4ab9-b4b7-8817d5d63504 
Installed Product Current Status:

ProductName:         	Red Hat Enterprise Linux Server
Status:               	Not Subscribed          




3. On SAM server :


# headpin -u admin -p admin system list --org ACME_Corporation
--------------------------------------------------------------------------------
                  Systems List For Org [ ACME_Corporation ]

 Name                                    Uuid                                   Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 hp-dl140g2-01.rhts.eng.rdu.redhat.com   3f47572e-d81d-4ab9-b4b7-8817d5d63504   None

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