Bug 1563857 - [RFE] Proactively check and correct the host setting under cli_config.yml to use fqdn instead of localhost
Summary: [RFE] Proactively check and correct the host setting under cli_config.yml to ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.3.0
Hardware: All
OS: Linux
medium
high vote
Target Milestone: Unspecified
Assignee: Amit Upadhye
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-04 22:57 UTC by Christian Marineau
Modified: 2020-08-03 13:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-28 13:39:16 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 23563 Normal Ready For Testing Proactively check and correct the host setting under cli_config.yml to use fqdn instead of localhost 2020-08-03 13:19:24 UTC
Red Hat Knowledge Base (Solution) 3364391 Troubleshoot None After upgrading to RedHat satellite 6.3 hammer failing with error "SSL error: hostname "localhost" does not match the se... 2019-03-25 18:07:44 UTC

Description Christian Marineau 2018-04-04 22:57:01 UTC
Description of problem:
When cli_config.yml was previously configured by the user to use localhost to resolves the Satellite url, hammer will fails after the initial upgrade step, for the same cause then this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1454706

Version-Release number of selected component (if applicable):
6.3.0

How reproducible:
100%

Steps to Reproduce:
1. Configure the following file /root/.hammer/cli_config.yml to use localhost:
:foreman:
    :host: 'https://localhost/'
    :username: 'admin'
    :password: 'changeme'
    :request_timeout: 300

2. Run hammer ping, 
   # hammer ping                                           
   SSL error: hostname "localhost" does not match the server certificate

   Or run foreman-maintain, the following error will be thrown:
   Check whether all services are running using hammer ping:             [FAIL]
   SSL error: hostname "localhost" does not match the server certificate


Actual results:
  Upgrading Satellite from 6.2 to 6.3 will causes some hammer configuration to be broken and will prevent some upgrade steps to complete with success since any step using hammer commands will fails with an SSL errror.


Expected results:
  We may have foreman-maintain to check the syntax of cli_config.yml, then throws a Warning and ask the user if foreman-maintain can update the configuration right away to use the fqdn, and thus prevent further issue in the installation process and with the usage of hammer cli.

Additional info:
See the following bug https://bugzilla.redhat.com/show_bug.cgi?id=1454706
See the following KCS: https://access.redhat.com/solutions/3364391

Note: We may also consider to bypass any cli_config.yml configured by the user since any syntax error may cause issue with any hammer commands.

Comment 2 Kavita 2018-05-11 06:07:30 UTC
Created redmine issue http://projects.theforeman.org/issues/23563 from this bug


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