Skip to content

Agent hangs on 'connecting' after workspace creation with an AWS template #3511

Closed
@Kira-Pilot

Description

@Kira-Pilot

User Statement

As a user, I expect my workspace agent to successfully connect when my workspace starts up.

Background

This ticket is related to #3510 and #3484 but is separate.

Sometimes (intermittently) when creating a workspace from a Linux on AWS EC2 template, the agent never connects. Instead, the API will always return an agent with a status connecting, regardless of the state the workspace is in. This was an issue on V1, as well.
Screen Shot 2022-08-15 at 1 18 15 PM

http://localhost:8080/api/v2/workspacebuilds/b03d224a-5c9e-4898-9137-82309336428d/resources

[
    {
        "id": "a8cccaa5-dd30-4cc4-9e80-5702eb3ddca7",
        "created_at": "2022-08-15T16:09:12.929660354Z",
        "job_id": "ad8a7372-f5b8-42c3-81d7-f10c9df37e43",
        "workspace_transition": "start",
        "type": "aws_instance",
        "name": "dev",
        "agents": [
            {
                "id": "d5e6ad18-2d20-43b9-8f9c-628a58ddd4ec",
                "created_at": "2022-08-15T16:09:12.929665153Z",
                "updated_at": "2022-08-15T16:09:12.929665273Z",
                "status": "connecting",
                "name": "main",
                "resource_id": "a8cccaa5-dd30-4cc4-9e80-5702eb3ddca7",
                "instance_id": "i-076b99682e3c319f7",
                "architecture": "amd64",
                "environment_variables": null,
                "operating_system": "linux",
                "apps": [],
                "wireguard_public_key": "nodekey:0000000000000000000000000000000000000000000000000000000000000000",
                "disco_public_key": "discokey:0000000000000000000000000000000000000000000000000000000000000000",
                "ipv6": "fd7a:115c:a1e0:43b9:8f9c:628a:58dd:d4ec/128"
            }
        ],
        "metadata": [
            {
                "key": "disk",
                "value": "8 GiB",
                "sensitive": false
            },
            {
                "key": "instance type",
                "value": "t3.micro",
                "sensitive": false
            },
            {
                "key": "region",
                "value": "us-east-1",
                "sensitive": false
            },
            {
                "key": "type",
                "value": "aws_instance",
                "sensitive": false
            }
        ]
    }
]

Pushing a trivial template update and updating the workspace does not fix this issue.

Definition of Done

When I create an AWS template and then use it to make a workspace,
Then I want that workspace's agents to connect successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions