Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1653330 - registering using subscription-manager with --name parameter doesnt work - the name is not overidden
Summary: registering using subscription-manager with --name parameter doesnt work - t...
Keywords:
Status: CLOSED DUPLICATE of bug 1344011
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-26 14:47 UTC by Ade Bradshaw
Modified: 2019-08-09 13:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-07 12:57:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ade Bradshaw 2018-11-26 14:47:27 UTC
Description of problem:
When registering a guest with an alternative name - the alternative name is ignored


Version-Release number of selected component (if applicable):
satellite-6.4.0-15.el7sat.noarch


How reproducible: 100%


Steps to Reproduce:
1. take a host with either no FQDN or a name other than the one you want it registered with
2. use subscription-manager with --name to provide a different name
3. watch subscription-manager confirm that it DID register with the new name
4. look in the Satelite UI/cli and see it did not register with this name

Actual results:
It registers with its actual hostname - ignoring the --name param


Expected results:
I register with the alternative name you privided




Additional info:
On the client
=============

[root@comdirect-test1 ~]# hostname
comdirect-test1
[root@comdirect-test1 ~]# hostname -f
comdirect-test1
[root@comdirect-test1 ~]# subscription-manager register --org="Adrian_Inc" --activationkey="ak-rhel7-server-library" --name comdirect-test1.lab.home.adrians.computer
The system has been registered with ID: afa484a5-7157-4dd4-8978-c63bc4b69d5a
The registered system name is: comdirect-test1.lab.home.adrians.computer
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@comdirect-test1 ~]# subscription-manager identity
system identity: afa484a5-7157-4dd4-8978-c63bc4b69d5a
name: comdirect-test1.lab.home.adrians.computer
org name: Adrian Inc
org ID: Adrian_Inc
environment name: Library/ccv-os-rhel7-server-base

On The Satellite
================

[root@sat6 ~]# hammer host list
----|----------------------------------------------|-----------------------|---------------------|---------------|-------------------|----------------------------|----------------------
ID  | NAME                                         | OPERATING SYSTEM      | HOST GROUP          | IP            | MAC               | CONTENT VIEW               | LIFECYCLE ENVIRONMENT
----|----------------------------------------------|-----------------------|---------------------|---------------|-------------------|----------------------------|----------------------
             
401 | comdirect-test1                              | RHEL Server 7.5       |                     | 10.10.10.39   | 00:1a:4a:16:01:23 | ccv-os-rhel7-server-base   | Library    


[root@sat6 ~]# hammer host info --name comdirect-test1
Id:                       401
Name:                     comdirect-test1
Organisation:             Adrian Inc
Location:                 Lab
Cert name:                comdirect-test1
Managed:                  no
Installed at:             
Last report:              
Network:                  
    IPv4 address: 10.10.10.39
    MAC:          00:1a:4a:16:01:23
Network interfaces:       
 1) Id:           926
    Identifier:   eth0
    Type:         interface (primary, provision)
    MAC address:  00:1a:4a:16:01:23
    IPv4 address: 10.10.10.39
    FQDN:         comdirect-test1
Operating system:         
    Architecture:           x86_64
    Operating System:       RHEL Server 7.5
    Build:                  no
    Custom partition table:
Parameters:               

All parameters:           
    enable-puppet5 => true
    enable-epel => false
Additional info:          
    Owner:      Anonymous Admin
    Owner Type: User
    Enabled:    yes
    Model:      RHEV Hypervisor
    Comment:
OpenSCAP Proxy:           
Content Information:      
    Content View:          
        ID:   6
        Name: ccv-os-rhel7-server-base
    Lifecycle Environment: 
        ID:   1
        Name: Library
    Content Source:        
        ID:   
        Name:
    Kickstart Repository:  
        ID:   
        Name:
    Applicable Packages:   354
    Upgradable Packages:   352
    Applicable Errata:     
        Enhancement: 16
        Bug Fix:     107
        Security:    24
Subscription Information: 
    UUID:                          afa484a5-7157-4dd4-8978-c63bc4b69d5a
    Last Checkin:                  2018-11-26 14:43:37 UTC
    Service Level:                 
    Release Version:               
    Autoheal:                      true
    Registered To:                 sat6.lab.home.adrians.computer
    Registered At:                 2018-11-26 14:43:34 UTC
    Registered by Activation Keys: 
     1) ak-rhel7-server-library
Host Collections:

