Gke ai troubleshooting tpu slice mig stuck updating

From google/skills · View interactive version

Gke ai troubleshooting tpu slice mig stuck updating is an AI agent skill from the GitHub repository google/skills. Diagnose and resolve GKE TPU Dynamic Slice creation and JobSet scheduling failures blocked by underlying Compute Engine managed instance groups (MIGs) stuck in an updating or unstable state (isStable=False). Use when TPU slice creation fails with a SliceCreationFailed status reason, when JobSets rem

How to use this skill

Skill file

Troubleshoot GKE TPU slice creation blocked by an unstable MIG

This skill helps diagnose GKE TPU Dynamic Slice creation failures and JobSet

scheduling delays when the Compute Engine managed instance groups (MIGs) that

back the TPU node pool aren't stable (status.isStable: false).

A SliceCreationFailed status reason means that slice creation failed because

prerequisites weren't met (for example, required Compute Engine resources are

missing) or preflight checks failed (see

Use dynamic slicing with a custom scheduler).

A MIG that is still creating, updating, or repairing instances is one cause to

check. This skill checks the slice status first, then the stability of the

backing MIGs.

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-slice-mig-stuck-updating)"

and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-slice-mig-stuck-updating) to User-Agent headers.

Prerequisites

authentication) and enabling the GKE API, follow

Before you begin.

"Install kubectl", "Install required plugins", and "Store cluster

information for kubectl" sections of

Install kubectl and configure cluster access.

logging.googleapis.com.

errors.

and instance progress.

resources (slices.accelerator.gke.io), nodes, and cluster operations.

