mirror of
https://github.com/ceph/ceph
synced 2024-12-14 23:46:28 +00:00
301ab56748
To avoid every config always listing basic tasks, we silently add internal.* tasks in front of the task list.
26 lines
746 B
Python
26 lines
746 B
Python
import gevent
|
|
import logging
|
|
|
|
from orchestra import run
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
def check_conflict(ctx, config):
|
|
log.info('Checking for old test directory...')
|
|
processes = ctx.cluster.run(
|
|
args=[
|
|
'test', '!', '-e', '/tmp/cephtest',
|
|
],
|
|
wait=False,
|
|
)
|
|
failed = False
|
|
for proc in processes:
|
|
assert isinstance(proc.exitstatus, gevent.event.AsyncResult)
|
|
try:
|
|
proc.exitstatus.get()
|
|
except run.CommandFailedError:
|
|
log.error('Host %s has stale cephtest directory, check your lock and reboot to clean up.', proc.remote.shortname)
|
|
failed = True
|
|
if failed:
|
|
raise RuntimeError('Stale jobs detected, aborting.')
|