diff --git a/buildpack/start.py b/buildpack/start.py index df2fa5400..03621c775 100755 --- a/buildpack/start.py +++ b/buildpack/start.py @@ -190,17 +190,20 @@ def _register_signal_handlers(): telegraf.run(runtime_version) datadog.run(model_version, runtime_version) fluentbit.run(model_version, runtime_version) - metering.run() logs.run(m2ee) runtime.run(m2ee, logs.get_loglevels()) metrics.run(m2ee) appdynamics.run() nginx.run() - # Wait for the runtime to be ready before starting Databroker + # Block of code where the order is important + # Wait for the Runtime to be ready before starting Databroker and User-metering Sidecar to not block the Runtime from start + runtime.await_database_ready(m2ee) + metering.run() if databroker.is_enabled(): - runtime.await_database_ready(m2ee) databroker_processes.run(database.get_config()) + # End of the block where order is important + except RuntimeError as re: # Only the runtime throws RuntimeErrors (no pun intended) # Don't use the stack trace for these diff --git a/tests/integration/runner.py b/tests/integration/runner.py index 36bbb5d81..ccc7dc3aa 100755 --- a/tests/integration/runner.py +++ b/tests/integration/runner.py @@ -141,7 +141,7 @@ def stage( return result - def start(self, start_timeout=120, health="healthy"): + def start(self, start_timeout=180, health="healthy"): self._check_for_cflocal() if not self._container_id: @@ -500,7 +500,7 @@ def stage(self, *args, **kwargs): return super().stage(*args, **kwargs) - def start(self, start_timeout=120, health="healthy"): + def start(self, start_timeout=180, health="healthy"): # Wait until the database is up @backoff.on_predicate(backoff.expo, lambda x: x > 0, max_time=30) def _await_database():