Token导航 LogoToken导航

Agent Skill · 运维和基础设施

performing-cluster-maintenance(执行集群维护)

performing-cluster-maintenance 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

performing-cluster-maintenance 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,824。

总安装 380周安装 16GitHub Stars 9下载 133核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:performing-cluster-maintenance(执行集群维护)
来源仓库:https://github.com/cockroachlabs/cockroachdb-skills
仓库路径:skills/performing-cluster-maintenance
安装命令:
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill performing-cluster-maintenance
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill performing-cluster-maintenance

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中整理代码变更或协作事项。可结合来源仓库 README 继续核验具体用法,建议确认维护状态。安装前需注意是否会触发联网、命令执行或文件读写操作。

performing-cluster-maintenance 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/performing-cluster-maintenance

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill perfo…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

performing-cluster-maintenance 怎么安装?

在终端执行 npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill performing-clus…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

performing-cluster-maintenance 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

performing-cluster-maintenance 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

performing-cluster-maintenance 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

performing-cluster-maintenance 用的人多吗?

公开数据是累计安装 380 次,近一周安装 16 次,下载 133 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

performing-cluster-maintenance 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
performing-cluster-maintenance

执行集群维护 · 本页

3809调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Performing Cluster Maintenance

Manages planned cluster maintenance across all deployment tiers. For Self-Hosted, this means draining and restarting individual nodes. For Advanced/BYOC, this means configuring and managing maintenance windows for CRL-applied patches. For Standard and Basic, maintenance is fully managed with no customer action required.

When to Use This Skill

  • Planning OS patching, hardware changes, or configuration updates (Self-Hosted)
  • Configuring or modifying a maintenance window (Advanced, BYOC)
  • Setting patch deferral policies (Advanced, BYOC)
  • Monitoring during a CRL-managed maintenance event (Advanced, BYOC)
  • Running pre-maintenance validation checks (Self-Hosted, Advanced, BYOC)
  • Understanding how maintenance affects your application (all tiers)
  • Preparing applications for maintenance events (all tiers)

For permanent node removal: Use managing-cluster-capacity. For pre-maintenance health check: Use reviewing-cluster-health. For version upgrades: Use upgrading-cluster-version.


Step 1: Gather Context

Required Context

QuestionOptionsWhy It Matters
Deployment tier?Self-Hosted, Advanced, BYOC, Standard, BasicDetermines maintenance procedure
Goal?Plan maintenance, Configure maintenance window, Defer a patch, Monitor during maintenance, Prepare applicationRoutes to the right procedure

Additional Context (by tier)

If Self-Hosted:

QuestionOptionsWhy It Matters
Maintenance type?OS patching, Hardware change, Binary upgrade, Config change, Planned restartAffects sequencing and post-maintenance steps
Deployment platform?Bare metal, VMs, Kubernetes (Operator/Helm/manual)Changes drain and restart commands
Process manager?systemd, manual, container orchestratorChanges stop/start commands
Target node ID?Node IDRequired for drain command
Long-running queries expected?Yes (increase drain timeout), No (default timeout)Determines drain-wait parameter

If Advanced or BYOC:

QuestionOptionsWhy It Matters
Maintenance window configured?Yes (what schedule), NoDetermines if window needs setup
Patch pending?Yes, No, Don't knowDetermines urgency
Cloud provider? (BYOC only)AWS, GCP, AzureFor infrastructure-level monitoring

If Standard or Basic: No context needed — maintenance is fully managed.

Context-Driven Routing


Self-Hosted Node Maintenance

Applies when: Tier = Self-Hosted

Self-Hosted operators manage all maintenance directly. The core operation is draining a node to safely move leases and connections before stopping it.

Pre-Maintenance Checks

Run all checks before any maintenance operation. Stop if any check fails.

-- Check 1: All nodes live (STOP if any node is not live)
SELECT n.node_id, n.is_live
FROM crdb_internal.gossip_nodes n
JOIN crdb_internal.gossip_liveness l USING (node_id) ORDER BY n.node_id;

-- Check 2: No other nodes currently draining (STOP if any draining)
SELECT node_id FROM crdb_internal.gossip_liveness WHERE draining = true;

-- Check 3: Ranges fully replicated (STOP if under-replicated ranges exist)
SELECT CASE WHEN array_length(replicas, 1) >= 3 THEN 'fully_replicated'
            ELSE 'under_replicated' END AS status, COUNT(*)
FROM crdb_internal.ranges_no_leases GROUP BY 1;

-- Check 4: No disruptive jobs running (WAIT or pause before proceeding)
WITH j AS (SHOW JOBS)
SELECT job_id, job_type, status, now() - created AS running_for FROM j
WHERE status IN ('running', 'paused')
  AND job_type IN ('SCHEMA CHANGE', 'BACKUP', 'RESTORE', 'IMPORT', 'NEW SCHEMA CHANGE');

-- Check 5: Not mid-upgrade (STOP if versions differ)
SELECT DISTINCT build_tag FROM crdb_internal.gossip_nodes;

-- Check 6: Storage utilization safe (WARNING if any node > 70%)
SELECT node_id,
  ROUND((1 - available::FLOAT / capacity::FLOAT) * 100, 2) AS utilization_pct
FROM crdb_internal.kv_store_status ORDER BY node_id;

Stop conditions: Do not proceed with maintenance if any node is not live, ranges are under-replicated, another node is draining, or a rolling upgrade is in progress. Wait for running jobs to complete or pause them.

See maintenance-prechecks reference for a consolidated precheck script.

Execute Drain

If platform = bare metal or VMs:

cockroach node drain --self --certs-dir=<certs-dir> --host=<node-address>

If long-running queries expected:

cockroach node drain --self --certs-dir=<certs-dir> --host=<node-address> --drain-wait=60s

If platform = Kubernetes:

# Operator handles drain automatically during pod eviction
kubectl delete pod <pod-name>
# Or for rolling restart:
kubectl rollout restart statefulset cockroachdb

Stop, Maintain, Restart

If process manager = systemd:

sudo systemctl stop cockroachdb
# ... perform maintenance ...
sudo systemctl start cockroachdb

If process manager = manual:

kill -TERM $(pgrep -f 'cockroach start')
# ... perform maintenance ...
cockroach start --certs-dir=<certs-dir> --store=<path> --join=<addresses> --background

Never use kill -9 unless the process is unresponsive to SIGTERM.

Post-Restart Verification

SELECT node_id, is_live FROM crdb_internal.gossip_nodes WHERE node_id = <node_id>;
-- is_live = true

SELECT node_id, lease_count FROM crdb_internal.kv_store_status WHERE node_id = <node_id>;
-- lease_count should increase over minutes as leases rebalance

See drain-details reference for drain phases, timeout configuration, and advanced monitoring.

Storage Maintenance

Periodic storage maintenance for Self-Hosted clusters:

Ballast file verification:

ls -lh <store-path>/auxiliary/EMERGENCY_BALLAST
# If missing, create: cockroach debug ballast <store-path>/auxiliary/EMERGENCY_BALLAST --size=1GiB

Disk utilization check:

SELECT node_id,
  ROUND(capacity / 1073741824.0, 2) AS total_gb,
  ROUND(available / 1073741824.0, 2) AS available_gb,
  ROUND((1 - available::FLOAT / capacity::FLOAT) * 100, 2) AS utilization_pct
FROM crdb_internal.kv_store_status ORDER BY node_id;

Nodes above 70% utilization should be addressed before maintenance — draining a node temporarily increases load on remaining nodes.


Advanced Maintenance Management

Applies when: Tier = Advanced

Advanced clusters are managed by Cockroach Labs. CRL applies patches and performs infrastructure maintenance during the configured maintenance window. You do not drain or restart nodes — CRL handles this using rolling restarts.

Configure a Maintenance Window

  1. Cloud Console → Cluster → Settings → Maintenance
  2. Set a weekly 6-hour window

- Choose day of week (e.g., Sunday) - Choose start time in UTC (e.g., 02:00 UTC) - Window duration is 6 hours

If no window is configured, CRL applies patches at a time of their choosing.

View Current Maintenance Window

Cloud Console → Cluster → Settings → Maintenance shows the current schedule.

Cloud API:

curl -s -H "Authorization: Bearer $COCKROACH_API_KEY" \
  "https://cockroachlabs.cloud/api/v1/clusters/<cluster-id>" | jq '.maintenance_window'

Defer Patches

If a pending patch needs to be delayed (e.g., for testing):

  1. Cloud Console → Cluster → Settings → Upgrades
  2. Select deferral period: 30, 60, or 90 days

Deferred patches still apply at the end of the deferral period. Deferral only delays — it does not skip.

What Happens During Maintenance

  1. CRL applies the patch using rolling restarts — one node at a time
  2. Each node is drained (connections and leases moved), updated, and restarted
  3. Cluster remains available throughout (multi-node clusters)
  4. Performance may be slightly degraded during the window due to temporarily reduced capacity

Single-node clusters experience downtime during maintenance. Consider scaling to 3+ nodes for production workloads.

Monitor During Maintenance

