Skip to content

Conversation

@pjohnst5
Copy link
Contributor

@pjohnst5 pjohnst5 commented Mar 12, 2020

What this PR does / why we need it:
This PR adds monitoring of prerouting and postrouting rules in ebtables.

  • It will delete any unwanted rules added to prerouting and postrouting (i.e. if the rule was not added through a pod).
  • It will add back any rules that were incorrectly deleted from prerouting and postrouting (i.e. if the rule was not deleted through a pod).

Testing

  • Added rogue rule via terminal, saw network monitor wait one iteration before deleting rogue rule
  • Deleted rule in rogue fashion via terminal, saw network monitor wait one iteration before adding rule back from state
  • Flushed rules via terminal in rogue fashion, saw network monitor wait one iteration before adding all rules back
  • Made new pods, network monitor didn't touch those rules, left them as was and saved these new pod rules in state.
  • Deleted these new pod rules in rogue fashion via terminal, network monitor added them back after one iteration
  • Deleted pods normally, network monitor didn't touch missing rules, did not try to add them back
  • Tried adding old rule that had been added by pod in the past, network monitor removed it
  • Did nothing for 5 minutes. Network monitor did nothing to rules.
  • Tested wget pod to pod connectivity, both within same node and different nodes
  • Tested wget pod connectivity to google.com

Ebtable functionality was also cleaned up by taking common functionality of set methods and placing it in one runEbCmd method.

Which issue this PR fixes
An adaptation of this PR from two years ago:

@pjohnst5 pjohnst5 requested a review from tamilmani1989 March 12, 2020 22:24
@pjohnst5 pjohnst5 requested a review from tamilmani1989 March 13, 2020 18:31
@pjohnst5 pjohnst5 requested a review from tamilmani1989 March 13, 2020 19:55
@tamilmani1989
Copy link
Member

windows tests are flaky..no changes in windows made..so merging this PR

@tamilmani1989 tamilmani1989 merged commit 17e2c7d into Azure:master Mar 18, 2020
@pjohnst5 pjohnst5 deleted the network-monitor-changes branch March 19, 2020 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants