Ensure dev/patch exists before activating

This commit is contained in:
James Page 2013-08-27 12:24:45 +01:00
parent dd7ba749ed
commit 7a38b97263
1 changed files with 2 additions and 1 deletions

View File

@ -130,7 +130,8 @@ def start_osds(devices):
else:
# Use ceph-disk-activate for later ceph versions
for dev_or_path in devices:
subprocess.check_call(['ceph-disk-activate', dev_or_path])
if os.path.exists(dev_or_path):
subprocess.check_call(['ceph-disk-activate', dev_or_path])
def rescan_osd_devices():