Title: Refactor coder agent SSH server for better process and connection control · Issue #6177 · coder/coder · GitHub
Open Graph Title: Refactor coder agent SSH server for better process and connection control · Issue #6177 · coder/coder
X Title: Refactor coder agent SSH server for better process and connection control · Issue #6177 · coder/coder
Description: This is, in part, to better support shutdown_scripts as part of #4677 and #6139. But improved user experience is also a big factor. Problem: Even though the coder agent initiates a graceful shutdown, the SSH connections are abruptly clos...
Open Graph Description: This is, in part, to better support shutdown_scripts as part of #4677 and #6139. But improved user experience is also a big factor. Problem: Even though the coder agent initiates a graceful shutdow...
X Description: This is, in part, to better support shutdown_scripts as part of #4677 and #6139. But improved user experience is also a big factor. Problem: Even though the coder agent initiates a graceful shutdow...
Opengraph URL: https://github.com/coder/coder/issues/6177
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Refactor coder agent SSH server for better process and connection control","articleBody":"This is, in part, to better support `shutdown_scripts` as part of #4677 and #6139. But improved user experience is also a big factor.\r\n\r\n**Problem:** Even though the coder agent initiates a graceful shutdown, the SSH connections are abruptly closed leaving SSH clients hanging. Similarly any process started inside an SSH session will be left running (e.g. `sleep 1000 &`) after the SSH server is closed.\r\n\r\nTo improve upon this, we need to:\r\n\r\n- [ ] ~~For all active sessions with TTYs, print a message that the workspace is closing~~\r\n\t- Let's defer this, see https://github.com/coder/coder/issues/6177#issuecomment-1471324332\r\n- [x] https://github.com/coder/coder/pull/7027\r\n- [ ] Send an interrupt (e.g. `SIGHUP`) to the commands/shells started via SSH\r\n\t- [ ] Wait for processes to exit (for some amount of time)\r\n\t- [ ] Sens `SIGKILL` to the remaining processes\r\n- [ ] Stop accepting new SSH connections (potentially allow `--debug` or similar flag overrides)\r\n- [ ] Do not run `shutdown_script` until the above is complete\r\n- [x] https://github.com/coder/coder/pull/7004\r\n\r\n~~I think it would make sense to refactor SSH functionality for the agent as a separate package, e.g. `agentssh` or `agent/sshd`.~~ See list above.\r\n\r\nFuture work/ideas:\r\n\r\n- Consider forking/forkexec `coder agent` to manage new SSH connections\r\n\t- This could allow the coder agent to be updated without terminating active connections","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2023-02-13T12:45:22Z","url":"https://github.com/coder/coder/issues/6177"}
| 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:dc92b234-271a-a5a5-5eff-ef9ee5b8ba12 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D08:3CBB3E:1C0E402:23BE6CF:6B019BBE |
| html-safe-nonce | b9773a3081029bbf35cdadb8074f3f08195d771bfb1fe2b480dcee37d7e13e7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDA4OjNDQkIzRToxQzBFNDAyOjIzQkU2Q0Y6NkIwMTlCQkUiLCJ2aXNpdG9yX2lkIjoiNjI2NjE4MTgxMTQ3NTQyMjE0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ceea213a2070fd6fc6f5f87efbc95031b5c5546ccbedd814ae242a2a9a4868fe |
| hovercard-subject-tag | issue:1582286589 |
| 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/6177/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e6610f004b6dc2ec0c6a3824c86ffb8f064c3c4f086360e582deed2490687972/coder/coder/issues/6177 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e6610f004b6dc2ec0c6a3824c86ffb8f064c3c4f086360e582deed2490687972/coder/coder/issues/6177 |
| og:image:alt | This is, in part, to better support shutdown_scripts as part of #4677 and #6139. But improved user experience is also a big factor. Problem: Even though the coder agent initiates a graceful shutdow... |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width