Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect rp_filter from all network interface in aws-cni-support.sh #338

Merged
merged 1 commit into from
Mar 5, 2019
Merged

Collect rp_filter from all network interface in aws-cni-support.sh #338

merged 1 commit into from
Mar 5, 2019

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Mar 5, 2019

Description of changes:

Currently aws-cni-support.sh outputs rp_filter from eth0. Although
eth0 is fixed value, some env have different name such as ens5,
so the script fails on non-eth0 env.

This patch changes the script to collect rp_filter from all interface on
the host.

Issue

Fixes #213

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Additional Note

I considered to collect only specific interfaces, but I changed to
collect rp_filter from all interface with these reasons:

  • To collect rp_filter from only primary interface, the script becomes complicated to read.
  • Even if dumping rp_filter from all ENI, the lines are less than 100.
  • All dump may find some unusual settings from other interfaces. So it still has some value.

Fixes #213

Currently `aws-cni-support.sh` outputs rp_filter from `eth0`. Although
`eth0` is fixed value, some env have different name such as `ens5`.

This patch changes the script to dump rp_filter from all interface on
the host.
@@ -66,7 +66,7 @@ ip route show table all >> $LOG_DIR/$ROUTE_OUTPUT

# dump relevant sysctls
echo "================== sysctls ==================" > ${LOG_DIR}/sysctls.out
for f in /proc/sys/net/ipv4/conf/{all,default,eth0}/rp_filter; do
for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nak3, good catch.

@mogren mogren merged commit f2d6007 into aws:master Mar 5, 2019
@mogren mogren added this to the v1.4 milestone Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update scripts/aws-cni-support.sh to report sysctls on non-eth0 primary interface
2 participants