You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CKS upgrade reaches nodes on the wrong SSH port after nodes are added or removed #14824
CKS upgrade works out each node's public SSH port from the node's position in the cluster VM list, not from the node's port forwarding rule. Once nodes were added with addNodesToKubernetesCluster, removed, or skipped as manual-upgrade, the position no longer matches the port, and the upgrade SSHes to the wrong node or to a port with no rule.
In KubernetesClusterUpgradeWorker.runInstallScriptOnVM:
index is the node's place in the VM list after manual-upgrade nodes are filtered out.
Example, 1 control + 2 workers (2222-2224) on an isolated network:
step
rules
upgrade position → port
add A (manual upgrade), add B
A 2225, B 2226
B is at index 3 → 2225: the upgrade script runs on A, B is never upgraded
add A, add B, remove A
B 2226
B is at index 3 → 2225: no rule, upgrade fails after retries
versions
4.22 and main (same code). Isolated networks and VPC tiers (incl. Netris). Shared networks SSH to the node IP on port 22 and are not affected.
The steps to reproduce the bug
Create a CKS cluster (1 control, 2 workers) on an isolated network.
addNodesToKubernetesCluster with VM A, then with VM B.
removeNodesFromKubernetesCluster with VM A.
upgradeKubernetesCluster: the step for B connects to port 2225 and fails.
What to do about it?
Take each node's SSH port from its port forwarding rule on the cluster's SSH IP (tcp, private port 22, matched by VM id). Fail with an error naming the node if it has none.
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
CKS upgrade computes each node's SSH port from its position in the VM list (sshPort + index), not from the node's port-forwarding rule. After nodes are added, removed or skipped for manual upgrade, the position no longer matches the rule, so the upgrade can run on the wrong node or on a port with no rule. The reporter gives a worked example and proposes reading each node's port from its rule on the cluster SSH IP.
📊 Assessment
Dimension
Value
Reasoning
Type
type:bug
Wrong node or missing rule is used during upgrade, with reproduction steps
Component
component:cks
KubernetesClusterUpgradeWorker.runInstallScriptOnVM; isolated and VPC networks
Severity
Severity:Major
A node can be skipped or the upgrade can fail after retries
Labels
type:bug, component:cks, Severity:Major
Based on the issue text
Coding agent
Suitable
Fix is specified: read the port from the node's rule, and error if none exists
Activity
github-actions commentedon Dec 1, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🎯 Triage report
CKS upgrade computes each node's SSH port from its position in the VM list (
sshPort + index), not from the node's port-forwarding rule. After nodes are added, removed or skipped for manual upgrade, the position no longer matches the rule, so the upgrade can run on the wrong node or on a port with no rule. The reporter gives a worked example and proposes reading each node's port from its rule on the cluster SSH IP.📊 Assessment
KubernetesClusterUpgradeWorker.runInstallScriptOnVM; isolated and VPC networks🔗 Similar issues
💡 Notes and suggestions
Add this agentic workflow to your repo
To install this agentic workflow, run