Gke AI Troubleshooting Tpu Partition Overlap
GoogleOfficialPublished by Google
- Skill
- Workflow
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a diagnostic workflow for GKE TPU slice creation failures marked with the SliceCreationFailed status. It specifically addresses conflicts where requested TPU partitions or their underlying nodes are already occupied by another slice or JobSet. The process involves confirming the failure, identifying the conflicting slice through cluster resource inspection and Cloud Monitoring metrics, and guiding the user toward resolution without manually modifying cluster-managed resources.
What it does
- Confirms SliceCreationFailed status for GKE TPU slices.
- Identifies conflicting slices using the same TPU nodes or partitions.
- Verifies partition health and availability labels on nodes.
- Provides guidance on resolving conflicts via workload management or retry configurations.
- Advises on using Kueue and Topology Aware Scheduling for automated slice management.
- Directs users to appropriate support channels if the issue persists.
When to use it
- When a GKE TPU slice fails to form with the SliceCreationFailed status.
- When you suspect a partition or node overlap conflict with an existing slice.
- When you need to identify which active slice is preventing a new slice from provisioning.
Advantages
- Systematic approach to isolating TPU partition conflicts.
- Adheres to safe operational practices by avoiding manual node or slice deletion.
- Integrates with standard GKE and Cloud Monitoring diagnostic tools.
- Provides clear paths for resolution using native GKE features like Kueue.
Usage examples
- “My GKE TPU slice is stuck in SliceCreationFailed. How do I check if it's a partition conflict?”
- The agent will guide you through describing the Slice custom resource, verifying the partition IDs, and checking for other slices using the same nodes.
- “How do I find which slice is using my TPU nodes?”
- The agent will instruct you to list existing Slice resources and use Cloud Monitoring queries to identify the specific slice ID associated with your partition.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/gke-ai-troubleshooting-tpu-partition-overlap/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gke-ai-troubleshooting-tpu-partition-overlap.zip -d .agents/skills
Documentation by Google
Troubleshoot TPU slice creation failures caused by partition overlap
A dynamic slice fails to form with the status reason SliceCreationFailed when,
among other documented causes, any of its nodes are already used by another
slice. This skill confirms the failure, rules out the other documented causes,
finds the slice that uses the same nodes, and routes the fix through GKE.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-partition-overlap)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-partition-overlap) to User-Agent headers.
Prerequisites
Tools:
For installing and initializing
gcloud(which covers authentication and project selection), follow Before you begin.For installing
kubectland required plugins, follow Install kubectl and Install required plugins.
Cloud Billing & Project Configuration: Ensure the project has an active Cloud Billing account. Follow Before you begin to initialize
gcloudand enable the Google Kubernetes Engine API (container.googleapis.com), ensure the Cloud Monitoring API (monitoring.googleapis.com) is enabled, and follow Store cluster information for kubectl to configurekubectlcluster credentials.Required IAM Roles:
Kubernetes Engine Viewer (
roles/container.viewer)Monitoring Viewer (
roles/monitoring.viewer)
Documentation:
Use dynamic slicing with a custom scheduler (Sections: "Before you begin", "Target your node pool to belong to a block or a sub-block", "Verify the status of the nodes and the partitions", "Create a Slice custom resource", "Monitor the status of the Slice custom resource", "Delete the slice")
Configure cluster access for kubectl (Sections: "Install kubectl", "Install required plugins", "Store cluster information for kubectl")
Slice (Sections: "Slice status", "Slice specification")
Schedule dynamic slices with Kueue and TAS (Sections: "Target your node pool to belong to a block or a sub-block", "Create a dynamic slice with Kueue and TAS", "Define the partition health selection", "Optimize workload scheduling with slice reuse", "Enable Slice reuse", "Enforce slice deletion per workload", "Monitor the status of the slice", "Monitor the metrics of the slice", "Clean up")
GKE system metrics (Sections: "Kubernetes metrics")
Monitored resource types (Sections: "k8s_node_pool")
About GKE dynamic slicing (Sections: "Dynamic slicing configurations")
Get support (Sections: "Before you contact support", "Recommendations for efficient support")
Read-only rule: Run read-only diagnostic commands only. Never drain, delete, or re-create nodes, or run any other command that changes the cluster. Give the user any fix to apply themselves.
When you recommend a fix, link the doc section that describes it.
Diagnostic workflow
Step 0: Collect context [Low Risk]
Collect the target parameters:
{project_id}: Google Cloud project ID{cluster_name}: GKE cluster name{location}: Cluster region or zone{slice_name}: Name of the Slice custom resource that failed to form{node_pool_name}: Name of the TPU node pool (or node pools) backing the partitions in{slice_name}, if known. If the user doesn't know{node_pool_name}, after Step 1 run the Cloud Monitoring query in Step 3 for the partition IDs in{partition_ids}and read thenode_pool_namelabel on the k8s_node_pool monitored resource.{issue_time}: Incident timestamp in RFC3339 UTC, if known. If the user doesn't know{issue_time}, use theLast Transition Time(lastTransitionTime, "A timestamp of the most recent status change" in Slice status) of theReadycondition from Step 1. By default, query Cloud Monitoring over a 60-minute window around{issue_time}.
Step 1: Confirm the SliceCreationFailed status [Low Risk]
To describe {slice_name}, follow the instructions in the section
Monitor the status of the Slice custom resource.
In
Status>Conditions, check that theReasonof theReadycondition isSliceCreationFailed, and record itsLast Transition Time(to use as{issue_time}if needed).Record the IDs in
Spec>Partition Idsas{partition_ids}, theTopology, and anyLabelsandAnnotationson{slice_name}.If the
Readyreason isn'tSliceCreationFailed, this skill doesn't apply. See Slice status for what each reason means, and hand off togke-ai-troubleshooting-tpu-dynamic-slices-monitoring.
Step 2: Rule out the other documented causes [Low Risk]
Per
Create a Slice custom resource,
slice creation also fails with SliceCreationFailed when:
The selected nodes don't exist.
The topology doesn't match the number of partitions. A dynamic sub-slice lists exactly one partition ID. A dynamic super-slice lists
(A × B × C) / 64partition IDs.
If either of those causes applies, hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.
Otherwise, follow
Verify the status of the nodes and the partitions
on {node_pool_name}:
Verify that the nodes exist and carry each ID in
{partition_ids}.On the nodes that carry
{partition_ids}, record every partition ID of every shape (4x4x4,2x4x4,2x2x4,2x2x2, and2x2x1) from thecloud.google.com/gke-tpu-partition-.*-idlabels. Per Dynamic slicing configurations, dynamic sub-slicing partitions a4x4x4sub-block into smaller topologies on the same physical node pool, so partitions of different shapes share the same nodes.Read each partition's
cloud.google.com/gke-tpu-partition-.*-statelabel. Per Verify the status of the nodes and the partitions and Define the partition health selection, countHEALTHYpartitions andDEGRADED4x4x4partitions ("still usable for dynamic slice formation"; "Smaller topologies don't have a degraded state") as available. Partitions inUNHEALTHY("can't be used to form a slice"),UNSET, orINCOMPLETEaren't available. If a requested partition is inUNHEALTHY,UNSET, orINCOMPLETE, suggest an available partition whose nodes no other slice uses (Step 4, item 2), hand off togke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or escalate to Cloud Customer Care (Step 4, item 4).
Step 3: Find the slice that uses the same nodes [Low Risk]
Per
Create a Slice custom resource,
slice creation fails with SliceCreationFailed when any nodes on the custom
resource are used by another slice. Because partitions of different shapes on
the same sub-block share nodes (see
Dynamic slicing configurations),
another slice conflicts with {slice_name} if it lists any of the partition
IDs (of any shape) recorded on {slice_name}'s nodes in Step 2.
List the
Slicecustom resources in the cluster (as shown in Delete the slice) and describe each one following Monitor the status of the Slice custom resource to readSpec>Partition Ids,Metadata>Labels, andStatus>Conditions(Readyreason):Treat any slice other than
{slice_name}whoseSpec>Partition Idsincludes any partition ID recorded on{slice_name}'s nodes in Step 2 (whether the exact ID in{partition_ids}or another shape's partition ID on the same nodes) as conflicting. Record its name, itsReadyreason (such asACTIVE), and whether Kueue manages it (Step 4, item 1).
To check partition-to-slice associations in Cloud Monitoring (including around
{issue_time}), query thekubernetes.io/accelerator/partition/statemetric listed in Monitor the metrics of the slice. Per Kubernetes metrics, this metric "is 1 if the partition state is detected, 0 otherwise", and its labels includepartition_id,slice_id("ID of the associated slice"), andstate("Health of the partition (e.g., HEALTHY, UNHEALTHY)"). Run the query for each{partition_id}recorded on{slice_name}'s nodes in Step 2:
kubernetes_io:accelerator_partition_state{
monitored_resource="k8s_node_pool",
cluster_name="{cluster_name}",
partition_id="{partition_id}"
}Read only time series whose value is
1(wherestate="HEALTHY"means the partition is healthy and functional, per Verify the status of the nodes and the partitions).Because Kubernetes metrics defines
slice_idonly as "ID of the associated slice", always confirm the conflicting slice from theSlicecustom resources in the cluster rather than fromslice_idalone: list theSlicecustom resources as shown in Delete the slice, describe each one following Monitor the status of the Slice custom resource, and check which slice'sSpec>Partition Idsincludes the partition ID (or any other partition ID of any shape on the same nodes from Step 2).
Next steps based on Step 3 results:
Another slice uses the nodes now: Proceed to Step 4.
No other slice uses the nodes now, but the metric (value
1) showed an associatedslice_idaround{issue_time}: The conflict may already be over. Proceed to Step 4, item 1 (to re-create or retry{slice_name}) and then Step 4, item 4.Neither the current
Slicecustom resources nor the metric around{issue_time}shows another slice: Node overlap isn't confirmed. Hand off togke-ai-troubleshooting-tpu-dynamic-slices-monitoringor escalate to Cloud Customer Care (Step 4, item 4).
Step 4: Resolution [High Risk]
Guardrails:
Never delete or change the other slice, or stop its workload, to free the nodes. Deleting a
Slicecustom resource starts dismantling that slice (DEACTIVATING, see Monitor the status of the Slice custom resource). The owner of that slice decides when to release it.Never manually modify or delete
Slicecustom resources created by Kueue. Per Target your node pool to belong to a block or a sub-block, "Avoid manually modifying Slice custom resources created by Kueue."Never change GKE-managed instance groups or VMs directly through Compute Engine, and never delete node pools to free a partition. Manage node pools and slices through GKE.
First, check whether Kueue manages {slice_name} or the conflicting slice:
Per Monitor the status of the slice, when a slice is created or actively used by a workload, the slice controller attaches the
kueue.gke.io/tpu-slice-used-by-namespaceandkueue.gke.io/tpu-slice-used-by-workloadlabels.Per Optimize workload scheduling with slice reuse and Enable Slice reuse, when slice reuse is enabled, "Kueue marks the slice as idle at the end of a job instead of deleting it", and "Reusable slices are named dynamically with an
s-<topology>prefix, decoupling them from specific workload names."
Then apply the matching option:
Wait for the conflicting slice to release the nodes and retry:
If Kueue manages the conflicting slice (it has the
kueue.gke.io/...labels or ans-<topology>name prefix): Do not suggest deleting theSlicecustom resource directly. Point the workload owner to Clean up (deleting theJobSettriggers Kueue to delete the associatedSlicecustom resources) and, if slice reuse keeps an idles-<topology>slice allocated after a job ends, to Enforce slice deletion per workload (kueue.gke.io/tpu-enforce-slice-deletion: "true").If a custom scheduler or user created the conflicting slice directly: Its owner can delete it when finished, as described in Delete the slice.
How
{slice_name}retries: Check whether{slice_name}already hasslice.gke.io/retry-on-failure: "true"inMetadata>Annotations. Per Create a Slice custom resource, when aSlicecustom resource is created with this annotation, "If the slice isn't created because of theSliceCreationFailedstatus reason, the controller will retry until the slice is successfully formed." Because the documentation only shows configuringslice.gke.io/retry-on-failure: "true"in theSlicemanifest when creating aSlicecustom resource (and doesn't state that adding the annotation to an existing slice already inSliceCreationFailedstarts a retry), if{slice_name}wasn't created by Kueue and lacks the annotation, tell the user to delete{slice_name}following Delete the slice and re-create it withslice.gke.io/retry-on-failure: "true"in its manifest following Create a Slice custom resource.
Use available partitions whose nodes no other slice uses: If the user manages
Slicecustom resources directly (not through Kueue) and can't wait, direct them to Verify the status of the nodes and the partitions and Create a Slice custom resource so they can pick available partitions (HEALTHYpartitions, orDEGRADED4x4x4partitions) whose nodes aren't used by any other slice (across all partition shapes on those nodes) and create theSlicecustom resource with them.Schedule dynamic slices with Kueue and TAS instead of creating
Slicecustom resources directly: Per Target your node pool to belong to a block or a sub-block and Create a dynamic slice with Kueue and TAS, instead of creatingSlicecustom resources directly, teams can schedule GKE workloads with Kueue and Topology Aware Scheduling (TAS), where "Kueue automatically handles the creation and deletion of Slice custom resources" and admits a workload after its slice becomes active.Verify or escalate: Repeat Step 1 following Monitor the status of the Slice custom resource:
ACTIVE: The slice is fully formed, healthy, and ready to execute workloads.ACTIVE_DEGRADED: The slice is formed, and workloads can run, but performance might be impacted.Still
SliceCreationFailedafter no other slice uses the nodes, orFAILED: Hand off togke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or advise the user to contact Cloud Customer Care following Before you contact support and Recommendations for efficient support.
Files
- ATTRIBUTION.mdAdded by AutoGineer906 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md19.5 KiB
- references/attribution.md1.9 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/gke-ai-troubleshooting-tpu-partition-overlap · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-ai-troubleshooting-tpu-partition-overlap.zip