]> git.proxmox.com Git - pve-manager.git/commitdiff
ceph: init: fix undef var access
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 3 Jul 2019 13:10:02 +0000 (15:10 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 3 Jul 2019 13:10:02 +0000 (15:10 +0200)
Fixes: d851d63ecc8cfb20880d611c904fdc2ff83ae3e2
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Ceph.pm

index 1036e24c8aaa633c39394f58c49edf154ea1acd3..a1ae7020beee777dd3e324fd67ea8e99109656df 100644 (file)
@@ -302,6 +302,8 @@ __PACKAGE__->register_method ({
            PVE::Ceph::Tools::check_ceph_installed('ceph_bin');
        }
 
+       my $auth = $param->{disable_cephx} ? 'none' : 'cephx';
+
        # simply load old config if it already exists
        PVE::Cluster::cfs_lock_file('ceph.conf', undef, sub {
            my $cfg = cfs_read_file('ceph.conf');
@@ -314,8 +316,6 @@ __PACKAGE__->register_method ({
                UUID::generate($uuid);
                UUID::unparse($uuid, $fsid);
 
-               my $auth = $param->{disable_cephx} ? 'none' : 'cephx';
-
                $cfg->{global} = {
                    'fsid' => $fsid,
                    'auth cluster required' => $auth,