Bug #17986
closed
orchestra.console.spawn_sol_log expects to find pexpect in system Python
Added by Dan Mick over 7 years ago.
Updated over 7 years ago.
Description
It'd probably be better if it used the same virtualenv'ed Python that is running teuthology. I'm not sure if there's a standard way to do that; maybe sys.executable?
- Project changed from Ceph to teuthology
- Category set to Core
- Source set to Development
- Subject changed from orchestra.spawn_sol_log expect to find pexpect in system Python to orchestra.spawn_sol_log expects to find pexpect in system Python
- Subject changed from orchestra.spawn_sol_log expects to find pexpect in system Python to orchestra.console.spawn_sol_log expects to find pexpect in system Python
This does seem to work:
--- a/teuthology/orchestra/console.py
+++ b/teuthology/orchestra/console.py
@@ -283,7 +283,7 @@ class PhysicalConsole():
def start():
console_cmd = self._console_command()
python_cmd = [
- '/usr/bin/env', 'python', '-c',
+ sys.executable, '-c',
pexpect_templ.format(
cmd=console_cmd,
log=dest_path,
$ /usr/bin/env python -c "import sys; print sys.executable"
/home/zack/teuthology/virtualenv/bin/python
I don't see the bug?
Zack points out that this only affects processes run outside of 'activate'; activate sets the PATH as well
- Status changed from New to Fix Under Review
- Assignee changed from Zack Cerza to Dan Mick
- Status changed from Fix Under Review to Resolved
Also available in: Atom
PDF