Generated banner for Gke AI Troubleshooting Tpu Vm Repair Stuck
Generated logo for Gke AI Troubleshooting Tpu Vm Repair Stuck

Gke AI Troubleshooting Tpu Vm Repair Stuck

GoogleOfficialPublished by Google

  • Skill
  • Workflow
  • Cloud and DevOps
  • Apache-2.0
  • No issues found

From the author

Diagnose GKE TPU VM instances stuck in Compute Engine repair (REPAIRING state) after host errors, maintenance events, or faulty host reports in single-host, multi-host, dynamic slicing, and TPU All Capacity mode node pools. Use when TPU instances in a slice node pool remain in REPAIRING, host error events appear in audit logs, or TPU slices are unschedulable due to a VM in repair. Don't use for nodes reporting Ready: Unknown when no VM is in REPAIRING (use gke-ai-troubleshooting-node-unresponsive-timeout), other NotReady nodes when no VM is in REPAIRING (use gke-node-notready), Pending Pods when all nodes are Ready (use gke-workload-troubleshooting), JobSet preemption events (use gke-ai-troubleshooting-jobset-interruption), or Slice custom resource lifecycle failures (use gke-ai-troubleshooting-tpu-dynamic-slices-monitoring).
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a diagnostic workflow for troubleshooting GKE TPU VM instances that remain in a REPAIRING state within Compute Engine. It guides users through checking VM status, reviewing system events, identifying node pool impacts, and verifying GKE auto-repair operations. The skill emphasizes using GKE-native management rather than direct Compute Engine modifications to ensure cluster integrity.

What it does

  • Identifies TPU VMs stuck in the REPAIRING state within managed instance groups.
  • Analyzes Compute Engine system events to determine the cause of VM repair.
  • Evaluates the impact of unhealthy nodes on different TPU node pool configurations.
  • Checks GKE auto-repair status and identifies potential faulty host reports.
  • Provides guidance on enabling node auto-repair for Standard clusters.
  • Directs users to Cloud Customer Care when automated recovery paths are exhausted.

When to use it

  • When TPU instances in a slice node pool remain in a REPAIRING state.
  • When host error events appear in audit logs for TPU VMs.
  • When TPU slices are unschedulable due to a VM being stuck in repair.

Advantages

  • Prevents manual intervention that could lead to orphaned resources.
  • Distinguishes between standard repairs and long-running faulty host reports.
  • Ensures troubleshooting aligns with GKE-specific TPU node pool behaviors.
  • Provides clear hand-off paths to other specialized GKE troubleshooting skills.

Usage examples

“My TPU VM is stuck in REPAIRING, how do I fix it?”
The agent will initiate the diagnostic workflow, starting by collecting cluster context and checking the status of the managed instance group to confirm the repair state.
“Why is my TPU node pool not auto-repairing?”
The agent will verify if node auto-repair is enabled for the node pool and check the GKE operation history for any failed repair attempts or pending status.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/gke-ai-troubleshooting-tpu-vm-repair-stuck/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip gke-ai-troubleshooting-tpu-vm-repair-stuck.zip -d .agents/skills

Documentation by Google

Troubleshoot GKE TPU VMs stuck in Compute Engine repair (REPAIRING)

This skill checks the VM status, the host events, and the GKE repair status, and routes recovery through GKE instead of direct Compute Engine changes.

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-vm-repair-stuck)" and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vm-repair-stuck) to User-Agent headers.

