Title: Graceful shutdowns for coder agents and shutdown scripts · Issue #6175 · coder/coder · GitHub
Open Graph Title: Graceful shutdowns for coder agents and shutdown scripts · Issue #6175 · coder/coder
X Title: Graceful shutdowns for coder agents and shutdown scripts · Issue #6175 · coder/coder
Description: In the ideal scenario where a workspace agent is connected to the coder server, we should initiate agent shutdown before we initiate Terraform provisioning to destroy/re-create the resource(s). Why? Providers behave differently, some may...
Open Graph Description: In the ideal scenario where a workspace agent is connected to the coder server, we should initiate agent shutdown before we initiate Terraform provisioning to destroy/re-create the resource(s). Why...
X Description: In the ideal scenario where a workspace agent is connected to the coder server, we should initiate agent shutdown before we initiate Terraform provisioning to destroy/re-create the resource(s). Why...
Opengraph URL: https://github.com/coder/coder/issues/6175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Graceful shutdowns for coder agents and shutdown scripts","articleBody":"In the ideal scenario where a workspace agent is connected to the coder server, we should initiate agent shutdown _before_ we initiate Terraform provisioning to destroy/re-create the resource(s).\r\n\r\n**Why?**\r\n\r\n- Providers behave differently, some may not initiate graceful shutdowns and we might not be able to control timeouts for them\r\n- Template authors may use the agent `shutdown_script` to perform a critical task that must complete successfully (e.g. backing up filesystem)\r\n\t- The task/script may take a long time\r\n- We can leave the workspace running and allow debugging an agent that didn't successfully execute its `shutdown_script`\r\n\r\n**To consider:**\r\n\r\n- At the end we must not _exit_ the agent process\r\n\t- _Only applies when graceful shutdown is initiated by coder server!_\r\n\t- We should de-register signal handlers and wait \"indefinitely\"\r\n\t- Let the next signal terminate the process\r\n\t- Why? This prevents e.g. a systemd service from restarting the agent\r\n- Should behavior differ if a workspace is started/stopped?\r\n- What happens when an agent is disconnected and we can't tell it to shut down? -> Block or allow de-provision? Require the use of \"force\"?\r\n\r\nRelated: #4677, #5914, #6139","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2023-02-13T12:01:21Z","url":"https://github.com/coder/coder/issues/6175"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f19de135-fcb0-bf72-babc-0f0415828258 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D16C:1050BD:4CA9DF:65866A:6B019B85 |
| html-safe-nonce | 4a5b8d8223a7c048cd3b50747f721ff6cbcdd7231220097728aae04cf65716d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTZDOjEwNTBCRDo0Q0E5REY6NjU4NjZBOjZCMDE5Qjg1IiwidmlzaXRvcl9pZCI6IjI3MzExODY3MTc2ODcxMjY5MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 47e6c971e618c88b8cabd5234e3023883d33e7e98e92cc72aa5a114f063dd735 |
| hovercard-subject-tag | issue:1582219729 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/6175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/821e0498f107a5feeed2edf21983a422cf5a02b2ad5361ddae035a02659fac49/coder/coder/issues/6175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/821e0498f107a5feeed2edf21983a422cf5a02b2ad5361ddae035a02659fac49/coder/coder/issues/6175 |
| og:image:alt | In the ideal scenario where a workspace agent is connected to the coder server, we should initiate agent shutdown before we initiate Terraform provisioning to destroy/re-create the resource(s). Why... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mafredri |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width