ceph api: added check for /etc/pve/ceph.conf to remaining/new endpoints

Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
Tim Marx 2018-12-11 11:08:56 +01:00 committed by Thomas Lamprecht
parent 96988dfae0
commit 1aa902ae90
3 changed files with 6 additions and 0 deletions

View File

@ -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();

View File

@ -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" });

View File

@ -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();