Bug 848716 - Same systems get registered for diffferent environment
Same systems get registered for diffferent environment
Status: CLOSED UPSTREAM
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Tom McKay
Tazim Kolhar
: Triaged
Depends On:
Blocks: 849119
  Show dependency treegraph
 
Reported: 2012-08-16 05:35 EDT by Tazim Kolhar
Modified: 2016-04-25 20:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 849119 (view as bug list)
Environment:
Last Closed: 2012-09-10 11:28:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
register same system to different environment (84.22 KB, image/png)
2012-08-16 05:35 EDT, Tazim Kolhar
no flags Details
katello-debug reports (63.44 KB, application/x-gzip)
2012-08-23 05:58 EDT, Tazim Kolhar
no flags Details
Same System registered to different environments (77.19 KB, image/png)
2012-08-23 06:00 EDT, Tazim Kolhar
no flags Details

  None (edit)
Description Tazim Kolhar 2012-08-16 05:35:22 EDT
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.
Comment 1 Eric Sammons 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.
Comment 2 Tazim Kolhar 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
Comment 3 Tazim Kolhar 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 4 Tom McKay 2012-08-20 11:00:51 EDT
Need to know how to reproduce and/or log files. Please attach katello-debug output. Version of candlepin on the server as well as version of subscription-manager also useful.
Comment 5 Tazim Kolhar 2012-08-23 05:58:52 EDT
Created attachment 606496 [details]
katello-debug reports

Candlepin Version :
[root@dell-pesc430-03 ~]# rpm -qa | grep candlepin
candlepin-0.7.6.2-1.fc16.noarch
candlepin-tomcat6-0.7.6.2-1.fc16.noarch
katello-glue-candlepin-1.1.6-1.git.2.b44e55c.fc16.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch

Subscription-Manager Version :
[root@dhcp201-125 ~]# rpm -qa | grep subscription-manager
subscription-manager-0.96.17-1.el6.x86_64


Steps to reproduce :

On a SAM Server :
installation sam as follows :
1.) $ yum install -y katello-all thumbslug
    $ katello-configure --deployment=headpin

2.) On Consumer (System) :
    $ rpm -ivh http://[SAM]/pub/candlepin-cert-consumer-[SAM]-1.0-1.noarch.rpm
    $ subscription-manager register --user admin --password admin --org       
      [ Org ] --environment [environment] --autosubscribe 

    $ subscription-manger register --user admin --password admin --org
      [ Org ] --environment [ environment ] --autosubscribe --force
    
    
3.) Login to the 
    SAM WEBUI :
    Navigate to Systems

    Same system registered for different environment
Comment 6 Tazim Kolhar 2012-08-23 06:00:10 EDT
Created attachment 606498 [details]
Same System registered to different environments
Comment 7 Tom McKay 2012-09-10 11:28:57 EDT
Cannot reproduce
Comment 8 Tazim Kolhar 2012-09-14 04:11:42 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.