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

Commitc4df5b3

Browse files
committed
ask an LLM to review my documentation for grammar, style and tone
1 parent846d724 commitc4df5b3

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

‎docs/admin/templates/extending-templates/prebuilt-workspaces.md‎

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,20 @@ If a quota is exceeded, the prebuilt workspace will fail provisioning the same w
249249

250250
###Managing prebuild provisioning queues
251251

252-
It is possible for prebuilt workspaces to overwhelm a Coder deployment to the point that users and template administrators experience significant delays when they attempt to create new workspaces or manage their templates. This may happen organically, if there are not enough provisioners to meet the needs of the Coder deployment. It may also happen if a broken template is uploaded, which mistakenly requests too many prebuilt workspaces. In the latter case, it may be hard to correct the situation because a fixed template version cannot be uploaded while the Coder deployment's provisioners are overloaded.
252+
Prebuilt workspaces can overwhelm a Coder deployment, causing significant delays when users and template administrators attempt to create new workspaces or manage their templates. This can happen in two scenarios:
253+
254+
1.**Organic overload**: Not enough provisioners to meet the deployment's needs
255+
2.**Broken template**: A template that mistakenly requests too many prebuilt workspaces
256+
257+
In the second case, it can be difficult to fix the situation because you cannot upload a corrected template version while the provisioners are overloaded.
258+
259+
The troubleshooting steps below will help you resolve this situation:
260+
261+
* Pause prebuilt workspace reconciliation to stop the problem from getting worse
262+
* Check how many prebuild jobs are clogging your provisioner queue
263+
* Cancel excess prebuild jobs to free up provisioners for human users
264+
* Fix any problematic templates that are causing the issue
265+
* Resume prebuilt reconciliation once everything is back to normal
253266

254267
If your Coder deployment is exhibiting the above symptoms, follow these instructions to verify and then rectify the situation:
255268

@@ -259,40 +272,46 @@ First, run:
259272
coder prebuilds pause
260273
```
261274

262-
This prevents further pollution of your provisioner queues. Specifically, it will prevent the prebuilt workspaces feature from scheduling new prebuilt workspace creation jobs. Jobs that have already been enqueued will still be processed at this point. Regardless of the steps taken in the rest of your troubleshooting process, remember to run`coder prebuilds resume` once all impact has been mitigated. See the last step in this section for more information.
275+
This prevents further pollution of your provisioner queues by stopping the prebuilt workspaces feature from scheduling new creation jobs. Jobs that have already been enqueued will still be processed.
276+
277+
**Important**: Remember to run`coder prebuilds resume` once all impact has been mitigated (see the last step in this section).
263278

264279
Next, run:
265280

266281
```bash
267282
coder provisionerjobs list --status=pending --initiator=prebuilds
268283
```
269284

270-
This will show a list of all pending jobs that have been enqueued by the prebuilt workspace system. The length of this list is an indicator of whether prebuilt workspaces have overwhelmed your Coder deployment. Human initiated jobs do have priority over pending prebuild jobs, but a prebuild job that is already running will not be preempted to process a human initiated job. An extended list of pending prebuild jobs therefore increases the likelihood that all provisioners may already be occopied when a human user would like to create a workspace. This then transitively increases the likelihood that users will experience delays waiting for the next available provisioner to become available when they try to manage their workspaces or templates.
285+
This will show a list of all pending jobs that have been enqueued by the prebuilt workspace system. The length of this list indicates whether prebuilt workspaces have overwhelmed your Coder deployment.
286+
287+
Human-initiated jobs have priority over pending prebuild jobs, but running prebuild jobs cannot be preempted. A long list of pending prebuild jobs increases the likelihood that all provisioners are already occupied when a user wants to create a workspace. This increases the likelihood that users will experience delays waiting for the next available provisioner.
271288

272-
To ensure that the next available provisioner will be given to a humaninitiated job, run:
289+
To ensure that the next available provisioner will be given to a human-initiated job, run:
273290

274291
```bash
275-
coder provisionerjobs list --status=pending --initiator=prebuilds| jq'...'| xargs -n1 -P2 -I{} coder provisionerjobs cancel {}
292+
coder provisionerjobs list --status=pending --initiator=prebuilds| jq-r'.[].id'| xargs -n1 -P2 -I{} coder provisionerjobs cancel {}
276293
```
277294

278-
This will clear the provisioner queue of all jobs that were not initiated by a human being, which increases the probability that a provisioner will be available when the next human operator needs it. It does not cancel running provisioner jobs, so there may still be some delay in processing new provisioner jobsat leastuntil a provisioner completes its current job.
295+
This will clear the provisioner queue of all jobs that were not initiated by a human being, which increases the probability that a provisioner will be available when the next human operator needs it. It does not cancel running provisioner jobs, so there may still be some delay in processing new provisioner jobs until a provisioner completes its current job.
279296

280297
At this stage, most prebuild related impact will have been mitigated. There may still be a bugged template version, but it will no longer pollute provisioner queues with prebuilt workspace jobs. If the latest version of a template is also broken for reasons unrelated to prebuilds, then users are able to create workspaces using a previous template version. Some running jobs may have been initiated by the prebuild system, but these cannot be cancelled without potentially orphaning resources that have already been deployed by Terraform. Depending on your deployment and template provisioning times, it might be best to upload a new template version and wait for it to be processed organically.
281298

282-
If you need to expedite the processing of human-related jobs at the cost of some infrastructurehouse-keeping, then you can run:
299+
If you need to expedite the processing of human-related jobs at the cost of some infrastructurehousekeeping, you can run:
283300

284301
```bash
285-
coder provisionerjobs list --status=running --initiator=prebuilds| jq'...'| xargs -n1 -P2 -I{} coder provisionerjobs cancel {}
302+
coder provisionerjobs list --status=running --initiator=prebuilds| jq-r'.[].id'| xargs -n1 -P2 -I{} coder provisionerjobs cancel {}
286303
```
287304

288305
This will cancel running prebuild jobs (orphaning any resources that have already been deployed) and immediately make room for human-initiated jobs.
289306

290-
Once the provisioner queue has been cleared and all templates have been fixed,remember toresume prebuild reconciliation by running:
307+
Once the provisioner queue has been cleared and all templates have been fixed, resume prebuild reconciliation by running:
291308

292309
```bash
293310
coder prebuilds resume
294311
```
295312

313+
This re-enables the prebuilt workspaces feature and allows the reconciliation loop to resume normal operation. The system will begin creating new prebuilt workspaces according to your template configurations.
314+
296315
###Template configuration best practices
297316

298317
####Preventing resource replacement

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp