Skip to content

Commit

Permalink
Fix: report: find_shell should accept hacluster user (bsc#1228899)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Sep 24, 2024
1 parent 685cf0a commit 17f3e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crmsh/report/sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def _try_create_report_shell(local_shell: crmsh.sh.LocalShell, host: str, user:
# call can_run_as here to populate know_hosts
if not ssh_shell.can_run_as(host, user):
return None
# check for root privilege
# check for root/hacluster privilege
ret = ssh_shell.subprocess_run_without_input(
host, user,
'true' if user == 'root' else 'sudo true',
'true' if user == 'root' or user == 'hacluster' else 'sudo true',
start_new_session=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
Expand Down

0 comments on commit 17f3e15

Please sign in to comment.