Skip to content

Coder ssh during provision results in error after wait: workspace "test" has no agents #5836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mafredri opened this issue Jan 24, 2023 · 1 comment · Fixed by #7650
Closed
Assignees
Labels
api Area: HTTP API cli Area: CLI s3 Bugs that confuse, annoy, or are purely cosmetic
Milestone

Comments

@mafredri
Copy link
Member

mafredri commented Jan 24, 2023

At first we stream the build log, which is fine. But after it has finished, there is a short interval during which workspace agents don't yet exist. The SSH command doesn't like this.

Ultimately we should probably not consider the provisioning done until the database is fully prepared.

> coder ssh test
✔ Queued [255ms]
✔ Setting up [658ms]
⧗  Planning infrastructure
  data.coder_provisioner.me: Refreshing...
  data.coder_workspace.me: Refreshing...
  data.coder_provisioner.me: Refresh complete after 0s [id=33a5d798-7c27-4e59-b847-0f2fcc5eb291]
  data.coder_workspace.me: Refresh complete after 0s [id=62d19979-744d-4651-9ac6-9ce8352c0859]
  coder_agent.main: Refreshing state... [id=39b456e6-7317-4b02-bd6a-100d4fe86e65]
  coder_agent.main: Refresh complete [id=39b456e6-7317-4b02-bd6a-100d4fe86e65]
  coder_agent.main: Drift detected (update)
  null_resource.workspace[0]: Plan to create
  Plan: 1 to add, 0 to change, 0 to destroy.
✔ Planning infrastructure [1401ms]
⧗  Starting workspace
  Terraform 1.3.4
  null_resource.workspace[0]: Plan to create
  null_resource.workspace[0]: Creating...
  null_resource.workspace[0]: Provisioning with 'local-exec'...
  null_resource.workspace[0]: (local-exec): (output suppressed due to sensitive value in config)
  null_resource.workspace[0]: (local-exec) Provisioning complete
  null_resource.workspace[0]: Creation complete after 5s [id=285218828837375588]
  Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
  Outputs: 0
✔ Starting workspace [6158ms]
✔ Cleaning Up [108ms]
workspace "test" has no agents
Run 'coder ssh --help' for usage.
@mafredri mafredri added bug api Area: HTTP API cli Area: CLI labels Jan 24, 2023
@bpmct bpmct added the s3 Bugs that confuse, annoy, or are purely cosmetic label Feb 9, 2023
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label May 11, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
@mafredri mafredri reopened this May 22, 2023
@mtojek mtojek added sprint-0 and removed stale This issue is like stale bread. labels May 22, 2023
@mafredri mafredri self-assigned this May 22, 2023
@ammario ammario added this to the 🧹 Sprint 0 milestone May 22, 2023
@ammario ammario removed the sprint-0 label May 22, 2023
@matifali matifali added the bug label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API cli Area: CLI s3 Bugs that confuse, annoy, or are purely cosmetic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants