bhouse-nexthop opened a new issue, #14799:
URL: https://github.com/apache/cloudstack/issues/14799

   ##### ISSUE TYPE
    * Bug Report
   
   ##### COMPONENT NAME
   ~~~
   CKS (Kubernetes service), removeNodesFromKubernetesCluster
   ~~~
   
   ##### CLOUDSTACK VERSION
   ~~~
   4.22, main
   ~~~
   
   ##### SUMMARY
   
   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.
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to