Skip to content

Commit

Permalink
Merge pull request #204 from xcp-ng/fix/host_version_ssh_cmd
Browse files Browse the repository at this point in the history
jobs.py: Explicitly pass 'root' user to ssh command
  • Loading branch information
tescande authored Mar 4, 2024
2 parents 09c057e + e40d69b commit e1d8a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def build_pytest_cmd(job_data, hosts=None, pytest_args=[]):
if hosts is not None:
try:
host = hosts.split(',')[0]
cmd = ["ssh", host, "lsb_release", "-sr"]
cmd = ["ssh", f"root@{host}", "lsb_release", "-sr"]
res = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
if res.returncode == 0:
host_version = res.stdout.decode().strip()
Expand Down

0 comments on commit e1d8a6d

Please sign in to comment.