[pve-devel] [PATCH qemu-server v2 1/1] status: rrddata: use fixed pve-vm-9.0 path
Aaron Lauterer
a.lauterer at proxmox.com
Mon Nov 3 23:00:20 CET 2025
Because we now always create it, should it not exists and old data is
used from the old files.
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
Reviewed-by: Laurențiu Leahu-Vlăducu <l.leahu-vladucu at proxmox.com>
Tested-by: Laurențiu Leahu-Vlăducu <l.leahu-vladucu at proxmox.com>
---
Notes:
changes since
v1:
* rebase on current master after a small change due to tidying
#
src/PVE/API2/Qemu.pm | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 71bedc1e..c2bac61b 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -1657,11 +1657,9 @@ __PACKAGE__->register_method({
code => sub {
my ($param) = @_;
- my $path = "pve-vm-9.0/$param->{vmid}";
- $path = "pve2-vm/$param->{vmid}" if !-e "/var/lib/rrdcached/db/${path}";
- return PVE::RRD::create_rrd_graph($path, $param->{timeframe}, $param->{ds},
- $param->{cf});
-
+ return PVE::RRD::create_rrd_graph(
+ "pve-vm-9.0/$param->{vmid}", $param->{timeframe}, $param->{ds}, $param->{cf},
+ );
},
});
@@ -1702,9 +1700,9 @@ __PACKAGE__->register_method({
code => sub {
my ($param) = @_;
- my $path = "pve-vm-9.0/$param->{vmid}";
- $path = "pve2-vm/$param->{vmid}" if !-e "/var/lib/rrdcached/db/${path}";
- return PVE::RRD::create_rrd_data($path, $param->{timeframe}, $param->{cf});
+ return PVE::RRD::create_rrd_data(
+ "pve-vm-9.0/$param->{vmid}", $param->{timeframe}, $param->{cf},
+ );
},
});
--
2.47.3
More information about the pve-devel
mailing list