From 466fede77be0b4766205353210730534fe5780a5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 23 Mar 2013 20:53:51 -0700 Subject: [PATCH] install: need sudo when purging /var/lib/ceph Signed-off-by: Sage Weil --- teuthology/task/install.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teuthology/task/install.py b/teuthology/task/install.py index af2c2e3046..aa98fc2be7 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -169,18 +169,21 @@ def purge_data(ctx): def _purge_data(remote): log.info('Purging /var/lib/ceph on %s', remote) remote.run(args=[ + 'sudo', 'rm', '-rf', '--one-file-system', '--', '/var/lib/ceph', run.Raw('||'), 'true', run.Raw(';'), 'test', '-d', '/var/lib/ceph', run.Raw('&&'), + 'sudo', 'find', '/var/lib/ceph', '-mindepth', '1', '-maxdepth', '2', '-type', 'd', '-exec', 'umount', '{}', ';', run.Raw(';'), + 'sudo', 'rm', '-rf', '--one-file-system', '--', '/var/lib/ceph', ]) -- 2.39.5