huawei-cloud-dcs-failover
БесплатноЗапускает вложенные скриптыНе проверенHuawei Cloud DCS master-slave failover (AZ power-off) drill tool. One-click pipeline: prepare (checks + risk assessment) -> execute (failover) -> report…
от huaweicloudskill207 установок в других каталогахОб этом скилле
Huawei Cloud DCS Master-Slave Failover (AZ Power-Off) Drill
Overview
This tool safely performs a DCS (Redis) master-slave failover drill on Huawei Cloud, verifying instance HA capability under AZ power-off (master node failure) scenarios. It runs a three-phase pipeline:
prepare (checks + risk assessment) -> execute (failover) -> report (generate report)
- prepare: query DCS instance, check IAM permissions, architecture hard-gate (ha + cross-AZ + RUNNING), generate experiment config directory, and run risk assessment
- execute: load config, safely execute master-slave failover (
ChangeMasterStandby), poll for completion, data consistency check - report: read config and execution result, generate comprehensive HTML report (instance info, safety checks, topology change, failover timeline, data consistency check)
Triggers / Trigger Conditions
Triggered when the user needs to perform a DCS master-slave failover, switchover, fault drill, AZ power-off drill, or failover experiment.
Triggers: DCS主备倒换, 主备倒换演练, DCS故障演练, 主备切换, 倒换实验, dcs failover, DCS failover, 高可用演练, 高可用验证, DCS HA切换, AZ断电演练, 主备互换, DCS switchover, Redis故障演练, DCS容灾演练
Trigger conditions:
- User mentions DCS master-slave failover or failover operation
- User needs to perform master-slave switchover on a ha-type DCS instance
- User needs a DCS fault drill or HA verification (AZ power-off scenario)
- User needs to swap master-slave or switchover on a DCS instance
- User needs to verify DCS HA / disaster recovery capability
Prerequisites
| Condition | Description | Verification |
|---|---|---|
| hcloud CLI | Installed and authenticated (KooCLI >= 3.0.0) | hcloud version |
| AK/SK | Configured via hcloud profile. Script only checks if read-only calls succeed; actual auth is handled by hcloud profile | hcloud DCS ListInstances --cli-region=cn-south-1 |
| Python 3.8+ | To run scripts | python3 --version |
| Master-slave DCS instance | A ha-type instance exists in the target region | hcloud CLI |
| Instance status RUNNING | Instance must be running before failover | prepare phase auto-checks |
Configuration
Shared config file config/config.json:
{
"region": "cn-south-1",
"instance_id": "<your-dcs-instance-id>"
}
| Field | Required | Description |
|---|---|---|
region |
Yes | Huawei Cloud region ID (e.g. cn-south-1, cn-north-4) |
instance_id |
Yes | Target DCS instance ID |
⚠️ You must modify
config/config.jsonbefore running: replaceregionandinstance_idwith your own region and DCS instance ID. The default value is a placeholder; using it directly will fail.
ℹ️ No need to adjust hcloud env config: This skill does not require or recommend modifying hcloud profile (e.g. readTimeout). The script layer uses a sufficiently long subprocess timeout (120s) for CLI calls, and
run_hclouddetects CLI timeout signatures (调用API超时/context deadline exceeded/readTimeout), applying idempotent protection for synchronous mutation API timeouts (read-only recheck, no command replay). User hcloud env config can stay as-is.
Parameter Confirmation
Required Parameters
- region: Huawei Cloud region ID (e.g. cn-south-1, cn-north-4), configured in
config/config.json - instance_id: Target DCS master-slave instance ID, configured in
config/config.json
Optional Parameters
- --phase: Pipeline phase to run (prepare / execute / report / all), default
all - --force: Skip critical risk blocking and force failover execution (requires manual confirmation)
- --config-dir: Config directory path, default
experiments/
Conversational Usage (Recommended)
The user simply says "执行 DCS 主备倒换" (or an equivalent trigger), and the agent guides through the drill automatically. The user does not need to manually edit any config file.
Agent Guidance Flow
- Probe instances: use
hcloud DCS ListInstances --cli-region=<region>to query instances in the target region; if the user hasn't specified a region, probe by priority (cn-south-1 / cn-north-4 / cn-north-1 / cn-east-3) to find a drillable master-slave instance (ha + cross-AZ + RUNNING) - Confirm target: show candidate instances to the user, confirm the target (if only one candidate, can confirm directly)
- Confirm execution: confirm user authorizes a real failover (failover is a mutation that swaps master-slave roles, must be confirmed). Options should only revolve around "execute/cancel", do not offer "prepare-only" options — the user's goal is to execute failover; prepare is just an internal pipeline phase
- Write config: write the confirmed region / instance_id into
config/config.json - Execute full pipeline: internally call
python3 scripts/run.pyto perform the real failover (if user confirms forced drill, internally append--force, **no need to expose CLI args to us
Установить huawei-cloud-dcs-failover в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-dcs-failover?
Huawei Cloud DCS master-slave failover (AZ power-off) drill tool. One-click pipeline: prepare (checks + risk assessment) -> execute (failover) -> report. Queries DCS master-slave instance, checks IAM permissions, architecture hard-gate (ha + cross-AZ + RUNNING), safely executes master-slave failover (ChangeMasterStandby), polls for completion, data consistency check, three-dimensional scoring (failover/data/business, written to execution_result.json), generates HTML report. prepare phase includes built-in risk assessment (instance health, master-slave nodes, memory/CPU/connections/latency load, backup safety net, etc.). Critical risks block failover by default (user must confirm to proceed). Supports Redis master-slave instances. Triggers: DCS主备倒换, 主备倒换演练, DCS故障演练, 主备切换, 倒换实验, dcs failover, DCS failover, 高可用演练, 高可用验证, DCS HA切换, AZ断电演练, 主备互换, DCS switchover, Redis故障演练, DCS容灾演练。
Как установить скилл huawei-cloud-dcs-failover?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-dcs-failover запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic