]> git.proxmox.com Git - pve-storage.git/commitdiff
rbd: fix variable declared in conditional statement
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 15:14:53 +0000 (17:14 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 15:14:55 +0000 (17:14 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/RBDPlugin.pm

index 35b2372b704ba6dcf53fd7d87b46140c6b30421b..73703fb8d878eaff27bbe4dae0179b2a6e1ea9d5 100644 (file)
@@ -417,8 +417,7 @@ sub options {
 sub on_add_hook {
     my ($class, $storeid, $scfg, %param) = @_;
 
-    my $secret = $param{keyring} if defined $param{keyring} // undef;
-    PVE::CephConfig::ceph_create_keyfile($scfg->{type}, $storeid, $secret);
+    PVE::CephConfig::ceph_create_keyfile($scfg->{type}, $storeid, $param{keyring});
 
     return;
 }