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

Reduce the firewall check period in agent firewall tests #2966

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
WIRESERVER_ENDPOINT_FILE = '/var/lib/waagent/WireServerEndpoint'
WIRESERVER_IP = '168.63.129.16'
VERSIONS_PATH = '/?comp=versions'
FIREWALL_PERIOD = 60
FIREWALL_PERIOD = 30


class FirewallRules(object):
Expand Down Expand Up @@ -144,7 +144,7 @@ def check_all_iptables() -> bool:

log.info("-----Verifying all ip table rules are present in rule set")
# Agent will re-add rules within OS.EnableFirewallPeriod, So waiting that time + some buffer
found: bool = retry_if_false(check_all_iptables, attempts=2, delay=FIREWALL_PERIOD+30)
found: bool = retry_if_false(check_all_iptables, attempts=2, delay=FIREWALL_PERIOD+15)

if not found:
fail("IP table rules missing in rule set.\n Current iptable rules:\n {0}".format(
Expand Down
Loading