Skip to content

Commit

Permalink
Add drop cache when change nodes state
Browse files Browse the repository at this point in the history
Current iptables fixture tears down nodes in order modify iptables.
When the machines started again the cached info must be
refreshed.

In case machines state changed like stop/reboot cashed info may
hide bugs in the node controllers or fail tests.
  • Loading branch information
bkopilov committed Dec 12, 2022
1 parent 1c97a89 commit 40036ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tests/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,8 @@ def set_iptables_rules_for_nodes(
for node in given_nodes:
given_node_ips.append(node.ips[0])
cluster.nodes.shutdown_given(given_nodes)

# Clear cached info about nodes after shutdown
cluster.nodes.drop_cache()
log.info(f"Given node ips: {given_node_ips}")

for _rule in iptables_rules:
Expand Down

0 comments on commit 40036ce

Please sign in to comment.