Skip to content

fail provision with clear message when runtime-automation dir is missing#61

Open
prakhar1985 wants to merge 2 commits into
mainfrom
fix-runtime-automation-missing-dir
Open

fail provision with clear message when runtime-automation dir is missing#61
prakhar1985 wants to merge 2 commits into
mainfrom
fix-runtime-automation-missing-dir

Conversation

@prakhar1985
Copy link
Copy Markdown
Contributor

@prakhar1985 prakhar1985 commented Apr 17, 2026

Problem

When a content author sets showroom_ansible_runner_api: true in their AgV catalog but forgets to add a runtime-automation/ directory to their content repo, podman-compose fails silently at startup with:

Error: statfs /opt/showroom/content/runtime-automation: no such file or directory

This causes showroom.service to exit 125. The provision appears to succeed but the showroom is unreachable — the OCP pod is marked not-ready and the router returns 503.

Root cause: The default for showroom_ansible_runner_api is false. The failure only occurs when a dev explicitly enables it in their AgV config without providing the required runtime-automation/ directory in the content repo.

Fix

Add an early check in 30-showroom-clone-and-inject.yml (after clone, before compose is rendered) that fails the provision immediately with a clear, actionable message:

showroom_ansible_runner_api is true but the content repo
'https://github.com/...' (ref: main)
does not contain a runtime-automation/ directory.
Add runtime-automation/ with at least module-XX/solve.yml and
module-XX/validation.yml stubs, or set showroom_ansible_runner_api: false.

The stat and fail tasks are both gated on showroom_ansible_runner_api | bool, so there is zero overhead for the common case where it is false.

Behaviour

showroom_ansible_runner_api runtime-automation/ in repo Result
false (default) both tasks skipped, no change
true ✅ present stat passes, no failure
true ❌ missing provision fails with clear message

prakhar added 2 commits April 17, 2026 12:39
If a showroom content repo does not include runtime-automation/,
podman-compose fails with:
  statfs /opt/showroom/content/runtime-automation: no such file or directory

This causes showroom.service to exit 125 and the OCP pod to be
marked not-ready, returning 503 from the router.

After cloning the content repo, stat the runtime-automation/ dir.
If showroom_ansible_runner_api is true but the directory is absent,
set the variable to false so compose_default_template.j2 skips the
ansible-runner-api service block entirely.
Instead of silently disabling the runner or letting podman-compose
crash at startup with an opaque statfs error, fail early with an
actionable message telling the content author exactly what to add.
@prakhar1985 prakhar1985 changed the title disable ansible-runner-api when runtime-automation dir is missing fail provision with clear message when runtime-automation dir is missing Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants