napalm-logs icon indicating copy to clipboard operation
napalm-logs copied to clipboard

[385] Fix for stuck consumers due to unsafe host key access

Open moogzy opened this issue 5 months ago • 1 comments

This PR addresses: https://github.com/napalm-automation/napalm-logs/issues/385

Vendors like IOS-XR by default send messages with no hostname. The napalm-logs ios-xr parser was updated to support this default behaviour. However, server.py has unsafe access logic for the host key in msg_dict which can cause the consumer/listeners to become stuck as they are expecting messages to have a host key for lookup.

This PR turns makes the host key access safe and returns a default value of "unknown" if the host key doesn't exist.

Signed-off-by: Adrian Arumugam [email protected]

moogzy avatar May 12 '25 15:05 moogzy