Skip to content

[Bug]: container logs --follow needs to flush output. #315

@jglogan

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

At present, if a process spawns container logs --follow foo and pipes the output to a read loop, the reader won't see all the output because the container code that tails the log isn't set up to flush after every write.

Current behavior

test.py.zip

This script illustrates the issue. It will follow the boot logs through netlink initialization but the end of the logs does not output.

Expected behavior

The script should follow the logs to output that looks like:

025-07-08T22:20:01+0000 debug vminitd : [vminitd] starting to wait4 processes
2025-07-08T22:20:01+0000 debug vminitd : [vminitd] finished wait4 of 1 processes
2025-07-08T22:20:01+0000 debug vminitd : exits=[88: 0] processes=1 [vminitd] checking for exit of managed process
2025-07-08T22:20:01+0000 debug vminitd : containerID=test id=test [vminitd] waitProcess

Environment

- OS: macOS 15
- Xcode: 17 beta
- Container: container CLI version 0.2.0-12-ga7799d0 (build: debug, commit: a7799d0)

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions