mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 03:58:26 +00:00
api: cephfs: check if SID is free when add_storage is set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6ad96d041e
commit
34c1236c35
@ -8,6 +8,7 @@ use PVE::JSONSchema qw(get_standard_option);
|
||||
use PVE::RADOS;
|
||||
use PVE::RESTHandler;
|
||||
use PVE::RPCEnvironment;
|
||||
use PVE::Storage;
|
||||
|
||||
use PVE::API2::Storage::Config;
|
||||
|
||||
@ -138,6 +139,8 @@ __PACKAGE__->register_method ({
|
||||
my $running_mds = PVE::CephTools::get_cluster_mds_state($rados);
|
||||
die "no running Metadata Server (MDS) found!\n" if !scalar(keys %$running_mds);
|
||||
|
||||
PVE::Storage::assert_sid_unused($fs_name) if $param->{add_storage};
|
||||
|
||||
my $worker = sub {
|
||||
$rados = PVE::RADOS->new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user