mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 21:00:01 +00:00
api: cephfs: more checks on fs create
namely if the fs is already existing, and if there is currently a standby mds that can be used for the new fs previosuly, only one cephfs was possible, so these checks were not necessary. now with pacific, it is possible to have multiple cephfs' and we should check for those. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
0ab69d6e88
commit
028af34e3d
@ -128,8 +128,14 @@ __PACKAGE__->register_method ({
|
||||
die "ceph pools '$pool_data' and/or '$pool_metadata' already exist\n"
|
||||
if $existing_pools->{$pool_data} || $existing_pools->{$pool_metadata};
|
||||
|
||||
my $fs = PVE::Ceph::Tools::ls_fs($rados);
|
||||
die "ceph fs '$fs_name' already exists\n"
|
||||
if (grep { $_->{name} eq $fs_name } @$fs);
|
||||
|
||||
my $running_mds = PVE::Ceph::Services::get_cluster_mds_state($rados);
|
||||
die "no running Metadata Server (MDS) found!\n" if !scalar(keys %$running_mds);
|
||||
die "no standby Metadata Server (MDS) found!\n"
|
||||
if !grep { $_->{state} eq 'up:standby' } values(%$running_mds);
|
||||
|
||||
PVE::Storage::assert_sid_unused($fs_name) if $param->{add_storage};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user