all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] pvestatd: broadcast version info
Date: Wed, 10 Nov 2021 15:11:46 +0100	[thread overview]
Message-ID: <20211110141146.210803-3-w.bumiller@proxmox.com> (raw)
In-Reply-To: <20211110141146.210803-1-w.bumiller@proxmox.com>

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 PVE/Service/pvestatd.pm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 474b3ac0..b1e71ec8 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -28,6 +28,7 @@ use PVE::AutoBalloon;
 use PVE::AccessControl;
 use PVE::Ceph::Services;
 use PVE::Ceph::Tools;
+use PVE::pvecfg;
 
 use PVE::ExtMetric;
 use PVE::Status::Plugin;
@@ -490,6 +491,17 @@ sub update_sdn_status {
     }
 }
 
+my $broadcast_version_info_done = 0;
+my sub broadcast_version_info : prototype() {
+    if (!$broadcast_version_info_done) {
+	PVE::Cluster::broadcast_node_kv(
+	    'version-info',
+	    encode_json(PVE::pvecfg::version_info()),
+	);
+	$broadcast_version_info_done = 1;
+    }
+}
+
 sub update_status {
 
     # update worker list. This is not really required and
@@ -560,6 +572,11 @@ sub update_status {
     $err = $@;
     syslog('err', "sdn status update error: $err") if $err;
 
+    eval {
+	broadcast_version_info();
+    };
+    $err = $@;
+    syslog('err', "version info update error: $err") if $err;
 }
 
 my $next_update = 0;
-- 
2.30.2





  parent reply	other threads:[~2021-11-10 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 14:11 [pve-devel] [PATCH access-control + manager] version check for tfa.cfg update Wolfgang Bumiller
2021-11-10 14:11 ` [pve-devel] [PATCH access-control 1/1] implement version checks for tfa Wolfgang Bumiller
2021-11-11 16:00   ` [pve-devel] applied: " Thomas Lamprecht
2021-11-10 14:11 ` Wolfgang Bumiller [this message]
2021-11-10 20:46   ` [pve-devel] applied: [PATCH manager] pvestatd: broadcast version info Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211110141146.210803-3-w.bumiller@proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal