From 656667dbd2e2f8529a50e4965c190032e4fd8316 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 20 Oct 2021 16:26:44 +0200 Subject: [PATCH] ceph services: return early if versions stayed the same Signed-off-by: Thomas Lamprecht --- PVE/Ceph/Services.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PVE/Ceph/Services.pm b/PVE/Ceph/Services.pm index 9e966280..a61e756c 100644 --- a/PVE/Ceph/Services.pm +++ b/PVE/Ceph/Services.pm @@ -51,6 +51,13 @@ sub broadcast_ceph_versions { my ($version, $buildcommit, $vers_parts) = PVE::Ceph::Tools::get_local_version(1); if ($version) { + if (my $old = PVE::Cluster::get_node_kv("ceph-versions")) { + $old = eval { decode_json($old) }; + warn $@ if $@; # should not happen + if (defined($old) && $old->{buildcommit} eq $buildcommit && $old->{str} eq $version) { + return; # up to date, nothing to do so avoid (not exactly cheap) broadcast + } + } my $node_versions = { version => { str => $version,