Skip to content

Commit 7ea676b

Browse files
committed
Add more ceph sanity checks
1 parent dd1ae5b commit 7ea676b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

staff/sys/makevm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import os.path
1010
import random
1111
import re
1212
import shlex
13+
import shutil
1314
import socket
1415
import subprocess
1516
import sys
@@ -256,15 +257,22 @@ def _main(args):
256257
print('Cancelled.')
257258
sys.exit(2)
258259

260+
if agrs.ceph and not shutil.which('ceph'):
261+
print("Warning: You are trying to use Ceph but I couldn't find the `ceph` executable.")
262+
263+
if not confirm():
264+
print('Cancelled.')
265+
sys.exit(2)
266+
259267
if args.ceph and args.vg != 'vg':
260-
print("Warning: You have Ceph backing storage, but specified a non-default VG")
268+
print("Warning: You have Ceph backing storage, but specified a non-default VG.")
261269

262270
if not confirm():
263271
print('Cancelled.')
264272
sys.exit(2)
265273

266274
if not args.ceph and args.ceph_pool != 'vm':
267-
print("Warning: You have LVM backing storage, but specified a Ceph pool")
275+
print("Warning: You have LVM backing storage, but specified a Ceph pool.")
268276

269277
if not confirm():
270278
print('Cancelled.')

0 commit comments

Comments
 (0)