From 98384e8f2d120e8cffead3c032152b202cc6fbd4 Mon Sep 17 00:00:00 2001 From: Andrii Sultanov Date: Wed, 23 Oct 2024 08:39:12 +0100 Subject: [PATCH] CA-400924 - networkd: Add bonds to `devs` in network_monitor_thread Without it, stats for bond's interfaces are not identified correctly. Fixes: bd4dda5c294aa51045bf3caccc48bb0870a7d428 (IH-715 - rrdp-netdev: Remove double (de)serialization) Signed-off-by: Andrii Sultanov --- ocaml/networkd/bin/network_monitor_thread.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocaml/networkd/bin/network_monitor_thread.ml b/ocaml/networkd/bin/network_monitor_thread.ml index 9c4b7c3352..1b15dbe2a4 100644 --- a/ocaml/networkd/bin/network_monitor_thread.ml +++ b/ocaml/networkd/bin/network_monitor_thread.ml @@ -225,7 +225,8 @@ let rec monitor dbg () = let bonds : (string * string list) list = Network_server.Bridge.get_all_bonds dbg from_cache in - let devs = get_link_stats () |> get_stats bonds in + let add_bonds bonds devs = List.map fst bonds @ devs in + let devs = get_link_stats () |> add_bonds bonds |> get_stats bonds in ( if List.length bonds <> Hashtbl.length bonds_status then let dead_bonds = Hashtbl.fold