Project

General

Profile

Actions

Bug #19257

closed

remote processes started with wait=False appear to never finish

Added by Zack Cerza about 7 years ago. Updated almost 7 years ago.

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

0%

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

Description

RemoteProcess.finished is a property used by (among others) RemoteProcess.poll(). I noticed that it wasn't working properly when investigating the feasibility of immediately detecting when a daemon fails to start.

Test case:

$ cat test.py
#!/usr/bin/env python
from teuthology.orchestra import remote
import time

REMOTE_NAME = 'smithi019'
r = remote.Remote(REMOTE_NAME)

def run(cmd):
    return r.run(
        args=cmd,
        wait=False,
        check_status=False,
    )

def p_finished(proc):
    print "finished", proc.finished

if __name__ == "__main__":
    p = run("echo hi; sleep 2; echo hi again; sleep 3; echo bye")
    p_finished(p)
    time.sleep(1.1)
    p_finished(p)
    time.sleep(1.1)
    p_finished(p)
    time.sleep(3.1)
    p_finished(p)

$ ./test.py
2017-03-10 14:05:31,198.198 INFO:teuthology.orchestra.run.smithi019:Running: 'true'
2017-03-10 14:05:31,594.594 INFO:teuthology.orchestra.run.smithi019:Running: 'echo hi; sleep 2; echo hi again; sleep 3; echo bye'
finished False
2017-03-10 14:05:31,892.892 INFO:teuthology.orchestra.run.smithi019.stdout:hi
finished False
2017-03-10 14:05:33,894.894 INFO:teuthology.orchestra.run.smithi019.stdout:hi again
finished False
finished False
Actions #1

Updated by Dan Mick about 7 years ago

Weirdly, I can't make this test fail on my Xenial desktop or on teuthology.front

Actions #2

Updated by Zack Cerza almost 7 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF