Bug 2025926 - [RFE] Identify host Build Token using hammer
Summary: [RFE] Identify host Build Token using hammer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.12.0
Assignee: aabramov
QA Contact: Peter Dragun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-23 12:17 UTC by mithun kalyat
Modified: 2022-11-16 13:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:33:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34120 0 Normal New Identify host Build Token using hammer 2021-12-09 14:19:08 UTC
Red Hat Issue Tracker SAT-6314 0 None None None 2021-11-29 00:13:03 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:33:17 UTC

Description mithun kalyat 2021-11-23 12:17:10 UTC
[RFE] Identify host Build Token using hammer

1. Proposed title of this feature request  

Unable to get the host build token using hammer when the host is in 'build mode'

2. What is the nature and description of the request?  

Currently the following command gives almost all details about the host when it is in 'build mode'. However the 'Token' which is valid for 360 minutes is not listed. Token is visible from Satellite webui All hosts ---> host.example.com ---> Properties

   # hammer host info --id NN --show-hidden-parameters true 

For example:
=================================================
[root@sat ~]# hammer host info --id 25 --show-hidden-parameters true
Id:                       25
Name:                     host.example.com
Organization:             RedHat
Location:                 GSS
Puppet Environment:       production
Cert name:                host.example.com
Managed:                  yes
Installed at:             
Last report:              
Status:                   
    Global Status: Warning
    Build Status:  Pending installation
Network:                  
    IPv4 address: 192.168.xx.xxx
    IPv6 address: 
    MAC:          00:50:xx:xx:xx:xx
    Subnet ipv4:  satellite-subnet
    Domain:       sat.example.com
Network interfaces:       
 1) Id:           27
    Identifier:   
    Type:         interface (primary, provision, execution)
    MAC address:  00:50:xx:xx:xx:xx
    IPv4 address: 192.168.xx.xxx
    IPv6 address: 
    FQDN:         host.example.com
Operating system:         
    Architecture:           x86_64
    Operating System:       RedHat-7.7
    Build:                  yes
    Partition Table:        Kickstart default
    PXE Loader:             PXELinux BIOS
    Custom partition table:
Parameters:               

All parameters:           
    host_registration_remote_execution => true
    host_registration_insights => true
    enable-puppet5 => true
    enable-epel => false
Additional info:          
    Owner:      Admin User
    Owner Id:   4
    Owner Type: User
    Enabled:    yes
    Comment:
OpenSCAP Proxy:           
Content Information:      
    Content View:          
        ID:   1
        Name: Default Organization View
    Lifecycle Environment: 
        ID:   1
        Name: Library
    Content Source:        
        ID:   1
        Name: rhsat.example.com
    Kickstart Repository:  
        ID:   18
        Name: 18
    Applicable Packages:   0
    Upgradable Packages:   0
    Applicable Errata:     
        Enhancement: 0
        Bug Fix:     0
        Security:    0
Subscription Information: 
    UUID:            
    Last Checkin:    
    Release Version: 
    Autoheal:        
    Registered To:   
    Registered At:
Host Collections:
====================================
      
"Build Token' section needs to be added in the above parameters and should be able to list while running the hammer command.

Comment 2 Oleh Fedorenko 2021-12-09 14:19:08 UTC
Created redmine issue https://projects.theforeman.org/issues/34120 from this bug

Comment 3 Bryan Kearney 2021-12-18 20:06:12 UTC
Upstream bug assigned to aabramov

Comment 4 Bryan Kearney 2021-12-18 20:06:14 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34120 has been resolved.

Comment 6 Peter Dragun 2022-08-24 11:21:39 UTC
Verified on Sat 6.12 snap 7, the token can be listed using hammer, no need to use `--show-hidden-parameters true`

Comment 10 errata-xmlrpc 2022-11-16 13:33:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506


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