Comment 3 Ade Bradshaw 2018-11-29 12:36:23 UTC
Just tested with bootstrap.py - using --fqdn 

This also failed, which is odd as I remember using this in the past and it worked. 

I tried with the version that is shipped in Sat 6.4 AND I tried with the version in github - neither worked

I shall re-produce on my home infra and provide more info

Comment 4 Ade Bradshaw 2018-11-30 06:26:07 UTC
OK, this is reproducible in my own lab also

On the client

 [root@sometihng ~]# hostname  -f
 sometihng
 [root@sometihng ~]# 



On the satellite before we start

 [root@sat6 ~]# hammer host list  | egrep "sometihng | realhostname.lab.home.adrians.computer"
 [root@sat6 ~]#



Now back on the client

 [root@sometihng ~]# ./bootstrap.py -s sat6.lab.home.adrians.computer -o "Adrian_Inc" -a "ak-rhel7-server-library" -L "Lab" --skip-foreman --no-remove-obsolete-packages --fqdn realhostname.lab.home.adrians.computer --force



And finally. after the cussess message, back to the Satellite to check

 [root@sat6 ~]# hammer host list  | egrep "sometihng | realhostname.lab.home.adrians.computer"
 415 | sometihng                                  | RHEL Server 7.5       |                     | 10.10.10.41   | 00:1a:4a:16:01:49 | ccv-os-rhel7-server-base   | Library

Comment 5 Ade Bradshaw 2018-11-30 06:28:54 UTC
Some additional info

[root@sometihng ~]# subscription-manager identity
system identity: d3a2c743-89f3-4e79-8225-9474d3caea85
name: realhostname.lab.home.adrians.computer
org name: Adrian Inc
org ID: Adrian_Inc
environment name: Library/ccv-os-rhel7-server-base




[root@sat6 ~]# hammer host info --name sometihng
Id:                       415
Name:                     sometihng
Organisation:             Adrian Inc
Location:                 Lab
Cert name:                sometihng
Managed:                  no
Installed at:             
Last report:              
Network:                  
    IPv4 address: 10.10.10.41
    MAC:          00:1a:4a:16:01:49
Network interfaces:       
 1) Id:           940
    Identifier:   eth0
    Type:         interface (primary, provision)
    MAC address:  00:1a:4a:16:01:49
    IPv4 address: 10.10.10.41
    FQDN:         sometihng
Operating system:         
    Architecture:           x86_64
    Operating System:       RHEL Server 7.5
    Build:                  no
    Custom partition table:
Parameters:               

All parameters:           
    enable-puppet5 => true
    enable-epel => false
Additional info:          
    Owner:      Anonymous Admin
    Owner Type: User
    Enabled:    yes
    Model:      RHEV Hypervisor
    Comment:
OpenSCAP Proxy:           
Content Information:      
    Content View:          
        ID:   6
        Name: ccv-os-rhel7-server-base
    Lifecycle Environment: 
        ID:   1
        Name: Library
    Content Source:        
        ID:   
        Name:
    Kickstart Repository:  
        ID:   
        Name:
    Applicable Packages:   345
    Upgradable Packages:   330
    Applicable Errata:     
        Enhancement: 15
        Bug Fix:     103
        Security:    21
Subscription Information: 
    UUID:                          d3a2c743-89f3-4e79-8225-9474d3caea85
    Last Checkin:                  2018-11-30 06:24:08 UTC
    Service Level:                 
    Release Version:               
    Autoheal:                      true
    Registered To:                 sat6.lab.home.adrians.computer
    Registered At:                 2018-11-30 06:23:44 UTC
    Registered by Activation Keys: 
     1) ak-rhel7-server-library
Host Collections:

Comment 6 Ade Bradshaw 2018-11-30 14:18:29 UTC
Just to close the loop

I was made aware of the bootstrap pre-reqs for using --fqdn 

Specifically 

hammer settings set \
  --name  create_new_host_when_facts_are_uploaded \
  --value false
hammer settings set \
  --name  create_new_host_when_report_is_uploaded \
  --value false

With these in place, subscription-manager still doesnt work BUT bootstrap does 

Happy to close this bug

Comment 7 Brad Buckingham 2018-12-07 12:57:37 UTC
Ade, 

Thanks for the bug report. It looks like it is a duplicate; however, that bug was closed.  For now, I'll close as a duplicate of that one, so all point to the same.

Thank you for the details above which will assist others!

*** This bug has been marked as a duplicate of bug 1344011 ***


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