Project

General

Profile

Actions

Bug #25032

closed

foreman-maintain can't authenticate 'hammer defaults' are invalid - upgrades and other commands fail

Added by Martin Bacovsky over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1632768

If the user has specified invalid values in .hammer/defaults.yml (via the hammer defaults command) foreman-maintain will fail to authenticate and error on most commands.

This can be difficult as a user to determine why it is failing as the user only sees:

  1. foreman-maintain health check
    Running preparation steps required to run the next scenarios ================================================================================
    Setup hammer:
    Configuring Hammer CLI...
    Hammer admin password:
    [FAIL]
    Hammer configuration failed: Is the admin password correct? (it was stored in /etc/foreman-maintain/foreman-maintain-hammer.yml)Is the server down?

this makes it look like the password is incorrect or the server is down, when in fact, there may be a setting in ~./.hammer/defauts.yml that is invalid or conflicting with foreman-maintain's usage of hammer.

This results in failed upgrades with difficulty determining why:

  1. satellite-installer --upgrade
    ...
    Upgrade Step: Running installer...
    Installing Done [100%] [...........................................................................]
    The full log is at /var/log/foreman-installer/satellite.log
    Upgrade Step: restart_services...
    Redirecting to 'foreman-maintain service'
    Running preparation steps required to run the next scenarios =============================================================================
    Setup hammer: Configuring Hammer CLI...
    Hammer admin password:

    [FAIL]

Actions #1

Updated by Martin Bacovsky over 5 years ago

From other observations of this bug we can see there is an error in API endpoint we use to test hammer is configured correctly. hammer architecture list fails with 500 if --organization-id is used regardless of the value. As temporary fix in foreman-maintain we have to use different api endpoint.

Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/226 added
Actions #3

Updated by Ivan Necas over 5 years ago

  • Status changed from Ready For Testing to Closed
  • Fixed in Releases foreman_maintain-0.2.12 added
Actions

Also available in: Atom PDF