From 6f854e122b209e07e56289432dc42c265fecdb54 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 7 Aug 2014 08:24:54 -0600 Subject: [PATCH] Use newer orchestra API Signed-off-by: Zack Cerza --- tasks/ceph.py | 2 +- tasks/ceph_fuse.py | 2 +- tasks/filestore_idempotent.py | 2 +- tasks/locktest.py | 4 ++-- tasks/osd_backfill.py | 4 ++-- tasks/osd_failsafe_enospc.py | 10 +++++----- tasks/osd_recovery.py | 8 ++++---- tasks/radosgw_agent.py | 2 +- tasks/restart.py | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tasks/ceph.py b/tasks/ceph.py index cd24b681b7ab1..83d1e539fe70c 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -278,7 +278,7 @@ def valgrind_post(ctx, config): valgrind_exception = None for (proc, remote) in lookup_procs: - proc.exitstatus.get() + proc.wait() out = proc.stdout.getvalue() for line in out.split('\n'): if line == '': diff --git a/tasks/ceph_fuse.py b/tasks/ceph_fuse.py index 0dd50cbae612b..454473759adc6 100644 --- a/tasks/ceph_fuse.py +++ b/tasks/ceph_fuse.py @@ -201,7 +201,7 @@ def wait_until_fuse_mounted(remote, fuse, mountpoint): log.debug('ceph-fuse not yet mounted, got fs type {fstype!r}'.format(fstype=fstype)) # it shouldn't have exited yet; exposes some trivial problems - assert not fuse.exitstatus.ready() + assert not fuse.poll() time.sleep(5) log.info('ceph-fuse is mounted on %s', mountpoint) diff --git a/tasks/filestore_idempotent.py b/tasks/filestore_idempotent.py index 4e502b1f9a543..b38fc9a48cf09 100644 --- a/tasks/filestore_idempotent.py +++ b/tasks/filestore_idempotent.py @@ -65,7 +65,7 @@ def task(ctx, config): ], wait=False, check_status=False) - result = proc.exitstatus.get(); + result = proc.wait(); if result != 0: remote.run( diff --git a/tasks/locktest.py b/tasks/locktest.py index 989d84ecd9c03..59a7122223ebd 100755 --- a/tasks/locktest.py +++ b/tasks/locktest.py @@ -97,8 +97,8 @@ def task(ctx, config): wait=False ) - hostresult = hostproc.exitstatus.get() - clientresult = clientproc.exitstatus.get() + hostresult = hostproc.wait() + clientresult = clientproc.wait() if (hostresult != 0) or (clientresult != 0): raise Exception("Did not pass locking test!") log.info('finished locktest executable with results {r} and {s}'. \ diff --git a/tasks/osd_backfill.py b/tasks/osd_backfill.py index d80ea22ef2248..d034d791a5edc 100644 --- a/tasks/osd_backfill.py +++ b/tasks/osd_backfill.py @@ -60,7 +60,7 @@ def task(ctx, config): # write some data p = rados_start(ctx, mon, ['-p', 'rbd', 'bench', '15', 'write', '-b', '4096', '--no-cleanup']) - err = p.exitstatus.get(); + err = p.wait(); log.info('err is %d' % err) # mark osd.0 out to trigger a rebalance/backfill @@ -88,7 +88,7 @@ def task(ctx, config): manager.revive_osd(1) # wait for our writes to complete + succeed - err = p.exitstatus.get() + err = p.wait() log.info('err is %d' % err) # cluster must recover diff --git a/tasks/osd_failsafe_enospc.py b/tasks/osd_failsafe_enospc.py index 29e6232ab18a6..bf089988022ad 100644 --- a/tasks/osd_failsafe_enospc.py +++ b/tasks/osd_failsafe_enospc.py @@ -76,7 +76,7 @@ def task(ctx, config): time.sleep(sleep_time) proc.stdin.close() # causes daemon-helper send SIGKILL to ceph -w - proc.exitstatus.get() + proc.wait() lines = proc.stdout.getvalue().split('\n') @@ -103,7 +103,7 @@ def task(ctx, config): time.sleep(sleep_time) proc.stdin.close() # causes daemon-helper send SIGKILL to ceph -w - proc.exitstatus.get() + proc.wait() lines = proc.stdout.getvalue().split('\n') @@ -142,7 +142,7 @@ def task(ctx, config): time.sleep(sleep_time) proc.stdin.close() # causes daemon-helper send SIGKILL to ceph -w - proc.exitstatus.get() + proc.wait() lines = proc.stdout.getvalue().split('\n') @@ -172,7 +172,7 @@ def task(ctx, config): time.sleep(sleep_time) proc.stdin.close() # causes daemon-helper send SIGKILL to ceph -w - proc.exitstatus.get() + proc.wait() lines = proc.stdout.getvalue().split('\n') @@ -200,7 +200,7 @@ def task(ctx, config): time.sleep(sleep_time) proc.stdin.close() # causes daemon-helper send SIGKILL to ceph -w - proc.exitstatus.get() + proc.wait() lines = proc.stdout.getvalue().split('\n') diff --git a/tasks/osd_recovery.py b/tasks/osd_recovery.py index 1ff17335b15e7..ff88fb47d74f2 100644 --- a/tasks/osd_recovery.py +++ b/tasks/osd_recovery.py @@ -82,7 +82,7 @@ def task(ctx, config): manager.revive_osd(1) # wait for our writes to complete + succeed - err = p.exitstatus.get() + err = p.wait() log.info('err is %d' % err) # cluster must repeer @@ -92,7 +92,7 @@ def task(ctx, config): # write some more (make sure osd.2 really is divergent) p = rados_start(testdir, mon, ['-p', 'rbd', 'bench', '15', 'write', '-b', '4096']) - p.exitstatus.get(); + p.wait(); # revive divergent osd manager.revive_osd(2) @@ -159,13 +159,13 @@ def test_incomplete_pgs(ctx, config): p = rados_start(testdir, mon, ['-p', 'rbd', 'bench', '60', 'write', '-b', '1', '--no-cleanup']) - p.exitstatus.get() + p.wait() # few objects in metadata pool (with pg log, normal recovery) for f in range(1, 20): p = rados_start(testdir, mon, ['-p', 'metadata', 'put', 'foo.%d' % f, '/etc/passwd']) - p.exitstatus.get() + p.wait() # move it back manager.raw_cluster_cmd('osd', 'in', '0', '1') diff --git a/tasks/radosgw_agent.py b/tasks/radosgw_agent.py index 38f8dc4a63dbb..47d5054c739da 100644 --- a/tasks/radosgw_agent.py +++ b/tasks/radosgw_agent.py @@ -199,7 +199,7 @@ def task(ctx, config): for client, proc in procs: log.info("shutting down sync agent on %s", client) proc.stdin.close() - proc.exitstatus.get() + proc.wait() finally: for client, proc in procs: ctx.cluster.only(client).run( diff --git a/tasks/restart.py b/tasks/restart.py index 158a040ea148f..bd5f9519cf8a8 100644 --- a/tasks/restart.py +++ b/tasks/restart.py @@ -150,7 +150,7 @@ def task(ctx, config): proc.stdin.writelines(['restarted\n']) proc.stdin.flush() try: - proc.exitstatus.get() + proc.wait() except tor.CommandFailedError: raise Exception('restart task got non-zero exit status from script: {s}'.format(s=c)) finally: -- 2.39.5