GetForwardedIps issues on RHEL7
See original GitHub issueWhen GetForwardedIps runs _RunIpRoute (effective command: ip route ls table local type local scope host dev eth0 proto 66), the result is 0 or more lines. If there is one or more forwarded ips, they are returned one per line but have "local " prepended to them. This causes ParseForwardedIps to fail.
That may not be the case on other systems, but a simple solution works for all of them. Before returning from GetForwardedIps, simply do a search & replace:
result = re.sub(r'local\s((\d{1,3}\.){3}\d{1,3}(/\d{1,2})?)\s?\n', r'\1\n',result)
then return as normal. If there is a "local " tag, it gets removed, if not, nothing changes. This helped me stop thousands of warnings from filling up /var/log/messages with: google-ip-forwarding: WARNING Could not parse IP address: “local”.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
I have the same error message in the syslog of one of my GKE nodes running 1.13.7-gke.8, which I think is cos-u-73-11647-182-0 according to https://cloud.google.com/kubernetes-engine/docs/release-notes
Just to be sure, is this error just polluting syslogs, or can it also cause networking problems? I have noticed some timeouts on my cluster when trying to connect to my redis broker. Is it possible it might be related?
@brendan-rius have you discovered the reason of your timeouts back then and is it correlated with this log pollution?