Problem
Debugging startup issues is very difficult because:
-
vinyl-agent produces zero logs when stuck in waitForPort() — it silently waits up to 60s with no output, making it impossible to tell if the binary started, what it's waiting for, or why it can't connect.
-
varnish container produces minimal logs — only "Child launched OK" and mlock warnings. No information about which flags were used, which ports are listening, or whether the admin CLI is enabled.
-
Operator logs show connection errors but don't indicate whether the issue is networking, the agent not running, or varnish not having admin CLI enabled.
Suggested improvements
vinyl-agent (cmd/agent/main.go)
- Log at startup: agent version, listen address, admin address
- Log each
waitForPort attempt: "waiting for varnish admin on 127.0.0.1:6082 (attempt 3/30)"
- Log when admin port becomes available: "varnish admin ready"
- Log when secret is read successfully
- Log when HTTP server starts listening: "vinyl-agent listening on :9090"
Operator (internal/controller/)
- When VCL push fails, log the pod's container statuses (running/waiting/terminated)
- Log the agent image being used when creating StatefulSet
- Log the varnish args being set
varnish container
- Consider adding an init log showing the effective varnishd command line
Problem
Debugging startup issues is very difficult because:
vinyl-agent produces zero logs when stuck in
waitForPort()— it silently waits up to 60s with no output, making it impossible to tell if the binary started, what it's waiting for, or why it can't connect.varnish container produces minimal logs — only "Child launched OK" and mlock warnings. No information about which flags were used, which ports are listening, or whether the admin CLI is enabled.
Operator logs show connection errors but don't indicate whether the issue is networking, the agent not running, or varnish not having admin CLI enabled.
Suggested improvements
vinyl-agent (cmd/agent/main.go)
waitForPortattempt: "waiting for varnish admin on 127.0.0.1:6082 (attempt 3/30)"Operator (internal/controller/)
varnish container