Skip to content

Commit

Permalink
Reduce the firewall check period in agent firewall tests (#2966)
Browse files Browse the repository at this point in the history
* reduce firewall check period

* reduce firewall check period
  • Loading branch information
nagworld9 authored Oct 31, 2023
1 parent 0c4fe3a commit 5b04dc8
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 5b04dc8

Please sign in to comment.