From c698646f0094a7cac7effdb8378ee65621263c60 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 11 Apr 2023 17:14:53 +0200 Subject: [PATCH] rbd: fix variable declared in conditional statement Signed-off-by: Thomas Lamprecht --- PVE/Storage/RBDPlugin.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index 35b2372..73703fb 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -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; }