]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk-activate: pull mount options from ceph.conf
authorAlexandre Marangone <alexandre.marangone@inktank.com>
Fri, 15 Feb 2013 20:22:33 +0000 (12:22 -0800)
committerSage Weil <sage@inktank.com>
Fri, 26 Apr 2013 20:40:02 +0000 (13:40 -0700)
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
(cherry picked from commit e7040f55f01db3de7d5cebfc79de50c8b6ad5d45)

src/ceph-disk-activate

index 0b3548abbdd5d779c97389a690044ccce0e9d457..1eb696490e3927d715e7ca28231a4a9a527b5228 100755 (executable)
@@ -455,15 +455,27 @@ def mount_activate(
             e,
             )
 
+    # TODO always using mount options from cluster=ceph for
+    # now; see http://tracker.newdream.net/issues/3253
     mount_options = get_conf(
-        # TODO always using mount options from cluster=ceph for
-        # now; see http://tracker.newdream.net/issues/3253
         cluster='ceph',
-        variable='osd_fs_mount_options_{fstype}'.format(
+        variable='osd_mount_options_{fstype}'.format(
             fstype=fstype,
             ),
         )
 
+    if mount_options is None:
+        mount_options = get_conf(
+            cluster='ceph',
+            variable='osd_fs_mount_options_{fstype}'.format(
+                fstype=fstype,
+                ),
+            )
+
+    #remove whitespaces from mount_options
+    if mount_options is not None:
+        mount_options = "".join(mount_options.split())
+
     path = mount(dev=dev, fstype=fstype, options=mount_options)
 
     osd_id = None