cloudfoundry / cloudfoundry/bosh-cli
Errand Log Streaming
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 186
- Forks
- 170
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 3
Description
Summary
Currently, when executing a BOSH errand via the CLI (bosh run-errand ), operators do not receive any log output until the errand completely finishes (or fails). We are requesting a feature to stream the errand's stdout and stderr logs to the BOSH CLI in real-time as the errand executes.
Current Behavior
When an operator runs an errand, the CLI initiates the task and waits. For long-running errands (like database migrations, heavy smoke tests, or large data cleanups), the operator sits looking at a static screen for minutes or even hours.
There is no visibility into whether the errand is actively progressing, hung, or stuck in a retry loop.
The logs are only fetched and dumped to the console after the errand exits.
Desired Behavior
The bosh run-errand command should stream the logs (both stdout and stderr) from the errand VM directly to the user's terminal in real-time.
As the script running on the VM outputs a line, it should appear in the CLI task output.
If log streaming is too verbose for certain users, it could be hidden behind a flag (e.g., bosh run-errand --stream-logs), though defaulting to streaming (similar to standard CI/CD pipelines) would provide the best operator experience.
Use Cases & Motivation
Improved Operator Experience: Operators won't have to guess if a 20-minute database migration has stalled.
Faster Debugging: If an errand gets stuck in an infinite loop, an operator can see it immediately, cancel the task, and fix the issue, rather than waiting for a hard timeout.
Consistency: Other ecosystem tools (like Kubernetes pods or standard Docker containers) default to real-time log streaming. Bringing this to BOSH errands modernizes the deployment experience.
Acceptance Criteria
[ ] The BOSH Director captures real-time stdout/stderr from the errand execution via the agent.
[ ] The BOSH CLI displays these logs as they are generated during the run-errand task.
[ ] The final log archive is still successfully gathered and stored by the Director upon errand completion, preserving backward compatibility.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the bosh run-errand command and how its task output moves between the CLI, Director, and agent. Check the existing errand log retrieval and final archive behavior, then define how stdout and stderr reach the terminal while execution continues. Done means real-time display works and the final log archive remains available after completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100