GoogleCloudPlatform / GoogleCloudPlatform/PerfKitBenchmarker

RobustRemoteCommand() makes implicit assumption that python is available in the path

Open
#1,095 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2k
Forks
562
Avg merge
4h 55m
Merged PRs (30d)
69

Description

As title says, `linux_virtual_machine.RobustRemoteCommand()` assumes that `python` is available in the PATH.

In the official cloud image from [Canonical for Ubuntu Xenial 16.04 LTS](https://cloud-images.ubuntu.com/xenial/current/) it does not include python installed by default. See log here:

```
ubuntu@pkb-f270332b-0:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
ubuntu@pkb-f270332b-0:~$ python
The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install
```

```
2016-09-09 21:08:46,025 f270332b MainThread fio(1/1) ERROR Error during benchmark fio
Traceback (most recent call last):
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 499, in RunBenchmark
detailed_timer)
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 384, in DoRunPhase
samples = benchmark.Run(spec)
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/fio_benchmark.py", line 444, in Run
stdout, stderr = vm.RobustRemoteCommand(fio_command, should_log=True)
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/linux_virtual_machine.py", line 154, in RobustRemoteCommand
return self.RemoteCommand(' '.join(wait_command), should_log=should_log)
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/linux_virtual_machine.py", line 311, in RemoteCommand
suppress_warning, timeout)
File "/opt/PerfKitBenchmarker/perfkitbenchmarker/linux_virtual_machine.py", line 372, in RemoteHostCommand
raise errors.VirtualMachine.RemoteCommandError(error_text)
RemoteCommandError: Got non-zero return code (127) executing python /tmp/pkb/wait_for_command.py --stdout /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.stdout --stderr /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.stderr --status /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.status --delete
Full command: ssh -A -p 22 ubuntu@10.50.50.68 -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/runs/f270332b/perfkitbenchmarker_keyfile python /tmp/pkb/wait_for_command.py --stdout /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.stdout --stderr /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.stderr --status /tmp/pkb/cmdac221518-135e-4c68-b075-faf9cefd312f.status --delete
STDOUT: STDERR: Warning: Permanently added '10.50.50.68' (ECDSA) to the list of known hosts.
bash: python: command not found
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.