No description
Find a file
Aaron Lauterer 4dd942c074 status: handle new metrics update data
For PVE9 we plan to add additional fields in the metrics that are
collected and distributed in the cluster. The new fields/columns are
added at the end of the current ones. This makes it possible for PVE8
installations to still use them by cutting the new additional data.

To make it more future proof, the format of the keys for each metrics
are changed:

Old: pve{version}-{type}/{id}
New: pve-{type}-{version}/{id}

This way we have an easier time to handle new versions in the future as
we initially only need to check for `pve-{type}-`. If we know the
version, we can handle it accordingly; e.g. pad if older format with
missing data. If we don't know the version, it must be a newer one and
we cut the data stream at the length we need for the current version.

This means of course that to avoid a breaking change, we can only add
new columns if needed, but not remove any! But waiting for a breaking
change until the next major release is a worthy trade-off if it allows
us to expand the format in between if needed.

Since the full keys were used for the final location within the RRD
directory, we need to change that as well and set it manually to
'pve2-{type}' as the key we receive could be for a newer data format.

The 'rrd_skip_data' function got a new parameter defining the sepataring
character. This then makes it possible to use it to determine which part
of the key string is the version/type and which one is the actual
resource identifier.

We drop the pve2-vm schema as the newer pve2.3-vm has been introduced
with commit ba9dcfc1 back in 2013. By now there should be no cluster
where an older node might still send the old pve2-vm schema.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Link: https://lore.proxmox.com/20250715143218.1548306-8-a.lauterer@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-17 00:26:57 +02:00
debian d/postinst: re-add autogenereated deb-helper code and fix version guard 2025-07-16 15:38:59 +02:00
src status: handle new metrics update data 2025-07-17 00:26:57 +02:00
.gitignore update gitignore 2023-05-31 13:50:26 +02:00
Makefile buildsys: add top-level make tidy target 2025-06-01 14:05:30 +02:00