Skip to content

Commit

Permalink
Fix: report: should not try interactive authentication when stdin is …
Browse files Browse the repository at this point in the history
…no a tty (bsc#1228899)
  • Loading branch information
nicholasyang2022 committed Sep 13, 2024
1 parent 4620ba8 commit 04b7092
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crmsh/report/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def collect_for_nodes(nodes, arg_str):
"""
Start slave collectors
"""
if constants.SSH_PASSWORD_NODES and not crmutils.can_ask():
logger.error('Cannot create a report non-interactively. Interactive authentication is required.')
if userdir.getuser() == 'hacluster':
logger.info('Please setup passwordless ssh authentication for user hacluster.')
raise ValueError('Cannot create a report.')
process_list = []
for node in nodes.split():
if node in constants.SSH_PASSWORD_NODES:
Expand Down

0 comments on commit 04b7092

Please sign in to comment.