Skip to content

Commit

Permalink
Fix: parallax: refine error message when parallax fails to perform pa…
Browse files Browse the repository at this point in the history
…sswordless authentication

Guide users to setup passwordless authentications.
  • Loading branch information
nicholasyang2022 committed Jan 19, 2024
1 parent 3f8e358 commit eef2bbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crmsh/parallax.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def prepare(self):
def handle(self, results):
for host, result in results:
if isinstance(result, parallax.Error) and self.strict:
raise ValueError("Failed on {}: {}".format(host, result))
if 'parallax error: SSH requested a password.' in str(result):
raise ValueError(f'Failed on {host}: parallax error: SSH requested a password. Please configure passwordless authenticaiton with "crm cluster init ssh" and "crmsh cluster join ssh".')
else:
raise ValueError("Failed on {}: {}".format(host, result))
return results

def call(self):
Expand Down

0 comments on commit eef2bbc

Please sign in to comment.