Cloud Console:

  • Cluster Overview shows node status during rolling restarts
  • Metrics page shows temporary dips in QPS and capacity
  • Alerts may fire for transient node unavailability

SQL (during maintenance):

-- Check which nodes are currently live
SELECT node_id, build_tag, is_live
FROM crdb_internal.gossip_nodes n
JOIN crdb_internal.gossip_liveness l USING (node_id) ORDER BY node_id;

Best Practices

  • Schedule during your lowest-traffic period
  • Monitor P99 latency during and after the window
  • Test patches in a staging cluster before production
  • Use deferral to align with your testing and release cadence
  • Configure alerting to notify during maintenance windows
  • Ensure applications implement connection retry with exponential backoff

BYOC Maintenance Management

Applies when: Tier = BYOC

BYOC maintenance follows the same CRL-managed process as Advanced. Follow all Advanced Maintenance Management steps for maintenance window configuration, patch deferral, and monitoring.

Cloud Provider Visibility

Since BYOC clusters run in your cloud account, you can directly observe maintenance operations:

If AWS:

  • EC2 console shows instance restarts during rolling patches
  • CloudWatch metrics show brief dips during node cycling
  • Set up CloudWatch Alarms for instance state changes

If GCP:

  • Compute Engine console shows VM restarts
  • Cloud Monitoring shows instance-level events
  • Configure alerting policies for instance uptime

If Azure:

  • Azure portal shows VM cycling
  • Azure Monitor captures instance restart events
  • Set up Azure Alerts for VM availability

BYOC Infrastructure Maintenance

For infrastructure changes in your cloud account that CRL does not manage (VPC, security groups, IAM, DNS):

  • Coordinate with CRL before making changes that could affect the cluster
  • Do not modify CRL-managed resources (instances, disks, network interfaces)
  • Test infrastructure changes in a staging BYOC cluster first
  • Changes to networking (PrivateLink, PSC, VPC Peering) may require CRL coordination

Standard Maintenance

Applies when: Tier = Standard

Standard is a multi-tenant managed service. There are no nodes, no maintenance windows to configure, and no patches to defer. Cockroach Labs manages all maintenance transparently.

What to Expect

  • Patches are applied during low-traffic periods chosen by CRL
  • No downtime during maintenance
  • No customer notification required for routine patches
  • Major version upgrades are also automatic

Application Preparation

  • Implement connection retry logic with exponential backoff
  • Handle brief latency variations gracefully
  • Monitor Cloud Console for any service notifications

Basic Maintenance

Applies when: Tier = Basic

Basic is a serverless offering. All maintenance is fully managed by Cockroach Labs. The serverless architecture is designed for zero-downtime maintenance.

What to Expect

  • All patches and upgrades are transparent
  • No customer action required
  • No maintenance notifications needed

Application Preparation

  • Implement connection retry logic (recommended for all production applications)
  • Be aware that idle clusters may scale to zero — first reconnection after inactivity may have higher latency (this is not maintenance-related)

Safety Considerations

Read-only monitoring queries are safe on all tiers.

Self-Hosted node maintenance:

  • Only drain one node at a time
  • Drain cannot be canceled once started
  • Applications must have connection retry logic
  • Load balancer detects drained node via /health?ready=1 returning error
  • Never SIGKILL unless process is unresponsive to SIGTERM

Advanced/BYOC maintenance windows:

  • Single-node clusters experience downtime during maintenance
  • Deferring patches too long delays security fixes — evaluate CVE impact
  • Do not modify CRL-managed infrastructure during a maintenance window

Standard/Basic: No maintenance risk for customers — fully managed by CRL.

See safety-guide reference for detailed risk matrix.

Troubleshooting

IssueTierFix
Drain very slowSHCheck SHOW CLUSTER STATEMENTS for stuck queries
Drain hangsSHCheck logs; SIGTERM if unresponsive
Node won't rejoin after restartSHVerify --join flag; check network connectivity
Leases not returning to nodeSHWait 5-10 min; monitor lease_count
Clients not reconnectingSHVerify load balancer health check is passing
Maintenance window missedADV/BYOCContact support
Unexpected maintenance outside windowADV/BYOCEmergency patches may be applied outside windows; check Cloud Console notifications
Latency during maintenanceADV/BYOCExpected — temporarily reduced capacity; monitor and verify recovery after window

References

Skill references:

Related skills:

Official CockroachDB Documentation:

平台分布

Codex

34.34%
按下载量换算46

Claude

30.08%
按下载量换算40

Cursor

20.85%
按下载量换算28

Gemini CLI

9.23%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills