From ccc87386e78f0df78e284fb2f26fa27aa3bc518b Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Tue, 29 Sep 2026 15:26:25 +0530 Subject: [PATCH 1/3] fix: explain the hostname requirement when the executor cannot find its own container The executor finds its container by looking up a container named after its hostname. When hostname and container_name differ, startup failed with a bare "Own container not found". Name the hostname that was looked up and how to fix it, and make the README example keep hostname equal to container_name. --- README.md | 4 +++- app/http.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5beb066..ad5d231 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ version: '3' services: openruntimes-executor: container_name: openruntimes-executor - hostname: executor + hostname: openruntimes-executor stop_signal: SIGINT image: openruntimes/executor networks: @@ -74,6 +74,8 @@ volumes: > Notice we added bind to local `./functions` directory. That is only nessessary for this getting started, since we will be executing our custom function. +> Keep `hostname` the same as `container_name`. On startup, executor looks up its own container by the hostname to connect it to the runtime networks, and exits if no container name matches. + 3. Create `.env` file: ``` diff --git a/app/http.php b/app/http.php index 3d38724..bba5e96 100644 --- a/app/http.php +++ b/app/http.php @@ -40,7 +40,8 @@ /* Fetch own container information */ $hostname = gethostname() ?: throw new \RuntimeException('Could not determine hostname'); - $selfContainer = $orchestration->list(['name' => $hostname])[0] ?? throw new \RuntimeException('Own container not found'); + $selfContainer = $orchestration->list(['name' => $hostname])[0] + ?? throw new \RuntimeException(sprintf('Own container not found: no container name matches hostname "%s". Set the executor hostname to its container name', $hostname)); /* Create desired networks if they don't exist */ $network->setup( From 3e2d3da2d7eab7e72c50e7a28d3f03ada9be805d Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Tue, 29 Sep 2026 15:30:51 +0530 Subject: [PATCH 2/3] fix: describe the own container lookup as a substring match Docker's name filter matches any container whose name contains the hostname, so startup only fails when the hostname is not part of any container name. Restore the README example hostname, which already worked, and describe using the container name as the hostname as the safest setup rather than a strict rule. Tighten the exception message. --- README.md | 4 ++-- app/http.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad5d231..dabce99 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ version: '3' services: openruntimes-executor: container_name: openruntimes-executor - hostname: openruntimes-executor + hostname: executor stop_signal: SIGINT image: openruntimes/executor networks: @@ -74,7 +74,7 @@ volumes: > Notice we added bind to local `./functions` directory. That is only nessessary for this getting started, since we will be executing our custom function. -> Keep `hostname` the same as `container_name`. On startup, executor looks up its own container by the hostname to connect it to the runtime networks, and exits if no container name matches. +> On startup, executor looks up its own container by hostname to connect it to the runtime networks, and exits if the hostname is not part of any container name. Using the container name as the hostname is the safest setup. 3. Create `.env` file: diff --git a/app/http.php b/app/http.php index bba5e96..3e9c51a 100644 --- a/app/http.php +++ b/app/http.php @@ -41,7 +41,7 @@ /* Fetch own container information */ $hostname = gethostname() ?: throw new \RuntimeException('Could not determine hostname'); $selfContainer = $orchestration->list(['name' => $hostname])[0] - ?? throw new \RuntimeException(sprintf('Own container not found: no container name matches hostname "%s". Set the executor hostname to its container name', $hostname)); + ?? throw new \RuntimeException(sprintf('Own container not found for hostname "%s". Set the executor hostname to its container name.', $hostname)); /* Create desired networks if they don't exist */ $network->setup( From 7ef0398323566455fe98e7c087f24bb792c15849 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 5 Oct 2026 13:05:09 +0530 Subject: [PATCH 3/3] docs: explain why the example hostname finds its container --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dabce99..9772624 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ volumes: > Notice we added bind to local `./functions` directory. That is only nessessary for this getting started, since we will be executing our custom function. -> On startup, executor looks up its own container by hostname to connect it to the runtime networks, and exits if the hostname is not part of any container name. Using the container name as the hostname is the safest setup. +> On startup, executor looks up its own container by hostname to connect it to the runtime networks, and exits if the hostname is not part of any container name. In the example above, `executor` is part of `openruntimes-executor`, so the lookup succeeds; using the full container name as the hostname avoids relying on a partial match. 3. Create `.env` file: