frr: add detail when failing to connect to grout - #569
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughIn Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Currently, when trying to connect FRR from a edge container image and there is an issue on the socket or grout side, we only get the following logs: ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock Add more context so that we can more easily understand if this is a permission issue, a grout version check issue etc... ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: No such file or directory ... ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: Permission denied ... ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: Bad message Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Robin Jarry <rjarry@redhat.com>
Currently, when trying to connect FRR from a edge container image and there is an issue on the socket or grout side, we only get the following logs:
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock
Add more context so that we can more easily understand if this is a permission issue, a grout version check issue etc...
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: No such file or directory
...
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: Permission denied
...
ZEBRA: GROUT: grout_sync: waiting for grout at /run/grout.sock: Bad message
frr/zebra_dplane_grout.c
Modified grout_sync() to include the OS error text when connection to the grout socket fails. The log call at line 273 changed from logging "waiting for grout at %s" to "waiting for grout at %s: %s", passing strerror(errno) as the additional parameter. No other behavior changes: the function still schedules the next grout_sync timer on zrouter.master with the same 1-unit delay and returns when grout_ctx.sync_client is NULL. This makes logs show precise failures (e.g., "No such file or directory", "Permission denied", "Bad message") instead of repeating the same generic message.