Skip to content

kolla: Pass the host list in a file - #2979

Merged
berendt merged 1 commit into
mainfrom
fix-kolla-hosts-fallback-notice
Oct 20, 2026
Merged

berendt merged 1 commit into
mainfrom
fix-kolla-hosts-fallback-notice

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

collect-kolla-logs.yml (from #2977) printed its fallback notice to stderr and looped over the stdout lines of the host discovery task. Zuul's command module merges stderr into stdout unless a job sets ansible-split-streams, and the testbed jobs don't set it. In CI the notice therefore landed in the host list.

When osism get hosts yielded nothing, the container health and log copy loops word-split the notice and ran ssh against osism, yielded, no, falling, back, to and /opt/configuration/inventory/10-custom before the real hosts. The copy loop also left a stray kolla/opt/configuration/ directory in the uploaded logs. An ssh or awk error from the manager would have been treated the same way. Seen in build cd1702dd (testbed-deploy-next-in-a-nutshell-with-tempest-ubuntu-24.04, periodic).

Change

  • The discovery task writes the host list to a file on the orchestrator node. A slurp task reads it back, and the loops take their hosts from there. Stdout now carries only messages, whichever stream mode the job runs in.
  • The fallback notice goes to stdout. The discovery output is printed with the copy summary, so a local run and a Zuul run report it the same way.
  • The summary also runs when no host was found, so the job output shows why nothing was collected.

Testing

  • yamllint and ansible-lint pass.
  • I tested the file handoff alone in a stripped-down local playbook, with the notice and an ssh error line written by the discovery step:
    • With hosts, the loop gets exactly the hosts.
    • With an empty host list or a skipped discovery task, the loop is skipped.
    • In every case the notice and the error still appear in the summary.
  • Not yet exercised in Zuul. The play only collects on failed builds, so a green zuul-label run would skip it; covering it needs a failing build.

🤖 Generated with Claude Code

collect-kolla-logs.yml printed its fallback notice to stderr and looped
over the stdout lines of the host discovery task. Zuul's command module
merges stderr into stdout unless a job sets ansible-split-streams, so
in CI the notice ended up in the host list. When "osism get hosts"
yielded nothing, the health and copy loops word-split "'osism get
hosts' yielded no hosts, falling back to
/opt/configuration/inventory/10-custom" and ran ssh against "yielded",
"no", "falling", ... before the real hosts. The copy loop also left a
stray kolla/opt/configuration/ directory in the uploaded logs, because
rmdir removed only the leaf of the path it created. An ssh or awk error
from the manager would have been treated the same way.

The discovery task now writes the host list to a file, and the loops
take it from there, so stdout carries only messages in both stream
modes. The notice goes to stdout, and the discovery output is printed
with the copy summary, so a local run and a Zuul run report it the same
way. The summary also runs when no host was found, so the job output
shows why nothing was collected.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship
ideaship marked this pull request as ready for review October 20, 2026 12:33
@ideaship
ideaship requested a review from berendt October 20, 2026 12:33
@berendt
berendt merged commit ffcbdca into main Oct 20, 2026
3 checks passed
@berendt
berendt deleted the fix-kolla-hosts-fallback-notice branch October 20, 2026 12:56
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Oct 20, 2026
@ideaship ideaship self-assigned this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants