Commit Graph

11 Commits

Author SHA1 Message Date
Steven Masley 4dc293d930
chore: add date information to windows startup logs (#12905) 2024-04-10 09:41:05 -05:00
Kyle Carberry a6b8f381f0
feat: support windows containers in bootstrap script (#12662)
Fixes #7462.
2024-03-22 14:48:51 +00:00
Colin Adler 39846d69d3
feat: modify agent install script to give `CAP_NET_ADMIN` if available (#9908) 2023-10-03 17:34:29 -05:00
Kyle Carberry 7fa6483d84
fix: allow the `BINARY_DIR` to be configured in the agent script (#6567) 2023-03-11 19:39:40 +00:00
Denbeigh Stevens 43b8cf04f0
fix: remove pipefail from standard shell options (#3269)
This isn't well-supported by every POSIX shell anyways.
2022-07-28 18:50:04 +00:00
Kyle Carberry 8e17254785
fix: Add test for wrapping init script with single quotes (#2979)
This ensures our initialization script works with single  uotes.
2022-07-13 17:43:48 -05:00
Cian Johnston 0f5f30b6f6
fix: make agent scripts easier to troubleshoot (#2922)
- Adds distinct exit statuses to the bootstrap scripts
- Makes the bootstrap scripts loop forever trying to download the coder agent
- Surfaces and logs the status codes returned by the download tool
2022-07-13 10:17:40 +01:00
Kyle Carberry 6f34cbff1e
fix: Use double quotes for `trap` signal (#2956)
Frequently callers will wrap our shell script in `sh -c ''`.
Having single quotes on our `trap` led to a syntax error when
doing this.
2022-07-13 01:09:59 +00:00
Kyle Carberry dde51f1caa
fix: Force trap to always succeed due to incompatibility (#2953)
There are some instances of Linux that don't support trap. We should
ignore the failure in those cases.
2022-07-12 23:31:25 +00:00
Kyle Carberry 1973786335
fix: Add `trap` to agent startup script to sleep on failure (#2873)
* fix: Add `trap` to agent startup script to sleep on failure

The Docker Terraform provider removes containers immediately on exit, making
it difficult to debug a failed container start with Coder. This will sleep on
exit and output a friendly log, which should assist with debugging failures.

* Update provisionersdk/agent.go

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>

* Update provisionersdk/agent.go

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-07-11 14:10:06 +00:00
Cian Johnston 8a59178e7e
provisionersdk: extract and embed agent bootstrap scripts (#2886)
This commit extracts the existing hard-coded agent scripts to their own files and embeds them using go:embed.
We can more easily use e.g. shellcheck to validate our agent scripts.
2022-07-11 12:43:14 +01:00