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 remove-node revokes the wrong firewall rule, leaving the node's rule behind #14799
When a node is removed from a CKS cluster, KubernetesClusterRemoveWorker.removeNodePortForwardingRules finds the node's firewall rule with FirewallRulesDao.findByNetworkIdAndPorts. That lookup matches on network and ports only: no purpose, public IP, protocol or state.
it can return
result
a PF or LB rule on the same port
revokeIngressFirewallRule fails with Unable to find <id> having purpose [Firewall, Ipv6Firewall]; the node's firewall rule stays
a firewall rule on another public IP of the network
that rule is revoked instead; the node's firewall rule stays
nothing
NPE, logged; the operation still reports success
The error is caught and only logged, so the removal reports success and the rule is left behind. A later add-node that reuses the port then hits a rule conflict.
The add-node revert path had the same lookup; that is fixed in #14775.
STEPS TO REPRODUCE
1. CKS cluster on an isolated network; add an external node (addNodesToKubernetesCluster)
2. Have another rule on the node's SSH public port on the network (e.g. a PF/LB or firewall rule on a second public IP)
3. removeNodesFromKubernetesCluster for that node
EXPECTED RESULTS
The node's SSH firewall and PF rules on the cluster public IP are removed; other rules are untouched.
ACTUAL RESULTS
The wrong rule is revoked, or the revoke fails with "Unable to find <id> having purpose [Firewall, Ipv6Firewall]".
The node's firewall rule stays on the cluster public IP.
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.
On remove, KubernetesClusterRemoveWorker.removeNodePortForwardingRules finds the node's firewall rule with findByNetworkIdAndPorts, which filters on network and ports only. It can return a port-forwarding or load-balancer rule on the same port, or a firewall rule on another public IP. The revoke then fails or revokes the wrong rule. The error is only logged, so the removal reports success and the node's own rule stays behind, which later blocks an add that reuses the port.
📊 Assessment
Dimension
Value
Reasoning
Type
type:bug
Wrong rule matched on remove, with reproduction steps
Component
component:cks
KubernetesClusterRemoveWorker rule lookup
Severity
Severity:Minor
Stale rule left and the wrong rule revoked in some cases; the operation reports success
Labels
type:bug, component:cks, Severity:Minor
Based on the issue text
Coding agent
Suitable
Fix direction is specific: match the rule by purpose, public IP and port
Activity
github-actions commentedon Nov 30, 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
On remove,
KubernetesClusterRemoveWorker.removeNodePortForwardingRulesfinds the node's firewall rule withfindByNetworkIdAndPorts, which filters on network and ports only. It can return a port-forwarding or load-balancer rule on the same port, or a firewall rule on another public IP. The revoke then fails or revokes the wrong rule. The error is only logged, so the removal reports success and the node's own rule stays behind, which later blocks an add that reuses the port.📊 Assessment
KubernetesClusterRemoveWorkerrule lookup🔗 Similar issues
💡 Notes and suggestions
Add this agentic workflow to your repo
To install this agentic workflow, run