Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

compute-resource-availability-troubleshooting

БесплатноБез исполняемых скриптовНе проверен

Diagnoses, mitigates, and prevents Google Compute Engine resource availability and capacity stockout errors (ZONE_RESOURCE_POOL_EXHAUSTED…

googleот google★ 25 380 звёзд на GitHub

Об этом скилле

Compute Engine Resource Availability and Stockout Troubleshooting

MCP Tools: list_machine_types, list_accelerator_types, get_zone_operation, list_instance_group_managers, list_managed_instances, list_reservations, get_reservation_details

This skill diagnoses and resolves Google Compute Engine resource availability errors (capacity stockouts). It provides immediate tactical workarounds to get blocked workloads running and long-term architectural mitigations using Regional Managed Instance Group (MIG) distribution shapes, Instance Flexibility, Dynamic Workload Scheduler (DWS) Flex-Start, and On-Demand Capacity Reservations.

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.


Prerequisites & Environment Setup

Any host, project, IAM, or Compute Engine resource modifications (installing gcloud, configuring MCP, enabling APIs or Log Analytics, creating instances or reservations, updating MIGs, or deleting resources) must be explicitly approved by the user before execution.

  1. Google Cloud SDK: Verify gcloud is installed (gcloud --version). If missing or outdated, ask the user for approval before installing via Install the Google Cloud SDK.
  2. Compute Engine MCP Server & Capability Boundary: When the Compute Engine MCP server is configured (see Use the Compute Engine MCP server; requires roles/mcp.toolUser), prefer its read-only discovery tools before falling back to gcloud:
    • list_machine_types and list_accelerator_types to check whether a machine shape or GPU accelerator is offered in a target zone.
    • get_zone_operation to inspect a failed zonal operation's error.errors array (ZONE_RESOURCE_POOL_EXHAUSTED, ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS, or QUOTA_EXCEEDED).
    • list_instance_group_managers and list_managed_instances to inspect zonal MIGs and per-instance currentAction / lastAttempt.errors (note: all Compute Engine MCP MIG tools—list_instance_group_managers, list_managed_instances, and get_instance_group_manager_basic_info—only accept a zone parameter and cannot inspect regional MIGs; use gcloud with --region={region} or REST for regional MIGs).
    • list_reservations and get_reservation_details to inspect existing zonal reservation capacity (specificReservation.count vs. specificReservation.inUseCount).
    • MCP Limitations (Use gcloud or REST Instead): MCP create_instance does not expose provisioning_model (FLEX_START / SPOT), max_run_duration, instance_termination_action, or reservation_affinity. MCP also lacks tools for Cloud Logging queries (gcloud logging read), Spot Capacity Advisor (gcloud beta compute advice capacity), Bulk Insert (gcloud compute instances bulk create), MIG distribution updates (gcloud compute instance-groups managed update), and reservation creation or deletion (gcloud compute reservations create / delete). Always use gcloud or the Compute Engine REST API for those operations.
  3. Authentication: Local CLI (gcloud auth login), Application Default Credentials (gcloud auth application-default login), or headless/CI-CD via GOOGLE_APPLICATION_CREDENTIALS or Workload Identity Federation.
  4. Project, Region, Billing & API Enablement:
    gcloud config set project {project_id}
    gcloud config set compute/region {region}
    gcloud config set compute/zone {zone}
    gcloud services enable compute.googleapis.com logging.googleapis.com
    
    Note: An active billing account attachment is required (even for Free Tier eligible resources such as e2-micro). Never hardcode regions or zones; confirm {project_id}, {region}, and {zone} (defaulting to a well-supported region such as us-central1 / us-central1-a if unspecified), and consult Google Cloud Locations to verify regional and zonal availability (preview features and specialized GPUs/TPUs are restricted to specific locations).
  5. Required IAM Roles:
    • Read-Only Diagnostics & Capacity Advice: roles/compute.viewer and roles/logging.viewer.
    • Log Analytics SQL (_Default._AllLogs): roles/logging.viewAccessor (plus roles/bigquery.jobUser and roles/bigquery.dataViewer when querying via a linked BigQuery dataset).
    • Instance & MIG Remediation: roles/compute.instanceAdmin.v1 (plus roles/iam.serviceAccountUser when attaching a service account to VMs).
    • Reservation Creation & Teardown: roles/compute.admin (or a custom role granting `comput
Полный SKILL.md на GitHub

Установить compute-resource-availability-troubleshooting в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/attribution.md

FAQ

Что делает скилл compute-resource-availability-troubleshooting?

Diagnoses, mitigates, and prevents Google Compute Engine resource availability and capacity stockout errors (ZONE_RESOURCE_POOL_EXHAUSTED, ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS, and machine type or accelerator unavailable in zone). Use ONLY when VM creation, Managed Instance Group (MIG) scale-out, or stopped instance startup fails due to regional or zonal hardware capacity exhaustion for GPUs, TPUs, or specific CPU shapes. DO NOT read or use for IAM permission errors, project quota limit increases without stockouts, general greenfield VM creation, or unexpected host reboots on already-running VMs.

Как установить скилл compute-resource-availability-troubleshooting?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл compute-resource-availability-troubleshooting запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить compute-resource-availability-troubleshooting с