Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Core
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

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?

Actions #1

Updated by Dan Mick over 7 years ago

  • Project changed from Ceph to teuthology
  • Category set to Core
  • Source set to Development
Actions #2

Updated by Dan Mick over 7 years ago

  • 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
Actions #3

Updated by Dan Mick over 7 years ago

  • 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
Actions #4

Updated by Dan Mick over 7 years ago

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,

Actions #5

Updated by Zack Cerza over 7 years ago

$ /usr/bin/env python -c "import sys; print sys.executable" 
/home/zack/teuthology/virtualenv/bin/python

I don't see the bug?

Actions #6

Updated by Dan Mick over 7 years ago

Zack points out that this only affects processes run outside of 'activate'; activate sets the PATH as well

Actions #7

Updated by Dan Mick over 7 years ago

  • Status changed from New to Fix Under Review
  • Assignee changed from Zack Cerza to Dan Mick
Actions #8

Updated by Dan Mick over 7 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF