Token导航 LogoToken导航TokenDH.com
运维和基础设施external-servicegithub未标认证来源可访问许可证需确认审计提醒

upgrading-cluster-version升级集群版本

Agent Skill

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

总安装

303

周安装

13

GitHub Stars

9

下载量

106
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill upgrading-cluster-version

简介

upgrading-cluster-version 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。

  • 它适用于需要分析代码变更、协作事项或仓库状态的运维和基础设施场景。
  • 通过 npx skills add 命令安装,需指定 GitHub 仓库和技能路径即可使用。
  • 使用前应确认权限范围、维护状态,并注意是否会触发联网、命令执行或文件读写。
  • 建议结合原始 README 和仓库文档进一步验证具体功能和调用方式。

SKILL.md

Upgrading Cluster Version

Guides CockroachDB version upgrades end-to-end. Before providing procedures, this skill gathers deployment context to deliver only the steps relevant to the operator's tier.

When to Use This Skill

  • Planning or executing a version upgrade (Self-Hosted)
  • Initiating a major version upgrade via Cloud Console (Advanced, BYOC)
  • Configuring how patches are applied (Advanced, BYOC)
  • Verifying upgrade completion (all tiers)
  • Deciding whether to finalize or roll back (Self-Hosted)

For pre-upgrade health check: Use reviewing-cluster-health. For node drain during Self-Hosted upgrade: Use performing-cluster-maintenance. For maintenance window configuration: Use performing-cluster-maintenance.


Step 1: Gather Context

Required Context

QuestionOptionsWhy It Matters
Deployment tier?Self-Hosted, Advanced, BYOC, Standard, BasicCompletely different upgrade procedures per tier
Current version?e.g., v24.2.5Validates upgrade path and compatibility

Additional Context (by tier)

If Self-Hosted:

QuestionOptionsWhy It Matters
Upgrade type?Major (e.g., 24.2→24.3), Patch (e.g., 24.2.5→24.2.8)Major requires finalization; patches do not
Target version?e.g., v24.3.1Confirms version is available and sequential
Deployment platform?Bare metal, VMs, Kubernetes (Operator/Helm/manual)Changes binary replacement and restart procedure
Process manager?systemd, manual, container orchestratorChanges stop/start commands
Node count?NumberAffects upgrade sequencing

If Advanced or BYOC:

QuestionOptionsWhy It Matters
Upgrade type?Major version, PatchMajor requires Console initiation; patches use maintenance windows
Cloud provider? (BYOC only)AWS, GCP, AzureFor infrastructure-level monitoring during upgrade
Release channel?Regular, InnovationInnovation gives latest features, shorter support window

If Standard or Basic: No additional context needed — upgrades are fully automatic.

Context-Driven Routing


Self-Hosted Upgrade

Applies when: Tier = Self-Hosted

Major vs Patch

AspectMajor (e.g., 24.2→24.3)Patch (e.g., 24.2.5→24.2.8)
Finalization requiredYesNo
Rollback possibleBefore finalizationAlways (binary swap)
Auto-finalizationEnabled by default (disable recommended)N/A

Pre-Upgrade Validation

-- All nodes live
SELECT n.node_id, n.build_tag, n.is_live
FROM crdb_internal.gossip_nodes n ORDER BY n.node_id;

-- No bulk operations running
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');

-- No pending finalization from a previous upgrade
SHOW CLUSTER SETTING cluster.preserve_downgrade_option;

-- Ranges fully replicated
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;

Disable Auto-Finalization (Major Version — Recommended)

SET CLUSTER SETTING cluster.preserve_downgrade_option = '<current_version>';
-- Example: SET CLUSTER SETTING cluster.preserve_downgrade_option = '24.2';

Rolling Node Upgrade (repeat for each node)

If process manager = systemd:

cockroach node drain --self --certs-dir=<certs-dir> --host=<node-address>
sudo systemctl stop cockroachdb
cp /path/to/new/cockroach /usr/local/bin/cockroach
cockroach version  # verify new binary
sudo systemctl start cockroachdb

If Kubernetes (Operator):

kubectl patch crdbcluster <name> --type merge -p '{"spec":{"cockroachDBVersion":"<new-version>"}}'
# Operator handles rolling restart automatically

If Kubernetes (Helm):

helm upgrade cockroachdb cockroachdb/cockroachdb --set image.tag=<new-version>

If Kubernetes (manual StatefulSet):

kubectl set image statefulset/cockroachdb cockroachdb=cockroachdb/cockroach:<new-version>

Verify each node before proceeding to the next:

SELECT node_id, build_tag, is_live
FROM crdb_internal.gossip_nodes
WHERE node_id = <upgraded-node-id>;

Monitor Progress

