mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
hermes_hermes.1 ran on a worker while run_one.yml ran its script on the loop host. resolve_container_id.sh finds nothing node-locally on the manager, falls through to the cluster-wide branch and returns the task's ContainerID, which only the owning node's daemon knows, so `container exec` answered `No such container: 65801ca259a1` twenty times over 116 seconds. Run 33785198875, job 100756596935. Resolve the owning node and run there. meta/tests.yml gains container_service_key for the two roles that exec into their own container; a role without the key keeps the loop host, and role_tests returns the default for a missing path, so absence is a polarity rather than an error. The reset at run_one.yml:27-30 is unconditional and precedes every delegate_to. Without it the first loop iteration dies with 'CLI_HOST_NODE' is undefined, because _cli_apps starts with a role that has no key; the same task closes the fact leak that include_tasks leaves open between iterations. The resolve include is gated on an explicit length check rather than truthiness, or a keyless role would hang in resolve_host_cid's converge wait, and it caps that wait at 30 x 2s instead of inheriting 600 x 2s: the deploy is long finished by the time the CLI stage runs, so failing fast beats waiting twenty minutes. Staging, render and run all delegate. Delegating only the run would turn `No such container` into `No such file or directory`, since the assets would stay on the loop host. Both templates now carry CLI_LOCAL_CID: with the exec on the owning node the id is node-local, so container_address's deferred `$( ... )` is not needed, and it never survived `set -a && . test.env` anyway, which evaluates it once at source time. The stage directory is removed on the delegate too. tasks/main.yml clears it without delegation, i.e. only on the loop host, and the task's own name calls its contents decodable DB secrets. Measured locally rather than argued: self-delegation leaves file, copy with content, copy with src and shell byte-identical, including mode; the loop reset gives keyless roles an empty container and keeps CLI_HOST_NODE on the loop host across five iterations; and container_service_key resolves to hermes, openclaw and empty strings through the same walk cli.timeout already uses in production. Not fixed, and named so it is not forgotten: web-app-joomla, web-app-yourls and web-app-penpot exec from an IS_STACK_HOST gate without resolve_host_cid, so a task of theirs landing on a worker hits the same error from the same source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3 lines
129 B
Bash
3 lines
129 B
Bash
MCP_CLIENT_CONTAINER={{ CLI_LOCAL_CID }}
|
|
MCP_TEST_ENABLED={{ lookup('config', application_id, 'mcp.enabled') | string | lower }}
|