[pve-devel] [PATCH v2 storage 2/2] Ceph: add keyring parameter for external clusters
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Aug 26 11:25:29 CEST 2021
On 03/08/2021 13:45, Aaron Lauterer wrote:
patch does not applies..
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index a8d1243..4bd43d5 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
.. snip
> @@ -327,20 +332,29 @@ sub options {
diff # do not seem to match even with below bogus `gg` line removed
> sub on_add_hook {
> my ($class, $storeid, $scfg, %param) = @_;
>
> - return if defined($scfg->{monhost}); # nothing to do if not pve managed ceph
> + 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);
> + return;
> +}
> +
> +sub on_update_hook {
> + my ($class, $storeid, $scfg, %param) = @_;
> +
> + if (exists($param{keyring})) {
> + if (defined($param{keyring})) {
> + PVE::CephConfig::ceph_create_keyfile($scfg->{type}, $storeid, $param{keyring});
> + } else {
> + PVE::CephConfig::ceph_remove_keyfile($scfg->{type}, $storeid);
> + }
> + }
> gg
bogus line above, probably from a vim-go-to-top in insert mode mistake..
> return;
> }
>
> sub on_delete_hook {
> my ($class, $storeid, $scfg) = @_;
> -
> - return if defined($scfg->{monhost}); # nothing to do if not pve managed ceph
> -
> PVE::CephConfig::ceph_remove_keyfile($scfg->{type}, $storeid);
> -
> return;
> }
>
>
More information about the pve-devel
mailing list