fix: explain the hostname requirement when the executor cannot find its own container - #256
HarshMN2345 wants to merge 2 commits into
Conversation
…ts 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.
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.
|
|
|
||
| > 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. |
There was a problem hiding this comment.
Conflicting hostname guidance The example directly above sets
hostname: executor and container_name: openruntimes-executor. It works because the hostname is part of the container name, but the new note recommends using the entire container name as the hostname. Clarifying why the example works would keep readers troubleshooting startup from receiving conflicting guidance.
| > 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. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 77
Comment:
**Conflicting hostname guidance** The example directly above sets `hostname: executor` and `container_name: openruntimes-executor`. It works because the hostname is part of the container name, but the new note recommends using the entire container name as the hostname. Clarifying why the example works would keep readers troubleshooting startup from receiving conflicting guidance.
```suggestion
> 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.
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
On startup the executor finds its own container by filtering container names with its hostname, and Docker's name filter matches any name that contains it. When the hostname is not part of the container name (Appwrite up to 1.9.0 used hostname
exc1with container_nameopenruntimes-executor), startup failed with a bare "Own container not found". The error now names the hostname it looked up and says how to fix it, and the README explains the lookup and suggests using the container name as the hostname. The logging part of the issue is already handled upstream, since the executor ships utopia-php/http rc23 or later, which keeps this exception as the previous one when the error hook fails.Fixes appwrite/appwrite#13016