From c77c50eb01ffcbbc21d75376e07c6d4d3c3921b4 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik <93182827+NikitaSkrynnik@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:27:45 +1100 Subject: [PATCH] add logs to waitForPeerUp function (#848) Signed-off-by: NikitaSkrynnik --- pkg/networkservice/up/peerup/common.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/networkservice/up/peerup/common.go b/pkg/networkservice/up/peerup/common.go index aa5c05d9..62cb7ad4 100644 --- a/pkg/networkservice/up/peerup/common.go +++ b/pkg/networkservice/up/peerup/common.go @@ -86,8 +86,10 @@ func waitForPeerUp(ctx context.Context, vppConn api.Connection, pubKey string, i for { select { case <-ctx.Done(): + log.FromContext(ctx).Infof("failed to get any WireguardPeerEvents: %s", ctx.Err()) return errors.Wrap(ctx.Err(), "provided context is done") case rawMsg := <-watcher.Events(): + log.FromContext(ctx).Infof("got WireguardPeerEvent: %v, %v", rawMsg.GetMessageName(), rawMsg.GetMessageType()) if msg, ok := rawMsg.(*wireguard.WireguardPeerEvent); ok && msg.PeerIndex == peerIndex && msg.Flags&wireguard.WIREGUARD_PEER_ESTABLISHED != 0 {