Prerequisites

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

  • {cluster_mode}: Cluster mode (Autopilot or Standard)

  • {tpu_version}: TPU version (such as Ironwood tpu7x, TPU v6e, v5p, v5e, or v4) and whether the node pool is a single-host or multi-host TPU slice node pool

  • {nodepool_name}: TPU node pool name

  • {group_name} and {zone}: Name and zone of the managed instance group (MIG) that backs the node pool:

    • In a Standard cluster, follow View node pools in a Standard cluster to describe {nodepool_name} and read its instanceGroupUrls field (see Resource: NodePool).

    • In an Autopilot cluster (or if {nodepool_name} isn't known), follow List MIGs to list the managed instance groups in {project_id} and find {group_name} and {zone}.

  • {instance_name}: Affected TPU VM name, if known. If the user doesn't know {instance_name}, Step 1 finds the instances in REPAIRING.

  • {issue_time}: Incident timestamp in RFC3339 UTC, if known


Step 1: Check the VM status in the managed instance group [Low Risk]

To list the instances in {group_name} with their status (STATUS / instanceStatus) and current action (ACTION / currentAction), follow the instructions in Check the status of managed instances.

  • Analysis:

    • STATUS (instanceStatus) is REPAIRING: Compute Engine is repairing the VM because it encountered an internal error or its host server is unavailable due to maintenance. The VM can't be used during the repair. See REPAIRING state. Record {instance_name} and proceed to Step 2.

    • No instance is in REPAIRING (every instance reports RUNNING with ACTION NONE, or an instance reports another status or action such as ACTION RECREATING, which means "The instance is being replaced" per Check the status of managed instances): Check each node's status and conditions following Check the node's status and conditions and hand off to the matching sibling skill:

      • If a node's Ready condition is Unknown (NodeStatusUnknown), hand off to gke-ai-troubleshooting-node-unresponsive-timeout.

      • If a node isn't Ready for another reason, hand off to gke-node-notready.

      • If every node is Ready (per Repair criteria, "A node reporting a Ready status is considered healthy") but the workload's Pods are still Pending, hand off to gke-workload-troubleshooting.


Step 2: Check Compute Engine system events [Low Risk]

To list the system events for {instance_name} around {issue_time}, follow the instructions in the section Querying Cloud Audit Logs. Compare the method field with the table in the Reviewing Cloud Audit Logs section of the same document:

  • compute.instances.hostError, compute.instances.terminateOnHostMaintenance, or compute.instances.automaticRestart: Record the matching system event log entries and timestamps, and continue to Steps 3 and 4.

  • compute.instances.preempted: Compute Engine preempted a Spot VM or preemptible VM. If the affected workload is a JobSet, hand off to gke-ai-troubleshooting-jobset-interruption. Otherwise, follow Confirm node preemption.

  • No method from the table, or another method: Per the note in Reviewing Cloud Audit Logs, if a VM rebooted and none of the listed methods appears in the query results, the reboot likely happened because the VM's operating system initiated it. If the VM is still in REPAIRING in Step 1 (or a method such as compute.instances.reportHostAsFaulty appears), continue to Steps 3 and 4.


Step 3: Check the node status and slice impact [Low Risk]

Follow Check the node's status and conditions to check the status and conditions of the nodes in the cluster and match {instance_name} using the node's ProviderID field. To filter nodes to {nodepool_name}, use the cloud.google.com/gke-nodepool node label documented in Deploy a Pod to a specific node pool.

  • If the node for {instance_name} reports Ready (per Repair criteria, "A node reporting a Ready status is considered healthy") and the VM is no longer in REPAIRING, proceed to Step 5, item 4.

  • Otherwise, determine how the unhealthy node affects the node pool based on the node pool configuration:

    • Single-host TPU slice node pool: Per Configure auto repair for TPU slice nodes, "In a single-host TPU slice node pool, only the unhealthy TPU node is auto-repaired."

    • Dynamic slicing node pool: To check whether {nodepool_name} uses dynamic slicing, see Requirements: dynamic slicing requires a Standard cluster, Ironwood (tpu7x), and All Capacity mode reservations. For a Standard cluster with Ironwood (tpu7x), check whether the node has cloud.google.com/gke-accelerator-topology-mode: PROVISION_ONLY as shown in step 2 of Verify the status of the nodes and the partitions (per Key characteristics of dynamic slicing configurations, "dynamic slicing uses incremental provisioning"). Per Hardware maintenance and failures, "If you trigger customer-initiated maintenance or if a hardware failover occurs, only the targeted nodes are affected rather than the entire node pool." For an active dynamic sub-slice, the Slice custom resource transitions to FAILED and the scheduler attempts to re-create the slice on other available healthy nodes. Check the Slice status following Monitor the status of the Slice custom resource; if the Slice custom resource is in FAILED or another non-active state, hand off Slice troubleshooting to gke-ai-troubleshooting-tpu-dynamic-slices-monitoring alongside checking the VM repair in Step 4.

    • TPU All Capacity mode node pool: Per Manage node failures and Node failure and recovery, in TPU All Capacity mode, if a VM fails due to issues like hardware failure, Google Cloud "attempts to recover the VM on the same host (in-place repair)", failed nodes have a status of NotReady, and the node pool's status doesn't change to ERROR.

    • Multi-host TPU slice node pool (without dynamic slicing or All Capacity mode): Per the section Multi-host TPU slice node pools, the VMs in a multi-host TPU slice node pool are treated as a single atomic unit. When a node in the slice requires repairing, GKE shuts down all VMs in the TPU slice, forcing eviction of all the Kubernetes Pods in the workload, and the Pods can be scheduled again only after all VMs in the slice are up and running.


Step 4: Check node auto-repair status and faulty host reports [Low Risk]

Find out whether GKE or Compute Engine is repairing the node:

  1. Check whether node auto-repair is enabled:

  2. Check the GKE repair operation history: Per Configure auto repair for TPU slice nodes, check the repair status, including any failure reason, in the operation history described in Get information about recent automated repair events:

    • If a repair operation failed because of insufficient quota, tell the user to contact their Google Cloud account representative to increase the quota.

    • If autoRepair is enabled and no repair operation has appeared yet, check how long the node has been unhealthy (from {issue_time} or the Ready condition's LastTransitionTime in Step 3). Per Repair criteria, GKE initiates a repair when a node reports a NotReady status, or doesn't report any status at all, over a given time threshold of approximately 10 minutes. If the node has reported NotReady (or no status) for less than approximately 10 minutes, check the operation history again after that threshold has passed. If it has been longer than approximately 10 minutes and there is still no repair operation (and no All Capacity mode faulty host report in item 3), escalate in Step 5, item 3.

  3. For TPU All Capacity mode node pools, check for a faulty host report: Per Understand the faulty host report process, after a user reports a faulty host, the TPU VM is stopped, its state changes to REPAIRING, and "The host repair process can take between 3 and 14 days, or longer." Before escalating a VM in REPAIRING in an All Capacity mode reservation, follow Review report faulty host operations to check for a compute.instances.reportHostAsFaulty operation on {instance_name}.


Step 5: Resolution [High Risk]

Guardrails:

  • Never change GKE-managed instance groups or VMs directly through Compute Engine, for example with gcloud compute instances delete or gcloud compute instance-groups managed commands that change the group. Manage the node pool through GKE.

  • Never run kubectl delete node on nodes in the node pool. Per Settings for Autopilot and Standard, if you use kubectl to delete an unhealthy node when auto-repair is disabled, the underlying VM might become orphaned from the cluster, and you would continue to be billed for it.

  1. Enable node auto-repair (Standard clusters only):

    • Autopilot clusters always auto-repair nodes, so skip this step.

    • Before the user enables auto-repair on a multi-host TPU slice node pool that doesn't use dynamic slicing or All Capacity mode, tell them that GKE re-creates the entire node pool when a node in it needs repair (see item 2 of this step).

    • If autoRepair is disabled on {nodepool_name}, link the user (who needs the Kubernetes Engine Cluster Admin role, roles/container.clusterAdmin) to Enable auto-repair for an existing Standard node pool and Configure auto repair for TPU slice nodes so they can apply the change themselves.

  2. Let GKE or All Capacity mode repair the node or slice:

    • Single-host TPU slice node pool: Per Configure auto repair for TPU slice nodes, "In a single-host TPU slice node pool, only the unhealthy TPU node is auto-repaired." Per Node repair process, for a single node repair, GKE drains the node and waits one hour for the drain to complete; if the drain doesn't complete, GKE shuts the node down and creates a new node.

    • Multi-host TPU slice node pool (without dynamic slicing or All Capacity mode): Per Node auto repair in TPU slice nodes and Configure auto repair for TPU slice nodes, if a TPU slice node in a multi-host TPU slice node pool is unhealthy and requires auto repair, the entire node pool is re-created.

    • Dynamic slicing node pool: Per Hardware maintenance and failures, only the targeted nodes are affected rather than the entire node pool, and for dynamic sub-slicing the scheduler attempts to re-create failed slices on other available healthy nodes. If Slice custom resources fail to form or remain FAILED, hand off to gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.

    • TPU All Capacity mode with a faulty host report: If Step 4, item 3 found a compute.instances.reportHostAsFaulty operation for {instance_name} (tracked via Review report faulty host operations), do not escalate the VM as stuck. Tell the user that per Understand the faulty host report process, the VM stops during the repair and restarts on the same host after the repair is complete, and "The host repair process can take between 3 and 14 days, or longer."

  3. Contact Cloud Customer Care if the repair doesn't start or complete:

    • If the VM stays in REPAIRING (and isn't waiting on a 3-to-14-day All Capacity mode faulty host repair), if the node has been NotReady (or reported no status) for longer than the ~10-minute threshold in Repair criteria with autoRepair enabled and no repair operation in Step 4, or if the operation history shows a failed repair that isn't caused by quota, direct the user to Before you contact support and Recommendations for efficient support to contact Cloud Customer Care. In addition to the details listed in Recommendations for efficient support, include the node pool name, instance name, the system event log entries from Step 2, and the repair operation name from Step 4.

  4. Verify recovery:

    • Repeat Step 1 and Step 3. When recovery is complete, every instance in {group_name} reports RUNNING with action NONE, and every node in {nodepool_name} is Ready.

    • If the instances report RUNNING with action NONE (or another status or action) and a node still isn't Ready, follow the handoffs in Step 1 (gke-ai-troubleshooting-node-unresponsive-timeout or gke-node-notready) or escalate to Cloud Customer Care in item 3 of this step.

Files

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
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/gke-ai-troubleshooting-tpu-vm-repair-stuck · 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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-ai-troubleshooting-tpu-vm-repair-stuck.zip