mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-03 04:19:55 +00:00
ceph: fix version check shortcut
with 'get_node_kv', we get a hash which contains the value for all nodes in the cluster (with the nodename as key), so we have to use the value from the hash corresponding to our nodename. also the 'str' property is inside the 'version' hash Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
1b72acbf2f
commit
d66b726c0e
@ -52,9 +52,10 @@ sub broadcast_ceph_versions {
|
||||
|
||||
if ($version) {
|
||||
if (my $old = PVE::Cluster::get_node_kv("ceph-versions")) {
|
||||
$old = eval { decode_json($old) };
|
||||
my $nodename = PVE::INotify::nodename();
|
||||
$old = eval { decode_json($old->{$nodename}) };
|
||||
warn $@ if $@; # should not happen
|
||||
if (defined($old) && $old->{buildcommit} eq $buildcommit && $old->{str} eq $version) {
|
||||
if (defined($old) && $old->{buildcommit} eq $buildcommit && $old->{version}->{str} eq $version) {
|
||||
return; # up to date, nothing to do so avoid (not exactly cheap) broadcast
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user