broadcast the built-in, statically available version info, e.g.:
{
"release" : "7.0",
"repoid" : "
3ce05d40",
"version" : "7.0-14"
}
We can expand this by more actual package version info in the future,
but that certainly needs more elaborate update control mechanisms as
the oneshot at boot we have now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
use PVE::AccessControl;
use PVE::Ceph::Services;
use PVE::Ceph::Tools;
+use PVE::pvecfg;
use PVE::ExtMetric;
use PVE::Status::Plugin;
}
}
+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
$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;