import urlparse
import yaml
import json
+import subprocess
from .orchestra import run
def get_user():
return getpass.getuser() + '@' + socket.gethostname()
+def kill_process(ctx):
+ subprocess.check_call(["kill", "-9", str(ctx.pid)]);
+
def read_config(ctx):
filename = os.path.join(os.environ['HOME'], '.teuthology.yaml')
ctx.teuthology_config = {}
'--owner',
help='job owner',
)
+ parser.add_argument(
+ '-p','--pid',
+ type=int,
+ default=False,
+ help='pid of the process to be deleted',
+ )
parser.add_argument(
'-r', '--reboot-all',
action='store_true',
from teuthology.misc import get_user
ctx.owner = get_user()
- nuke(ctx, log, ctx.unlock, ctx.synch_clocks, ctx.reboot_all)
+ if ctx.pid:
+ from teuthology.misc import kill_process
+ kill_process(ctx)
+ nuke(ctx, log, ctx.unlock, ctx.synch_clocks, ctx.reboot_all)
def nuke(ctx, log, should_unlock, sync_clocks=True, reboot_all=True):
from teuthology.parallel import parallel