diff --git a/utils/containers.py b/utils/containers.py index 25d4c534fc1aec2f23a72361c8e38551f2f08351..e2de7c4fdbc4f8def7de167b0725a58471fdc049 100644 --- a/utils/containers.py +++ b/utils/containers.py @@ -13,6 +13,7 @@ import requests from .util import run_cmd_bg, Logger CONTAINER_ENGINE = os.getenv("ENGINE", "docker") +REBROADCAST_VIEW = os.getenv("REBROADCAST_VIEW", None) class ContainerBuilder: @@ -509,13 +510,17 @@ class ClusterConductor: f"Warning: Node {i} IP addr changed from {node.ip} to {container_ip}" ) node.ip = container_ip - if CONTAINER_ENGINE == "podman": + if CONTAINER_ENGINE == "podman" or REBROADCAST_VIEW is not None: if hasattr(self, "_parent"): self._parent.clients[ node.index ].base_url = self.node_external_endpoint(node.index) view_changed = True - if CONTAINER_ENGINE == "podman" and view_changed and hasattr(self, "_parent"): + if ( + (CONTAINER_ENGINE == "podman" or REBROADCAST_VIEW is not None) + and view_changed + and hasattr(self, "_parent") + ): self._parent.rebroadcast_view(self.get_shard_view()) DeprecationWarning("View is in updated format")