all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager 1/1] pvestatd: prevent warnings for non-existing network devices
@ 2025-07-30 12:44 Stefan Hanreich
  2025-07-30 12:51 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2025-07-30 12:44 UTC (permalink / raw)
  To: pve-devel

pvestatd runs the update loop for every network device present on the
host. This includes many dynamically created / removed network
interfaces (tap devices, veths, fw bridges). This triggers a warning
if the network device isn't yet in the cached version of the ip link
output:

pvestatd[1011]: Use of uninitialized value in string eq at /usr/share/perl5/PVE/Network.pm line 998.

Silently fail such errors for now, since they should normally affect
only such dynamically created devices and no physical devices. Even
for hotplugged physical devices this should be corrected the next time
the ip link cache gets invalidated. The worst case scenario in this
case is at most 15 minutes of missing netin/out metrics for that link.

Reported-by: Hannes Dürr <h.duerr@proxmox.com>
Reported-by: Max Carrara <m.carrara@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 PVE/Service/pvestatd.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index b7cb06b18..0b338899e 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -189,7 +189,7 @@ sub update_node_status {
     for my $dev (keys %$netdev) {
         my $ip_link = $cached_ip_links->{$dev};
 
-        if (PVE::Network::ip_link_is_physical($ip_link)) {
+        if ($ip_link && PVE::Network::ip_link_is_physical($ip_link)) {
             $netdev->{$dev}->{type} = 'physical';
         } else {
             $netdev->{$dev}->{type} = 'virtual';
-- 
2.47.2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 1/1] pvestatd: prevent warnings for non-existing network devices
  2025-07-30 12:44 [pve-devel] [PATCH pve-manager 1/1] pvestatd: prevent warnings for non-existing network devices Stefan Hanreich
@ 2025-07-30 12:51 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-07-30 12:51 UTC (permalink / raw)
  To: pve-devel, Stefan Hanreich

On Wed, 30 Jul 2025 14:44:48 +0200, Stefan Hanreich wrote:
> pvestatd runs the update loop for every network device present on the
> host. This includes many dynamically created / removed network
> interfaces (tap devices, veths, fw bridges). This triggers a warning
> if the network device isn't yet in the cached version of the ip link
> output:
> 
> pvestatd[1011]: Use of uninitialized value in string eq at /usr/share/perl5/PVE/Network.pm line 998.
> 
> [...]

Applied, thanks!

[1/1] pvestatd: prevent warnings for non-existing network devices
      commit: 09f7410dd3067d8717b17c5e620bb45309968271


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-30 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30 12:44 [pve-devel] [PATCH pve-manager 1/1] pvestatd: prevent warnings for non-existing network devices Stefan Hanreich
2025-07-30 12:51 ` Thomas Lamprecht

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