⚠️ Execution Method (Must Read): This skill executes diagnosis via local Python scripts using a dispatcher pattern. Using hcloud, openstack, or other CLI tools or direct API calls is prohibited.
- The dispatcher script is
scripts/huawei-cloud.py, invoked aspython3 scripts/huawei-cloud.py <action> <key=value params>- All scripts and environment check scripts are inside the skill package. You must use
skill action=execto execute them. Do not run them directly in a shell.- For action details and parameters, refer to
references/workflow.md,references/risk-rules.md, andreferences/output-schema.md- Do not attempt hcloud, openstack, curl IAM, or any other CLI/API methods. This skill does not depend on those tools.
- All paths are relative to the skill directory, which is the directory where this SKILL.md is located.
This skill diagnoses CCE (Cloud Container Engine) network failures by performing a layered, read-only diagnosis across the full network stack — from node infrastructure, DNS, Service/EndpointSlice, NetworkPolicy, Ingress to cloud-side ELB/EIP/NAT/VPC security policies. It produces a complete Markdown diagnosis report that must include the investigation process, evidence, conclusions, confidence levels, and verification criteria.
Use this skill when:
This skill does NOT handle:
huawei-cloud-cce-pod-failure-diagnoser, huawei-cloud-cce-node-failure-diagnoser, huawei-cloud-cce-workload-failure-diagnoser)You must run the environment check script first to complete environment validation and dependency installation in one step:
skill action=exec: bash skill://scripts/check_env.shskill action=exec: powershell -ExecutionPolicy Bypass -File skill://scripts/check_env.ps1Windows note: Do not use
&&to chain commands (PowerShell 5.x does not support it); use semicolons if you need to change directories first.
The script will check in order: Python >= 3.6 → install dependencies → validate SDK → validate credentials → validate service availability. If the environment check fails, fix the issues before proceeding.
Environment Variables:
VariableRequiredDescriptionHW_ACCESS_KEYYesHuawei Cloud AK (Access Key)HW_SECRET_KEYYesHuawei Cloud SK (Secret Key)HW_REGION_NAMENoDefault cn-north-4HW_PROJECT_IDNoProject ID (automatically obtained via IAM API when not set)HW_SECURITY_TOKENNoRequired when using temporary AK/SKHW_CCE_CLUSTER_IDYesCCE cluster ID for diagnosis targetKUBECONFIGNoKubernetes config; auto-obtained from CCE API if not set
Security Constraints:
Do not output the values of environment variables.
API ActionPermissionPurposecce:cluster:getGet clusterView cluster detailscce:cluster:listList clustersList CCE clusterscce:node:listList nodesList cluster nodesvpc:vpc:listList VPCsQuery VPC detailsvpc:subnet:listList subnetsQuery subnet detailselb:loadbalancer:listList ELBsQuery ELB detailselb:listener:listList listenersQuery ELB listenersaom:*:getRead AOMQuery AOM metrics and alarms
Permission Failure Handling:
All actions are invoked via the Python dispatcher script:
text
python3 scripts/huawei-cloud.py <action> region=<region> cluster_id=<cluster_id> namespace=<namespace> [other_params...]
Execution via skill:
skill action=exec: skill://.venv/bin/python3 skill://scripts/huawei-cloud.py <action> <params>skill action=exec: skill://.venv/Scripts/python3.exe skill://scripts/huawei-cloud.py <action> <params>ActionDescriptionhuawei_network_failure_diagnoseOne-shot diagnosis: collects K8s and cloud-side read-only snapshots, returns structured findings + report_markdown
ActionDescriptionhuawei_get_cce_servicesList Services in a namespacehuawei_get_cce_ingressesList Ingresses in a namespacehuawei_get_cce_podsList Pods in a namespacehuawei_get_kubernetes_nodesList cluster Nodeshuawei_get_cce_eventsList cluster Eventshuawei_get_pod_logsRetrieve Pod container logs
ActionDescriptionhuawei_get_elb_backend_statusRead ELB pool/member/health monitor/load balancer statushuawei_get_elb_metricsRetrieve ELB monitoring metricshuawei_list_elbList ELB load balancershuawei_list_elb_listenersList ELB listenershuawei_list_eipList EIP addresseshuawei_get_eip_metricsRetrieve EIP monitoring metricshuawei_list_natList NAT gatewayshuawei_get_nat_gateway_metricsRetrieve NAT gateway metricshuawei_list_security_groupsList VPC security groupshuawei_list_vpc_aclsList VPC ACLs
ActionDescriptionhuawei_network_diagnoseLegacy comprehensive network diagnosishuawei_network_diagnose_by_alarmDiagnosis triggered by alarm correlationhuawei_network_verify_pod_schedulingVerify Pod scheduling constraints (read-only)
ParameterDescriptionregionHuawei Cloud region, e.g., cn-north-4``cluster_idCCE cluster IDnamespaceKubernetes namespace
ParameterDescriptionfailure_symptomSymptom description: domain_unresolvable, in_cluster_service_unreachable, service_intermittent, external_access_failed, ingress_502_504``target_kindResource type: Pod, Service, Ingress, etc.target_nameResource nameservice_nameTarget Service nameingress_nameTarget Ingress namesource_podSource Pod name or labeldestination_podDestination Pod name or labeldomainDomain name for DNS diagnosiselb_idELB load balancer ID
huawei_network_failure_diagnose returns structured JSON with an embedded report_markdown:
json
{
"success": true,
"action": "huawei_network_failure_diagnose",
"region": "cn-north-4",
"cluster_id": "cluster-id",
"namespace": "default",
"conclusion": "high signal conclusion",
"confidence": "High",
"pipeline_pruned": false,
"findings": [
{
"stage": "Stage 3: East-West Routing and Policy Layer",
"type": "NetworkPolicyBlocked",
"title": "NetworkPolicy selects target Pod but does not allow source Pod labels or target port",
"confidence": 1.0,
"severity": "critical",
"evidence": [],
"recommendation": [],
"prune": false
}
],
"top_causes": [],
"snapshot": {
"inputs": {},
"nodes": [],
"pods": [],
"services": [],
"ingresses": [],
"endpoint_slices": [],
"network_policies": [],
"events": [],
"logs": {},
"cloud": {
"elb_ids": [],
"elbs": {},
"eips": {},
"nat": {},
"security_groups": {},
"vpc_acls": {}
}
},
"report_markdown": "# CCE Network Failure Automated Diagnosis Report\n..."
}
The report_markdown must contain the following headings:
huawei-cloud-cce-auto-remediation-runnerCommon type values in findings:
TypeDescriptionNodeUnhealthyNode Ready=False or Ready=UnknownNodePressureMemory/Disk/PID/Network pressure on nodePodDNSConfigMissingPod dnsPolicy=None with no dnsConfigKubeDnsNoEndpointkube-dns EndpointSlice has 0 ready endpointsCoreDNSRestartingCoreDNS pods showing OOMKilled/LivenessProbe failuresCoreDNSNxDomainCoreDNS logs showing NXDOMAIN responsesCoreDNSUpstreamTimeoutCoreDNS logs showing upstream i/o timeoutNetworkPolicyBlockedNetworkPolicy blocks source Pod traffic (confidence 100%)ServiceNoReadyEndpointService has 0 ready endpoints in EndpointSliceServiceSelectorMismatchService selector matches no PodsReadinessFlappingBackend Pod readiness probe flappingBackendOverloadedApplication logs show OOM/connection pool exhaustedLoadBalancerProvisioningFailedLoadBalancer Ingress status empty with CCM errorsELBBackendUnhealthyELB member unhealthy while K8s backend Pod is ReadyIngressUpstreamErrorIngress controller logs show 502/504
huawei_network_failure_diagnose with a known-healthy cluster and verify the report structurepipeline_pruned flag is set correctly when node-level issues prune upper layersconfidence and severity values are present in all findingsfailure_symptom to direct the diagnosis pipeline to the relevant stage (DNS, east-west, or north-south)service_name, ingress_name, source_pod, destination_pod, domain) for more precise diagnosishuawei_network_failure_diagnose for one-shot comprehensive diagnosis; use individual actions only for targeted follow-up querieshuawei_get_elb_backend_status and huawei_list_security_groups to check cloud-side configurationhuawei-cloud-cce-node-failure-diagnoserreferences/workflow.mdreferences/risk-rules.mdreferences/output-schema.mdkubectl exec, packet capture, stress testing, or active traffic injection unless the user explicitly requests and acknowledges the riskhuawei_network_verify_pod_scheduling is for verification only; it does not replace scaling actionshuawei-cloud-cce-auto-remediation-runner for previewskill action=exec; do not run them directly in a shellcluster_id parameter is required for all CCE actions. If the user only provides a cluster name, query huawei_list_cce_clusters first to resolve the IDingress_502_504 for an in-cluster issue) may misdirect the pipeline. Always confirm the symptom type with the userhuawei_get_elb_backend_status and huawei_get_cce_pods together