SELECT n.node_id, n.build_tag AS version,
  CASE WHEN n.build_tag = (SELECT MAX(build_tag) FROM crdb_internal.gossip_nodes)
       THEN 'UPGRADED' ELSE 'PENDING' END AS status
FROM crdb_internal.gossip_nodes n ORDER BY n.node_id;

Finalize (Major Version Only — Irreversible)

SELECT COUNT(DISTINCT build_tag) FROM crdb_internal.gossip_nodes;  -- Must be 1
RESET CLUSTER SETTING cluster.preserve_downgrade_option;
SHOW CLUSTER SETTING version;  -- Monitor until updated

Roll Back (Before Finalization Only)

Verify cluster.preserve_downgrade_option still returns the old version, then replace each node's binary with the previous version and restart. After all nodes are back:

RESET CLUSTER SETTING cluster.preserve_downgrade_option;

Advanced Upgrade

Applies when: Tier = Advanced

Advanced clusters are managed by Cockroach Labs. You initiate major upgrades; patches are applied automatically.

Major Version Upgrade

  1. Cloud Console → Cluster → Settings → Upgrade
  2. Select target version
  3. CRL performs rolling upgrade across nodes automatically
  4. Monitor progress in Cloud Console
  5. Finalize via Cloud Console when testing is complete

SQL verification during upgrade:

SELECT build_tag AS version, COUNT(*) FROM crdb_internal.gossip_nodes GROUP BY 1;

Patch Upgrades

Patches are applied automatically during the configured maintenance window. See performing-cluster-maintenance for maintenance window configuration and patch deferral.

Release Channel

  • Regular: Stability-focused, longer support windows
  • Innovation: Latest features, shorter support, can be skipped

Configure via Cloud Console → Cluster → Settings → Upgrades.

Upgrade Before End of Support

You are responsible for initiating major upgrades before the current version reaches End of Support (EOS). Failure to upgrade before EOS may affect SLA guarantees.

Cloud API

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

BYOC Upgrade

Applies when: Tier = BYOC

BYOC upgrade procedures are the same as Advanced. Follow all Advanced Upgrade steps.

Cloud Provider Monitoring During Upgrade

Since BYOC clusters run in your cloud account, you can observe the rolling upgrade in your infrastructure:

If AWS: EC2 console shows instance restarts; CloudWatch metrics show brief dips during node cycling.

If GCP: Compute Engine console shows VM restarts; Cloud Monitoring shows instance-level events.

If Azure: Azure portal shows VM restarts; Azure Monitor captures instance events.

Additional BYOC Considerations

  • Verify PrivateLink/PSC/VPC Peering connections remain healthy during the upgrade
  • Reserved instances and committed use discounts are unaffected (instance types don't change)

Standard Upgrade

Applies when: Tier = Standard

Standard is a multi-tenant managed service. There are no nodes or infrastructure for you to manage. All upgrades — both major versions and patches — are applied automatically by Cockroach Labs.

  • Only Regular releases (no Innovation channel)
  • No maintenance window configuration
  • No deferral capability
  • No downtime during upgrades

After an Upgrade

  1. Monitor Cloud Console for upgrade notifications
  2. Review release notes for behavior changes
  3. Verify application compatibility: SELECT version();

Basic Upgrade

Applies when: Tier = Basic

Basic is a serverless offering. All upgrades are fully managed and transparent. The serverless architecture is designed for zero-downtime upgrades with no customer action required.

After an Upgrade

  1. Review release notes for behavior changes
  2. Verify version if needed: SELECT version();

Safety Considerations

OperationTierReversible?
Set preserve_downgrade_optionSHYes
Replace node binarySHYes (swap back before finalization)
Finalize upgradeSHNo — irreversible
Initiate Cloud Console upgradeADV/BYOCContact support to discuss
Automatic upgradeSTD/BASN/A (managed by CRL)

Critical:

  • Never skip major versions (SH) — upgrades must be sequential
  • Never finalize before testing (SH) — finalization is irreversible
  • Never change cluster settings during an upgrade (SH, ADV, BYOC)

Troubleshooting

IssueTierFix
Cannot set preserve_downgrade_optionSHValue must match output of SHOW CLUSTER SETTING version
Finalization stuckSHDecommission dead nodes; ensure all live nodes are upgraded
Auto-finalization triggered earlySHCannot undo; test application on new version
Upgrade not available in ConsoleADV/BYOCCheck release schedule; contact support
Behavior change after automatic upgradeSTD/BASReview release notes; contact support

References

Related skills:

Official CockroachDB Documentation:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.86%
按下载量换算40

Claude

30.91%
按下载量换算33

Cursor

19.66%
按下载量换算21

Gemini CLI

8.81%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills