Skip to content

Commit

Permalink
Dev: report: make error messages easier to parse for hawk2 (bsc#1228899)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Sep 24, 2024
1 parent 17f3e15 commit 2e87ced
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crmsh/report/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ def find_ssh_user(context: Context) -> None:
if not crmutils.can_ask():
logger.error('Cannot create a report non-interactively. Interactive authentication is required.')
if userdir.getuser() == 'hacluster':
logger.warning('Passwordless ssh does not work. Run "crm cluster health hawk2 --fix" to set it up.')
raise ValueError('Cannot create a report.')
raise ValueError('Passwordless ssh does not work. Run "crm cluster health hawk2 --fix" to set it up.')
else:
raise ValueError('Cannot create a report.')


def load_from_crmsh_config(context: Context) -> None:
Expand Down

0 comments on commit 2e87ced

Please sign in to comment.