Skip to content

Workspace goes to failed state and cannot be started, stopped or deleted after cancel-start->stop->start actions #2683

Closed

Description

@nadzeyav

Problem

Workspace goes to failed state and cannot be started or stopped or deleted after cancel-start->stop->autostart actions

I have met with the issue, that I cannot work with my workspace, getting error Error: Error creating instance: googleapi: Error 409: The resource 'projects/coder-dogfood/zones/europe-west4-b/instances/coder-nadzeya-nadzeya-test-autostart' already exists

Steps to reproduce:

coder version:
Coder v0.7.4-devel+bbbd5241

  1. Create a workspace (for me it was windows-gcp template on dev.coder.com)
  2. Stop it
  3. Start it, but cancel action
  4. Stop it
  5. Try to start

Start fails with
Error: Error creating instance: googleapi: Error 409: The resource 'projects/coder-dogfood/zones/us-central1-a/instances/coder-nadzeya-nadzeya-windows' already exists, alreadyExists

And cannot perform any other actions

Events order list sample:

image

Definition of Done

If a start is cancelled, a user should be able to start/stop a workspace without problems

Activity

  1. misskniss commented on Aug 2, 2022

    @misskniss

    @bpmct can we get a couple of us together and see:

    • is this still happening?
    • what behavior do we expect in these cases?
  2. assigned and unassigned on Aug 16, 2022
  3. mafredri commented on Aug 16, 2022

    @mafredri
    Member

    I'm tackling this issue from the perspective that we currently terminate the Terraform process immediately on a cancel request which does not give Terraform a chance to clean up resources.

    This will be changed so that cancellation signals an interrupt and we will wait for Terraform to clean up. A second forceful cancellation request terminates Terraform and may leave resources but can be necessary in some cases where Terraform is stuck cleaning up.

  4. mafredri commented on Aug 18, 2022

    @mafredri
    Member

    With #3526 merged, I'm hoping this issue is fixed but I'll leave this ticket open for now in case there are more reports of it (it'll be part of the next release, the one after v0.8.5).

  5. ammario commented on Aug 18, 2022

    @ammario
    Member

    Let's reopen if there is a new report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions