GKE TPU Partition Overlap Troubleshooting

GKE TPU Partition Overlap Troubleshooting

Guides an AI agent diagnosing GKE TPU slice creation failures caused by partition overlap and finding the conflicting slice or JobSet.

Skill files2 files

references/

SKILL.md335 lines
1
---
2
name: gke-ai-troubleshooting-tpu-partition-overlap
3
description: >-
4
Diagnose and resolve GKE TPU slice creation failures (SliceCreationFailed)
5
caused by partition overlap conflicts where requested TPU partitions or their
6
nodes are already used by another slice or JobSet. Use when diagnosing GKE TPU
7
slice creation failures with SliceCreationFailed partition or node conflicts.
8
Don't use for general slice lifecycle states or slice provisioning failures
9
without node overlap (use
10
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring), quota exhaustion, or
11
unresponsive TPU nodes.
12
metadata:
13
version: "1.0.1"
14
category: Containers
15
---
16
17
# Troubleshoot TPU slice creation failures caused by partition overlap
18
19
A dynamic slice fails to form with the status reason `SliceCreationFailed` when,
20
among other documented causes, any of its nodes are already used by another
21
slice. This skill confirms the failure, rules out the other documented causes,
22
finds the slice that uses the same nodes, and routes the fix through GKE.
23
24
## Attribution
25
26
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
27
MUST read [Usage Attribution](references/attribution.md). For commands executed
28
directly in the terminal (never in generated scripts, Terraform, or user code),
29
prefix `gcloud` with
30
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-partition-overlap)"`
31
and append `agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-partition-overlap)` to `User-Agent` headers.
32
33
## Prerequisites
34
35
- **Tools**:
36
- For installing and initializing `gcloud` (which covers authentication and
37
project selection), follow
38
[Before you begin](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
39
- For installing `kubectl` and required plugins, follow
40
[Install kubectl](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt)
41
and
42
[Install required plugins](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt).
43
- **Cloud Billing & Project Configuration**: Ensure the project has an active
44
Cloud Billing account. Follow
45
[Before you begin](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
46
to initialize `gcloud` and enable the Google Kubernetes Engine API
47
(`container.googleapis.com`), ensure the Cloud Monitoring API
48
(`monitoring.googleapis.com`) is enabled, and follow
49
[Store cluster information for kubectl](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt)
50
to configure `kubectl` cluster credentials.
51
- **Required IAM Roles**:
52
- Kubernetes Engine Viewer (`roles/container.viewer`)
53
- Monitoring Viewer (`roles/monitoring.viewer`)
54
- **Documentation**:
55
- [Use dynamic slicing with a custom scheduler](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
56
(Sections: "Before you begin", "Target your node pool to belong to a block
57
or a sub-block", "Verify the status of the nodes and the partitions",
58
"Create a Slice custom resource", "Monitor the status of the Slice custom
59
resource", "Delete the slice")
60
- [Configure cluster access for kubectl](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt)
61
(Sections: "Install kubectl", "Install required plugins", "Store cluster
62
information for kubectl")
63
- [Slice](https://docs.cloud.google.com/kubernetes-engine/docs/reference/crds/slice.md.txt)
64
(Sections: "Slice status", "Slice specification")
65
- [Schedule dynamic slices with Kueue and TAS](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
66
(Sections: "Target your node pool to belong to a block or a sub-block",
67
"Create a dynamic slice with Kueue and TAS", "Define the partition health
68
selection", "Optimize workload scheduling with slice reuse", "Enable Slice
69
reuse", "Enforce slice deletion per workload", "Monitor the status of the
70
slice", "Monitor the metrics of the slice", "Clean up")
71
- [GKE system metrics](https://docs.cloud.google.com/monitoring/api/metrics_kubernetes.md.txt)
72
(Sections: "Kubernetes metrics")
73
- [Monitored resource types](https://docs.cloud.google.com/monitoring/api/resources.md.txt)
74
(Sections: "k8s_node_pool")
75
- [About GKE dynamic slicing](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/dynamic-slicing.md.txt)
76
(Sections: "Dynamic slicing configurations")
77
- [Get support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt)
78
(Sections: "Before you contact support", "Recommendations for efficient
79
support")
80
81
> **Read-only rule**: Run read-only diagnostic commands only. Never drain,
82
> delete, or re-create nodes, or run any other command that changes the cluster.
83
> Give the user any fix to apply themselves.
84
85
When you recommend a fix, link the doc section that describes it.
86
87
---
88
89
## Diagnostic workflow
90
91
### Step 0: Collect context `[Low Risk]`
92
93
Collect the target parameters:
94
95
- `{project_id}`: Google Cloud project ID
96
- `{cluster_name}`: GKE cluster name
97
- `{location}`: Cluster region or zone
98
- `{slice_name}`: Name of the Slice custom resource that failed to form
99
- `{node_pool_name}`: Name of the TPU node pool (or node pools) backing the
100
partitions in `{slice_name}`, if known. If the user doesn't know
101
`{node_pool_name}`, after Step 1 run the Cloud Monitoring query in Step 3
102
for the partition IDs in `{partition_ids}` and read the `node_pool_name`
103
label on the
104
[k8s_node_pool](https://docs.cloud.google.com/monitoring/api/resources.md.txt)
105
monitored resource.
106
- `{issue_time}`: Incident timestamp in RFC3339 UTC, if known. If the user
107
doesn't know `{issue_time}`, use the `Last Transition Time`
108
(`lastTransitionTime`, "A timestamp of the most recent status change" in
109
[Slice status](https://docs.cloud.google.com/kubernetes-engine/docs/reference/crds/slice.md.txt))
110
of the `Ready` condition from Step 1. By default, query Cloud Monitoring over
111
a 60-minute window around `{issue_time}`.
112
113
---
114
115
### Step 1: Confirm the `SliceCreationFailed` status `[Low Risk]`
116
117
To describe `{slice_name}`, follow the instructions in the section
118
[Monitor the status of the Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
119
120
- In `Status` > `Conditions`, check that the `Reason` of the `Ready` condition
121
is `SliceCreationFailed`, and record its `Last Transition Time` (to use as
122
`{issue_time}` if needed).
123
- Record the IDs in `Spec` > `Partition Ids` as `{partition_ids}`, the
124
`Topology`, and any `Labels` and `Annotations` on `{slice_name}`.
125
- If the `Ready` reason isn't `SliceCreationFailed`, this skill doesn't apply.
126
See
127
[Slice status](https://docs.cloud.google.com/kubernetes-engine/docs/reference/crds/slice.md.txt)
128
for what each reason means, and hand off to
129
`gke-ai-troubleshooting-tpu-dynamic-slices-monitoring`.
130
131
---
132
133
### Step 2: Rule out the other documented causes `[Low Risk]`
134
135
Per
136
[Create a Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
137
slice creation also fails with `SliceCreationFailed` when:
138
139
- The selected nodes don't exist.
140
- The topology doesn't match the number of partitions. A dynamic sub-slice lists
141
exactly one partition ID. A dynamic super-slice lists `(A × B × C) / 64`
142
partition IDs.
143
144
If either of those causes applies, hand off to
145
`gke-ai-troubleshooting-tpu-dynamic-slices-monitoring`.
146
147
Otherwise, follow
148
[Verify the status of the nodes and the partitions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
149
on `{node_pool_name}`:
150
151
- Verify that the nodes exist and carry each ID in `{partition_ids}`.
152
- On the nodes that carry `{partition_ids}`, record **every** partition ID of
153
**every** shape (`4x4x4`, `2x4x4`, `2x2x4`, `2x2x2`, and `2x2x1`) from the
154
`cloud.google.com/gke-tpu-partition-.*-id` labels. Per
155
[Dynamic slicing configurations](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/dynamic-slicing.md.txt),
156
dynamic sub-slicing partitions a `4x4x4` sub-block into smaller topologies on
157
the same physical node pool, so partitions of different shapes share the same
158
nodes.
159
- Read each partition's `cloud.google.com/gke-tpu-partition-.*-state` label. Per
160
[Verify the status of the nodes and the partitions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
161
and
162
[Define the partition health selection](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt),
163
count `HEALTHY` partitions and `DEGRADED` `4x4x4` partitions ("still usable
164
for dynamic slice formation"; "Smaller topologies don't have a degraded
165
state") as available. Partitions in `UNHEALTHY` ("can't be used to form a
166
slice"), `UNSET`, or `INCOMPLETE` aren't available. If a requested partition
167
is in `UNHEALTHY`, `UNSET`, or `INCOMPLETE`, suggest an available partition
168
whose nodes no other slice uses (Step 4, item 2), hand off to
169
`gke-ai-troubleshooting-tpu-dynamic-slices-monitoring`, or escalate to Cloud
170
Customer Care (Step 4, item 4).
171
172
---
173
174
### Step 3: Find the slice that uses the same nodes `[Low Risk]`
175
176
Per
177
[Create a Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
178
slice creation fails with `SliceCreationFailed` when any nodes on the custom
179
resource are used by another slice. Because partitions of different shapes on
180
the same sub-block share nodes (see
181
[Dynamic slicing configurations](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/dynamic-slicing.md.txt)),
182
another slice conflicts with `{slice_name}` if it lists **any** of the partition
183
IDs (of any shape) recorded on `{slice_name}`'s nodes in Step 2.
184
185
1. List the `Slice` custom resources in the cluster (as shown in
186
[Delete the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt))
187
and describe each one following
188
[Monitor the status of the Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
189
to read `Spec` > `Partition Ids`, `Metadata` > `Labels`, and `Status` >
190
`Conditions` (`Ready` reason):
191
- Treat any slice other than `{slice_name}` whose `Spec` > `Partition Ids`
192
includes **any** partition ID recorded on `{slice_name}`'s nodes in Step 2
193
(whether the exact ID in `{partition_ids}` or another shape's partition ID
194
on the same nodes) as conflicting. Record its name, its `Ready` reason
195
(such as `ACTIVE`), and whether Kueue manages it (Step 4, item 1).
196
2. To check partition-to-slice associations in Cloud Monitoring (including
197
around `{issue_time}`), query the `kubernetes.io/accelerator/partition/state`
198
metric listed in
199
[Monitor the metrics of the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt).
200
Per
201
[Kubernetes metrics](https://docs.cloud.google.com/monitoring/api/metrics_kubernetes.md.txt),
202
this metric "is 1 if the partition state is detected, 0 otherwise", and its
203
labels include `partition_id`, `slice_id` ("ID of the associated slice"),
204
and `state` ("Health of the partition (e.g., HEALTHY, UNHEALTHY)"). Run the
205
query for each `{partition_id}` recorded on `{slice_name}`'s nodes in Step 2:
206
207
```promql
208
kubernetes_io:accelerator_partition_state{
209
monitored_resource="k8s_node_pool",
210
cluster_name="{cluster_name}",
211
partition_id="{partition_id}"
212
}
213
```
214
215
- Read only time series whose value is `1` (where `state="HEALTHY"` means the
216
partition is healthy and functional, per
217
[Verify the status of the nodes and the partitions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)).
218
- Because
219
[Kubernetes metrics](https://docs.cloud.google.com/monitoring/api/metrics_kubernetes.md.txt)
220
defines `slice_id` only as "ID of the associated slice", always confirm the
221
conflicting slice from the `Slice` custom resources in the cluster rather
222
than from `slice_id` alone: list the `Slice` custom resources as shown in
223
[Delete the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
224
describe each one following
225
[Monitor the status of the Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
226
and check which slice's `Spec` > `Partition Ids` includes the partition ID
227
(or any other partition ID of any shape on the same nodes from Step 2).
228
3. **Next steps based on Step 3 results**:
229
- **Another slice uses the nodes now**: Proceed to Step 4.
230
- **No other slice uses the nodes now, but the metric (value `1`) showed an
231
associated `slice_id` around `{issue_time}`**: The conflict may already be
232
over. Proceed to Step 4, item 1 (to re-create or retry `{slice_name}`) and
233
then Step 4, item 4.
234
- **Neither the current `Slice` custom resources nor the metric around
235
`{issue_time}` shows another slice**: Node overlap isn't confirmed. Hand
236
off to `gke-ai-troubleshooting-tpu-dynamic-slices-monitoring` or escalate
237
to Cloud Customer Care (Step 4, item 4).
238
239
---
240
241
### Step 4: Resolution `[High Risk]`
242
243
> **Guardrails**:
244
> - **Never** delete or change the other slice, or stop its workload, to free
245
> the nodes. Deleting a `Slice` custom resource starts dismantling that slice
246
> (`DEACTIVATING`, see
247
> [Monitor the status of the Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)).
248
> The owner of that slice decides when to release it.
249
> - **Never** manually modify or delete `Slice` custom resources created by
250
> Kueue. Per
251
> [Target your node pool to belong to a block or a sub-block](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
252
> "Avoid manually modifying Slice custom resources created by Kueue."
253
> - **Never** change GKE-managed instance groups or VMs directly through Compute
254
> Engine, and never delete node pools to free a partition. Manage node pools
255
> and slices through GKE.
256
257
First, check whether Kueue manages `{slice_name}` or the conflicting slice:
258
259
- Per
260
[Monitor the status of the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt),
261
when a slice is created or actively used by a workload, the slice controller
262
attaches the `kueue.gke.io/tpu-slice-used-by-namespace` and
263
`kueue.gke.io/tpu-slice-used-by-workload` labels.
264
- Per
265
[Optimize workload scheduling with slice reuse](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
266
and
267
[Enable Slice reuse](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt),
268
when slice reuse is enabled, "Kueue marks the slice as idle at the end of a
269
job instead of deleting it", and "Reusable slices are named dynamically with
270
an `s-<topology>` prefix, decoupling them from specific workload names."
271
272
Then apply the matching option:
273
274
1. **Wait for the conflicting slice to release the nodes and retry**:
275
- **If Kueue manages the conflicting slice** (it has the `kueue.gke.io/...`
276
labels or an `s-<topology>` name prefix): Do not suggest deleting the
277
`Slice` custom resource directly. Point the workload owner to
278
[Clean up](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
279
(deleting the `JobSet` triggers Kueue to delete the associated `Slice`
280
custom resources) and, if slice reuse keeps an idle `s-<topology>` slice
281
allocated after a job ends, to
282
[Enforce slice deletion per workload](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
283
(`kueue.gke.io/tpu-enforce-slice-deletion: "true"`).
284
- **If a custom scheduler or user created the conflicting slice directly**:
285
Its owner can delete it when finished, as described in
286
[Delete the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
287
- **How `{slice_name}` retries**: Check whether `{slice_name}` already has
288
`slice.gke.io/retry-on-failure: "true"` in `Metadata` > `Annotations`. Per
289
[Create a Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt),
290
when a `Slice` custom resource is created with this annotation, "If the
291
slice isn't created because of the `SliceCreationFailed` status reason, the
292
controller will retry until the slice is successfully formed." Because the
293
documentation only shows configuring
294
`slice.gke.io/retry-on-failure: "true"` in the `Slice` manifest when
295
creating a `Slice` custom resource (and doesn't state that adding the
296
annotation to an existing slice already in `SliceCreationFailed` starts a
297
retry), if `{slice_name}` wasn't created by Kueue and lacks the annotation,
298
tell the user to delete `{slice_name}` following
299
[Delete the slice](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
300
and re-create it with `slice.gke.io/retry-on-failure: "true"` in its
301
manifest following
302
[Create a Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt).
303
2. **Use available partitions whose nodes no other slice uses**: If the user
304
manages `Slice` custom resources directly (not through Kueue) and can't wait,
305
direct them to
306
[Verify the status of the nodes and the partitions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
307
and
308
[Create a Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt)
309
so they can pick available partitions (`HEALTHY` partitions, or `DEGRADED`
310
`4x4x4` partitions) whose nodes aren't used by any other slice (across all
311
partition shapes on those nodes) and create the `Slice` custom resource with
312
them.
313
3. **Schedule dynamic slices with Kueue and TAS instead of creating `Slice`
314
custom resources directly**: Per
315
[Target your node pool to belong to a block or a sub-block](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt)
316
and
317
[Create a dynamic slice with Kueue and TAS](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/use-gke-dynamic-slicing.md.txt),
318
instead of creating `Slice` custom resources directly, teams can schedule
319
GKE workloads with Kueue and Topology Aware Scheduling (TAS), where "Kueue
320
automatically handles the creation and deletion of Slice custom resources"
321
and admits a workload after its slice becomes active.
322
4. **Verify or escalate**: Repeat Step 1 following
323
[Monitor the status of the Slice custom resource](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/create-dynamic-slices.md.txt):
324
- **`ACTIVE`**: The slice is fully formed, healthy, and ready to execute
325
workloads.
326
- **`ACTIVE_DEGRADED`**: The slice is formed, and workloads can run, but
327
performance might be impacted.
328
- **Still `SliceCreationFailed` after no other slice uses the nodes, or
329
`FAILED`**: Hand off to
330
`gke-ai-troubleshooting-tpu-dynamic-slices-monitoring`, or advise the user
331
to contact Cloud Customer Care following
332
[Before you contact support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt)
333
and
334
[Recommendations for efficient support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt).
335

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

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…