From 1aa902ae90e7b60e5e8eb4a9c92bdab4c0bdf1ef Mon Sep 17 00:00:00 2001 From: Tim Marx Date: Tue, 11 Dec 2018 11:08:56 +0100 Subject: [PATCH] ceph api: added check for /etc/pve/ceph.conf to remaining/new endpoints Signed-off-by: Tim Marx --- PVE/API2/Ceph.pm | 2 ++ PVE/API2/Ceph/FS.pm | 2 ++ PVE/API2/Ceph/MDS.pm | 2 ++ 3 files changed, 6 insertions(+) diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index 76933dad..fc71205e 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -2013,6 +2013,8 @@ __PACKAGE__->register_method({ }, code => sub { my ($param) = @_; + + PVE::CephTools::check_ceph_inited(); my $rpcenv = PVE::RPCEnvironment::get(); my $user = $rpcenv->get_user(); diff --git a/PVE/API2/Ceph/FS.pm b/PVE/API2/Ceph/FS.pm index 084a3e28..d4becf1c 100644 --- a/PVE/API2/Ceph/FS.pm +++ b/PVE/API2/Ceph/FS.pm @@ -53,6 +53,8 @@ __PACKAGE__->register_method ({ code => sub { my ($param) = @_; + PVE::CephTools::check_ceph_inited(); + my $rados = PVE::RADOS->new(); my $cephfs_list = $rados->mon_command({ prefix => "fs ls" }); diff --git a/PVE/API2/Ceph/MDS.pm b/PVE/API2/Ceph/MDS.pm index 9a2791ae..dff28405 100644 --- a/PVE/API2/Ceph/MDS.pm +++ b/PVE/API2/Ceph/MDS.pm @@ -64,6 +64,8 @@ __PACKAGE__->register_method ({ code => sub { my ($param) = @_; + PVE::CephTools::check_ceph_inited(); + my $res = []; my $cfg = PVE::CephTools::parse_ceph_config();