(Sections: "Before you begin", "Create a Slice custom resource", "Monitor

the status of the Slice custom resource", "Verify the status of the nodes

and the partitions", "Upgrade your node pools")

(Sections: "Install kubectl", "Install required plugins", "Store cluster

information for kubectl")

(Sections: "View node pools in a Standard cluster")

(Sections: "Check whether a MIG is stable", "Check the status of managed

instances", "List instance errors")

(Sections: "Verify whether an update rollout is complete")

(Sections: "Check node pool upgrade status", "Cancel a node pool upgrade",

"Resume a node pool upgrade", "Roll back a node pool upgrade")

(Sections: "Get information about recent automated repair events")

(Sections: "Issue: Node pool creation fails due to insufficient resources")

(Sections: "Insufficient quota to satisfy the TPU request", "Insufficient

TPU resources to satisfy the TPU request")

(Sections: "Resource: NodePool")

(Sections: "Monitor the status of the slice")

(Sections: "Before you contact 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 and set the investigation window `[Low Risk]`

Collect the necessary contextual parameters from the user prompt or environment:

{issue_time}.

backs {nodepool_name}, from the node pool's instanceGroupUrls field (see

View node pools in a Standard cluster

and

Resource: NodePool).

If {nodepool_name} or {mig_name} isn't already known from a failing

Slice, find the affected partition, nodes, and backing MIG by following

Verify the status of the nodes and the partitions.

{issue_time} + 30m] ({start_time} to {end_time}`).


Step 1: Detect slice creation failures and MIG errors `[Low Risk]`

  1. Inspect Slice status and partition nodes: Check the Slice custom

resource Status.Conditions for a SliceCreationFailed status reason and

identify the affected partitions, nodes, and {mig_name} by following the

"Monitor the status of the Slice custom resource" and "Verify the status of

the nodes and the partitions" sections of

Use dynamic slicing with a custom scheduler,

and

Monitor the status of the slice.

  1. Query Cloud Logging for MIG errors: Once {mig_name} is identified (or

by narrowing the results to {mig_name} once known), run this Cloud Logging

query to detect errors on the backing instance group manager across

[{start_time}, {end_time}]:

```

resource.type="gce_instance_group_manager"

resource.labels.instance_group_manager_name="{mig_name}"

severity>=ERROR

timestamp >= "{start_time}" AND timestamp <= "{end_time}"

```

instance group errors, proceed to Step 2.

instability and check workload configuration.


Step 2: Check MIG stability (`status.isStable`) `[Low Risk]`

Follow

Check whether a MIG is stable

to inspect the stability (status.isStable) and version target status

(status.versionTarget.isReached) of {mig_name}:

is being modified. Proceed to Step 3.

the target version yet (see

Automatically apply VM configuration updates in a MIG).

Proceed to Step 3.

instances are undergoing or scheduled for changes (currentAction is NONE

for all instances), and the MIG itself isn't being modified. This rules out

MIG instability. If the Slice is still in SliceCreationFailed, hand off

to gke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or follow the

"Create a Slice custom resource" and "Verify the status of the nodes and the

partitions" sections of

Use dynamic slicing with a custom scheduler.


Step 3: Find failed or stalled instance operations `[Low Risk]`

Direct the user to the "Check the status of managed instances" and "List

instance errors" sections of

View information about MIGs and managed instances

(include both section names and the document title) to inspect individual

instance states (currentAction and instanceStatus) and list the most recent

errors in {mig_name}:

ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS or QUOTA_EXCEEDED, go to Step 5,

item 2.

operations.


Step 4: Check node pool operations `[Low Risk]`

A MIG that is still changing instances can be the result of a node pool upgrade

or repair:

  1. Check node pool upgrades: Follow

Check node pool upgrade status

to list the cluster operations and find upgrade operations targeting

{nodepool_name} in [{start_time}, {end_time}]. Also review

Upgrade your node pools

for dynamic slicing upgrade requirements (required surge settings and

deleting active super-slices before upgrading).

5, item 4.

  1. Check automated node repairs: Follow

Get information about recent automated repair events

to check for repair operations on {nodepool_name}.

  1. If no operation or error explains the unstable MIG: Go to Step 5, item 5

to contact Cloud Customer Care.


Step 5: Resolution `[High Risk]`

Guardrail: Don't modify GKE-managed instance groups or VMs directly

through Compute Engine. Manage node pools through GKE.

  1. Wait for an ongoing update or auto-repair to finish: If a node pool

upgrade or automated repair is still making progress, the user can wait until

the MIG is stable (status.isStable: true) by following

Check whether a MIG is stable.

  1. Resolve capacity or quota errors: When Step 3 shows

ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS or QUOTA_EXCEEDED, rolling back

an upgrade won't resolve the shortage. Follow

Issue: Node pool creation fails due to insufficient resources

and the "Insufficient quota to satisfy the TPU request" and "Insufficient TPU

resources to satisfy the TPU request" sections of

Troubleshoot TPUs in GKE.

  1. Cancel an in-progress node pool upgrade: If the user wants to stop an

upgrade that is still running, follow

Cancel a node pool upgrade.

For dynamic slicing node pools, also check

Upgrade your node pools

for the required surge settings and deleting active super-slices before

upgrading.

  1. Resume or roll back a cancelled, failed, or incomplete node pool upgrade:

sections of

Manually upgrade a cluster's control plane or node pools.

As documented there, rollback applies if an in-progress upgrade was

cancelled, the upgrade failed, or the upgrade is incomplete due to a

maintenance window timing out (you can't roll back node pools once they

have been successfully upgraded); alternatively, a cancelled or failed,

partially completed upgrade can be resumed.

Check whether a MIG is stable.

  1. Escalate unexplained MIG instability: If no node pool upgrade, repair

operation, or capacity/quota error explains why {mig_name} remains

unstable, direct the user to Cloud Customer Care by following

Get support.

  1. Verify node pool and slice recovery: After the instance group is stable

(status.isStable: true), follow the "Monitor the status of the Slice custom

resource" and "Create a Slice custom resource" sections of

Use dynamic slicing with a custom scheduler

to verify that the Slice reaches the ACTIVE state. If the Slice stays

in SliceCreationFailed after the MIG stabilizes, check whether the retry

annotation documented in "Create a Slice custom resource" is set on the

Slice.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.