]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Do not make directories by mistake. 2204/head
authorOwen Synge <osynge@suse.com>
Tue, 5 Aug 2014 15:28:16 +0000 (17:28 +0200)
committerOwen Synge <osynge@suse.com>
Tue, 5 Aug 2014 15:28:16 +0000 (17:28 +0200)
Rational: I found I had created a series of OSD directories under "/dev/" when disks I thought existed did not exist.
Warning: This change will be noticed by end users and may effect deployment infrastructures.

Signed-off-by: Owen Synge <osynge@suse.com>
src/ceph-disk

index e3c8102b901c47944dcac1be336bf0747e4ee18c..c1d4efb0d61f08361afdd40fe67e972764ea8ff2 100755 (executable)
@@ -1333,9 +1333,10 @@ def main_prepare(args):
         prepare_lock.acquire()
         if not os.path.exists(args.data):
             if args.data_dev:
-                raise Error('data path does not exist', args.data)
-            else:
-                os.mkdir(args.data)
+                raise Error('data path for device does not exist', args.data)
+            if args.data_dir:
+                raise Error('data path for directory does not exist', args.data)
+            raise Error('data path does not exist', args.data)
 
         # in use?
         dmode = os.stat(args.data).st_mode