diff --git a/config/config.yaml b/config/config.yaml index bcb98f26..1a1986c8 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -2,9 +2,10 @@ kraken: distribution: openshift # Distribution can be kubernetes or openshift kubeconfig_path: ~/.kube/config # Path to kubeconfig exit_on_failure: False # Exit when a post action scenario fails - port: 8081 publish_kraken_status: True # Can be accessed at http://0.0.0.0:8081 signal_state: RUN # Will wait for the RUN signal when set to PAUSE before running the scenarios, refer docs/signal.md for more details + signal_address: 0.0.0.0 # Signal listening address + port: 8081 # Signal port litmus_install: True # Installs specified version, set to False if it's already setup litmus_version: v1.13.6 # Litmus version to install litmus_uninstall: False # If you want to uninstall litmus if failure diff --git a/config/config_performance.yaml b/config/config_performance.yaml index 5ae09832..31cd6a89 100644 --- a/config/config_performance.yaml +++ b/config/config_performance.yaml @@ -2,9 +2,10 @@ kraken: distribution: openshift # Distribution can be kubernetes or openshift kubeconfig_path: ~/.kube/config # Path to kubeconfig exit_on_failure: False # Exit when a post action scenario fails - port: 8081 publish_kraken_status: True # Can be accessed at http://0.0.0.0:8081 signal_state: RUN # Will wait for the RUN signal when set to PAUSE before running the scenarios, refer docs/signal.md for more details + signal_address: 0.0.0.0 # Signal listening address + port: 8081 # Signal port litmus_version: v1.13.6 # Litmus version to install litmus_uninstall: False # If you want to uninstall litmus if failure litmus_uninstall_before_run: True # If you want to uninstall litmus before a new run starts diff --git a/run_kraken.py b/run_kraken.py index 603c4c8b..cc3a0d22 100644 --- a/run_kraken.py +++ b/run_kraken.py @@ -48,7 +48,8 @@ def main(cfg): publish_running_status = config["kraken"].get( "publish_kraken_status", False ) - port = config["kraken"].get("port", "8081") + port = config["kraken"].get("port") + signal_address = config["kraken"].get("signal_address") run_signal = config["kraken"].get("signal_state", "RUN") litmus_install = config["kraken"].get("litmus_install", True) litmus_version = config["kraken"].get("litmus_version", "v1.9.1") @@ -109,11 +110,16 @@ def main(cfg): # Set up kraken url to track signal if not 0 <= int(port) <= 65535: - logging.info( - "Using port 8081 as %s isn't a valid port number" % (port) + logging.error( + "%s isn't a valid port number, please check" % (port) ) - port = 8081 - address = ("0.0.0.0", port) + sys.exit(1) + if not signal_address: + logging.error( + "Please set the signal address in the config" + ) + sys.exit(1) + address = (signal_address, port) # If publish_running_status is False this should keep us going # in our loop below