Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Research and document how to gracefully shut down agents using different terraform providers (update templates) #6174

Open
Labels
docsArea: coder.com/docs
@mafredri

Description

@mafredri

To ensure workspaces (and agents) are stopped gracefully, we want to make sure Terraform providers are configured in a way that tries (best-effort) to respect the agent shutdown procedure.

What does graceful shutdown mean? It means the provider issues akill -INT [coder_agent_pid] (one ofHUP,INT,TERM) when the resource is stopped. After a specified timeout, it may issuekill -KILL [coder_agent_pid] to ensure de-provision progresses.

Note: This will not be the primary form of ensuring an agent is stopped gracefully. In the ideal scenario, this happens in a pre-provision step and this acts as a safety net (#6175).

We need to figure out how to perform graceful shutdown with (or verify that it works):

Eventually:

  • Update documentation and example templates

Related:#4677,#5914,#6139


Docker:

resource"docker_container""workspace" {destroy_grace_seconds=30stop_timeout=30stop_signal="SIGINT"}

EDIT: It looks likedestroy_grace_seconds is required to trigger a graceful stop,stop_{timeout,signal} is insufficient alone. It may be thatstop_{timeout,signal} can be omitted in normal use-cases though (needs verification).

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsArea: coder.com/docs

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp