]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm activate should check for root
authorAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:11:17 +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/activate.py

index 32023196924321cab3b7832a806495bb45400b49..e1bb12b3311573cc65925948cedd00c6d8ff189f 100644 (file)
@@ -2,7 +2,7 @@ from __future__ import print_function
 import argparse
 import os
 from textwrap import dedent
-from ceph_volume import process, conf
+from ceph_volume import process, conf, decorators
 from ceph_volume.util import system
 from ceph_volume.systemd import systemctl
 from . import api
@@ -58,6 +58,7 @@ class Activate(object):
     def __init__(self, argv):
         self.argv = argv
 
+    @decorators.needs_root
     def activate(self, args):
         lvs = api.Volumes()
         # filter them down for the OSD ID and FSID we need to activate