From c18711b848d9362d40a7b9be94977ebc31057fe6 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Tue, 6 Oct 2026 20:19:12 -0400 Subject: [PATCH 1/2] fix(containerlab): Read the BMP collector's rotated logs in verify:bmp verify:bmp failed on any lab whose collector had run long enough for the kubelet to rotate its log. A router sends its Peer Ups once, when its BMP session opens, and the route-monitoring messages that follow push them out of the live file. kubectl logs reads only that file, so every session looked like it had never come up. The check now reads every log file the collector's pod has written on its node, compressed rotations included. It orders them by the kubelet's own file names (restart count, then rotation time, live file last) rather than by modification time, and joins lines the container runtime split into partial records. Co-Authored-By: Claude Opus 5.5 --- deploy/containerlab/scripts/verify-bmp.sh | 49 ++++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/deploy/containerlab/scripts/verify-bmp.sh b/deploy/containerlab/scripts/verify-bmp.sh index 10ff992b..11e2b31a 100755 --- a/deploy/containerlab/scripts/verify-bmp.sh +++ b/deploy/containerlab/scripts/verify-bmp.sh @@ -40,12 +40,57 @@ fi # session's address pair is unique to the router holding it. The local address # is GoBMP's router_ip, which both Peer Up and Peer Down carry; local_ip is # only on a Peer Up. -states=$(docker exec "$(control_plane iad)" kubectl logs -n galactic-system deploy/bmp-collector | +# +# A router sends its Peer Ups once, when its BMP session opens, and GoBMP logs +# every route-monitoring message after them, so on a lab that has run for a +# while the kubelet has rotated them out of the current log file. kubectl logs +# reads only that file, so this reads every file the collector's pod has +# written on its node instead, rotated and compressed ones included, oldest +# first. The kubelet names them .log for the live file and +# .log.[.gz] for each rotation, so sorting by restart +# count, then rotation time, with the live file last, puts them in order. Each +# line carries the CRI prefix "