GKE TPU Slice Stuck on Unstable MIG

GKE TPU Slice Stuck on Unstable MIG

Diagnoses GKE TPU slice creation failures and stuck JobSets caused by unstable managed instance groups, checking slice status first and then MIG stability.

Skill files2 files

references/

SKILL.md263 lines
1
---
2
name: gke-ai-troubleshooting-tpu-slice-mig-stuck-updating
3
description: >-
4
Diagnose and resolve GKE TPU Dynamic Slice creation and JobSet scheduling
5
failures blocked by underlying Compute Engine managed instance groups (MIGs)
6
stuck in an updating or unstable state (isStable=False). Use when TPU slice
7
creation fails with a SliceCreationFailed status reason, when JobSets remain
8
stuck in pending, or when MIG status reflects isStable=False or
9
versionTarget.isReached=False during TPU slice formation. Don't use for
10
SliceCreationFailed causes unrelated to MIG stability (use
11
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring) or general pod
12
scheduling failures unrelated to TPU slices.
13
metadata:
14
version: "1.0.1"
15
category: Containers
16
---
17
18
# Troubleshoot GKE TPU slice creation blocked by an unstable MIG
19
20
This skill helps diagnose GKE TPU Dynamic Slice creation failures and JobSet
21
scheduling delays when the Compute Engine managed instance groups (MIGs) that
22
back the TPU node pool aren't stable (`status.isStable: false`).
23
24
A `SliceCreationFailed` status reason means that slice creation failed because
25
prerequisites weren't met (for example, required Compute Engine resources are
26
missing) or preflight checks failed (see
27
[Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)).
28
A MIG that is still creating, updating, or repairing instances is one cause to
29
check. This skill checks the slice status first, then the stability of the
30
backing MIGs.
31
32
## Attribution
33
34
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
35
MUST read [Usage Attribution](references/attribution.md). For commands executed
36
directly in the terminal (never in generated scripts, Terraform, or user code),
37
prefix `gcloud` with
38
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-slice-mig-stuck-updating)"`
39
and append `agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-slice-mig-stuck-updating)` to `User-Agent` headers.
40
41
## Prerequisites
42
43
- **Google Cloud SDK & Tools**:
44
- For installing and initializing `gcloud` (project selection and
45
authentication) and enabling the GKE API, follow
46
[Before you begin](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
47
- For installing `kubectl` and configuring cluster credentials, follow the
48
"Install kubectl", "Install required plugins", and "Store cluster
49
information for kubectl" sections of
50
[Install kubectl and configure cluster access](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt).
51
- **API Enablement & Billing**:
52
- Verify that the project has an active Cloud Billing account.
53
- Enable APIs: `container.googleapis.com`, `compute.googleapis.com`, and
54
`logging.googleapis.com`.
55
- **Required IAM Roles**:
56
- Logs Viewer (`roles/logging.viewer`): Inspect Cloud Audit Logs for MIG
57
errors.
58
- Compute Viewer (`roles/compute.viewer`): Check MIG stability (`isStable`)
59
and instance progress.
60
- Kubernetes Engine Viewer (`roles/container.viewer`): Inspect Slice custom
61
resources (`slices.accelerator.gke.io`), nodes, and cluster operations.
62
- **Documentation**:
63
- [Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
64
(Sections: "Before you begin", "Create a Slice custom resource", "Monitor
65
the status of the Slice custom resource", "Verify the status of the nodes
66
and the partitions", "Upgrade your node pools")
67
- [Install kubectl and configure cluster access](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt)
68
(Sections: "Install kubectl", "Install required plugins", "Store cluster
69
information for kubectl")
70
- [Add and manage node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools.md.txt)
71
(Sections: "View node pools in a Standard cluster")
72
- [View information about MIGs and managed instances](https://docs.cloud.google.com/compute/docs/instance-groups/getting-info-about-migs.md.txt)
73
(Sections: "Check whether a MIG is stable", "Check the status of managed
74
instances", "List instance errors")
75
- [Automatically apply VM configuration updates in a MIG](https://docs.cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups.md.txt)
76
(Sections: "Verify whether an update rollout is complete")
77
- [Manually upgrade a cluster's control plane or node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster.md.txt)
78
(Sections: "Check node pool upgrade status", "Cancel a node pool upgrade",
79
"Resume a node pool upgrade", "Roll back a node pool upgrade")
80
- [Auto-repair nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
81
(Sections: "Get information about recent automated repair events")
82
- [Troubleshoot GKE Standard node pools](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-pools.md.txt)
83
(Sections: "Issue: Node pool creation fails due to insufficient resources")
84
- [Troubleshoot TPUs in GKE](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/tpus.md.txt)
85
(Sections: "Insufficient quota to satisfy the TPU request", "Insufficient
86
TPU resources to satisfy the TPU request")
87
- [REST Resource: projects.locations.clusters.nodePools](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools.md.txt)
88
(Sections: "Resource: NodePool")
89
- [Schedule dynamic slices with Kueue and TAS](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
90
(Sections: "Monitor the status of the slice")
91
- [About TPUs in GKE](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/tpus.md.txt)
92
- [Get support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt)
93
(Sections: "Before you contact support")
94
95
> **Read-only rule**: Run read-only diagnostic commands only. Never drain,
96
> delete, or re-create nodes, or run any other command that changes the cluster.
97
> Give the user any fix to apply themselves.
98
99
When you recommend a fix, link the doc section that describes it.
100
101
---
102
103
## Diagnostic workflow
104
105
### Step 0: Collect context and set the investigation window `[Low Risk]`
106
107
Collect the necessary contextual parameters from the user prompt or environment:
108
- `{project_id}`, `{cluster_name}`, `{location}`, `{nodepool_name}`, and
109
`{issue_time}`.
110
- `{mig_name}` and `{zone}`: Name and zone of the managed instance group that
111
backs `{nodepool_name}`, from the node pool's `instanceGroupUrls` field (see
112
[View node pools in a Standard cluster](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools.md.txt)
113
and
114
[Resource: NodePool](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools.md.txt)).
115
If `{nodepool_name}` or `{mig_name}` isn't already known from a failing
116
`Slice`, find the affected partition, nodes, and backing MIG by following
117
[Verify the status of the nodes and the partitions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
118
- **Time window**: By default, query a 60-minute window `[{issue_time} - 30m,
119
{issue_time} + 30m]` (`{start_time}` to `{end_time}`).
120
121
---
122
123
### Step 1: Detect slice creation failures and MIG errors `[Low Risk]`
124
125
1. **Inspect Slice status and partition nodes**: Check the `Slice` custom
126
resource `Status.Conditions` for a `SliceCreationFailed` status reason and
127
identify the affected partitions, nodes, and `{mig_name}` by following the
128
"Monitor the status of the Slice custom resource" and "Verify the status of
129
the nodes and the partitions" sections of
130
[Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
131
and
132
[Monitor the status of the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt).
133
2. **Query Cloud Logging for MIG errors**: Once `{mig_name}` is identified (or
134
by narrowing the results to `{mig_name}` once known), run this Cloud Logging
135
query to detect errors on the backing instance group manager across
136
`[{start_time}, {end_time}]`:
137
```
138
resource.type="gce_instance_group_manager"
139
resource.labels.instance_group_manager_name="{mig_name}"
140
severity>=ERROR
141
timestamp >= "{start_time}" AND timestamp <= "{end_time}"
142
```
143
- **Findings**:
144
- If the `Slice` status reports `SliceCreationFailed` or the logs show
145
instance group errors, proceed to Step 2.
146
- If no error logs match and the TPU `Slice` status is `ACTIVE`, rule out MIG
147
instability and check workload configuration.
148
149
---
150
151
### Step 2: Check MIG stability (`status.isStable`) `[Low Risk]`
152
153
Follow
154
[Check whether a MIG is stable](https://docs.cloud.google.com/compute/docs/instance-groups/getting-info-about-migs.md.txt)
155
to inspect the stability (`status.isStable`) and version target status
156
(`status.versionTarget.isReached`) of `{mig_name}`:
157
158
- **What the fields mean**:
159
- `status.isStable: false`: Changes are active or pending, or the MIG itself
160
is being modified. Proceed to Step 3.
161
- `status.versionTarget.isReached: false`: At least one instance isn't running
162
the target version yet (see
163
[Automatically apply VM configuration updates in a MIG](https://docs.cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups.md.txt)).
164
Proceed to Step 3.
165
- `status.isStable: true` and `status.versionTarget.isReached: true`: No
166
instances are undergoing or scheduled for changes (`currentAction` is `NONE`
167
for all instances), and the MIG itself isn't being modified. This rules out
168
MIG instability. If the `Slice` is still in `SliceCreationFailed`, hand off
169
to `gke-ai-troubleshooting-tpu-dynamic-slices-monitoring`, or follow the
170
"Create a Slice custom resource" and "Verify the status of the nodes and the
171
partitions" sections of
172
[Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
173
174
---
175
176
### Step 3: Find failed or stalled instance operations `[Low Risk]`
177
178
Direct the user to the "Check the status of managed instances" and "List
179
instance errors" sections of
180
[View information about MIGs and managed instances](https://docs.cloud.google.com/compute/docs/instance-groups/getting-info-about-migs.md.txt)
181
(include both section names and the document title) to inspect individual
182
instance states (`currentAction` and `instanceStatus`) and list the most recent
183
errors in `{mig_name}`:
184
185
- If the errors show capacity or quota failures such as
186
`ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS` or `QUOTA_EXCEEDED`, go to Step 5,
187
item 2.
188
- Otherwise, proceed to Step 4 to check for node pool upgrade or auto-repair
189
operations.
190
191
---
192
193
### Step 4: Check node pool operations `[Low Risk]`
194
195
A MIG that is still changing instances can be the result of a node pool upgrade
196
or repair:
197
198
1. **Check node pool upgrades**: Follow
199
[Check node pool upgrade status](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster.md.txt)
200
to list the cluster operations and find upgrade operations targeting
201
`{nodepool_name}` in `[{start_time}, {end_time}]`. Also review
202
[Upgrade your node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
203
for dynamic slicing upgrade requirements (required surge settings and
204
deleting active super-slices before upgrading).
205
- If an upgrade operation is still running, go to Step 5, item 1 or item 3.
206
- If an upgrade operation was cancelled, failed, or is incomplete, go to Step
207
5, item 4.
208
2. **Check automated node repairs**: Follow
209
[Get information about recent automated repair events](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
210
to check for repair operations on `{nodepool_name}`.
211
- If a node auto-repair operation is running, go to Step 5, item 1.
212
3. **If no operation or error explains the unstable MIG**: Go to Step 5, item 5
213
to contact Cloud Customer Care.
214
215
---
216
217
### Step 5: Resolution `[High Risk]`
218
219
> **Guardrail**: Don't modify GKE-managed instance groups or VMs directly
220
> through Compute Engine. Manage node pools through GKE.
221
222
1. **Wait for an ongoing update or auto-repair to finish**: If a node pool
223
upgrade or automated repair is still making progress, the user can wait until
224
the MIG is stable (`status.isStable: true`) by following
225
[Check whether a MIG is stable](https://docs.cloud.google.com/compute/docs/instance-groups/getting-info-about-migs.md.txt).
226
2. **Resolve capacity or quota errors**: When Step 3 shows
227
`ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS` or `QUOTA_EXCEEDED`, rolling back
228
an upgrade won't resolve the shortage. Follow
229
[Issue: Node pool creation fails due to insufficient resources](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-pools.md.txt)
230
and the "Insufficient quota to satisfy the TPU request" and "Insufficient TPU
231
resources to satisfy the TPU request" sections of
232
[Troubleshoot TPUs in GKE](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/tpus.md.txt).
233
3. **Cancel an in-progress node pool upgrade**: If the user wants to stop an
234
upgrade that is still running, follow
235
[Cancel a node pool upgrade](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster.md.txt).
236
For dynamic slicing node pools, also check
237
[Upgrade your node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
238
for the required surge settings and deleting active super-slices before
239
upgrading.
240
4. **Resume or roll back a cancelled, failed, or incomplete node pool upgrade**:
241
- Follow the "Resume a node pool upgrade" or "Roll back a node pool upgrade"
242
sections of
243
[Manually upgrade a cluster's control plane or node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster.md.txt).
244
As documented there, rollback applies if an in-progress upgrade was
245
cancelled, the upgrade failed, or the upgrade is incomplete due to a
246
maintenance window timing out (you can't roll back node pools once they
247
have been successfully upgraded); alternatively, a cancelled or failed,
248
partially completed upgrade can be resumed.
249
- Afterwards, verify that the MIG is stable by following
250
[Check whether a MIG is stable](https://docs.cloud.google.com/compute/docs/instance-groups/getting-info-about-migs.md.txt).
251
5. **Escalate unexplained MIG instability**: If no node pool upgrade, repair
252
operation, or capacity/quota error explains why `{mig_name}` remains
253
unstable, direct the user to Cloud Customer Care by following
254
[Get support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt).
255
6. **Verify node pool and slice recovery**: After the instance group is stable
256
(`status.isStable: true`), follow the "Monitor the status of the Slice custom
257
resource" and "Create a Slice custom resource" sections of
258
[Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
259
to verify that the `Slice` reaches the `ACTIVE` state. If the `Slice` stays
260
in `SliceCreationFailed` after the MIG stabilizes, check whether the retry
261
annotation documented in "Create a Slice custom resource" is set on the
262
`Slice`.
263

© Google LLC · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…