]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm prepare should check for root
authorAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:11:54 +0000 (10:11 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:25:58 +0000 (10:25 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/prepare.py

index b17f367464974082153f7c751440c4a2961b652f..bd84aab18e34a40c7657bff8c5b435976c611e56 100644 (file)
@@ -4,7 +4,7 @@ import os
 from textwrap import dedent
 from ceph_volume.util import prepare as prepare_utils
 from ceph_volume.util import system
-from ceph_volume import conf
+from ceph_volume import conf, decorators
 from . import api
 from .common import prepare_parser
 
@@ -65,6 +65,7 @@ class Prepare(object):
     def __init__(self, argv):
         self.argv = argv
 
+    @decorators.needs_root
     def prepare(self, args):
         # FIXME we don't allow re-using a keyring, we always generate one for the
         # OSD, this needs to be fixed. This could either be a file (!) or a string