]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: consume mount opt in simple activate 38015/head
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 26 Oct 2020 19:12:59 +0000 (15:12 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Tue, 10 Nov 2020 20:31:14 +0000 (15:31 -0500)
When running ceph-volume simple activate command on a Filestore OSD
then the data device is mounted without any specific options so the
one from the ceph configuration file are ignored.
When deploying Filestore with the lvm subcommand then everything is
fine because the filestore_activate method uses mount_osd which relies
on the mount options defined in the ceph configuration file (if any).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1891557
Fixes: https://tracker.ceph.com/issues/48018
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 1f4301a15df82bf31468d76fbcccc1c5fa192e38)

src/ceph-volume/ceph_volume/devices/simple/activate.py

index 1dfc1e70d85bf7631a29bff112ff926b66801c36..7439141c03a8b4865238c4825ad58271ed6225fa 100644 (file)
@@ -9,6 +9,7 @@ from textwrap import dedent
 from ceph_volume import process, decorators, terminal, conf
 from ceph_volume.util import system, disk
 from ceph_volume.util import encryption as encryption_utils
+from ceph_volume.util import prepare as prepare_utils
 from ceph_volume.systemd import systemctl
 
 
@@ -181,7 +182,10 @@ class Activate(object):
         block_wal_device = self.get_device(osd_metadata.get('block.wal', {}).get('uuid'))
 
         if not system.device_is_mounted(data_device, destination=osd_dir):
-            process.run(['mount', '-v', data_device, osd_dir])
+            if osd_metadata.get('type') == 'filestore':
+                prepare_utils.mount_osd(data_device, osd_id)
+            else:
+                process.run(['mount', '-v', data_device, osd_dir])
 
         device_map = {
             'journal': journal_device,