coder / coder-logstream-kube

Stream Kubernetes Pod events to the Coder startup logs
GNU Affero General Public License v3.0
16 stars 4 forks source link

workspace agents are unauthorized #73

Open ericpaulsen opened 1 month ago

ericpaulsen commented 1 month ago

reproduced on Coder 2.13.4, 2.15.0, using both 0.0.9 and 0.0.11 of coder-logstream-kube. i see we updated the SDK to the v2 agent API, but is it possible this update was bugged? https://github.com/coder/coder-logstream-kube/pull/47

logs:

2024-09-26 18:02:32.051 [erro]  post log source  resource_name=coder-eric-pycharm ...
    error= POST https://eng.demo.coder.com/api/v2/workspaceagents/me/log-source: unexpected status code 401: Workspace agent not authorized.: Try logging in using 'coder login'.
                Error: The agent cannot authenticate until the workspace provision job has been completed. If the job is no longer running, this agent is invalid.
coadler commented 1 month ago

So far I'm unable to reproduce on v0.0.11 and coder v2.16. I can reproduce the 401 logs, but those are expected due to how agents can't connect before the build finishes. I'll need a more complete picture of logs from logstream-kube and coderd from around the same timeframe. image