bhouse-nexthop opened a new pull request, #14800:
URL: https://github.com/apache/cloudstack/pull/14800

   ### Description
   
   This PR makes CKS remove-node revoke the node's own SSH firewall and PF 
rules. Before, the firewall rule was looked up by network and port only.
   
   Fixes: #14799
   
   | before | after |
   |---|---|
   | firewall rule found by `findByNetworkIdAndPorts` (network + ports, no 
purpose/IP/state), so it could be a PF/LB rule or a rule on another public IP | 
firewall rules matched by cluster public IP, port, tcp, purpose Firewall, not 
revoked |
   | every PF rule of the VM was revoked | only the node's SSH PF rule (cluster 
public IP, single tcp port, to port 22, not revoked) |
   | an error was logged and the next revoke for that rule was skipped; removal 
still reported success | each revoke runs on its own; any failure makes the 
removal report failure |
   | no firewall rule found: NPE, logged | no firewall rule: the PF rule is 
still revoked |
   
   `KubernetesClusterRemoveWorker` only. The add-node revert path had the same 
lookup, and #14775 fixes it with the same matching.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   
   - New `KubernetesClusterRemoveWorkerTest` (8 tests):
     - firewall rule on the cluster IP revoked, then the PF rule; 
`findByNetworkIdAndPorts` not used
     - PF rules on another IP, other destination ports, udp, port ranges or in 
Revoke state are left alone
     - only the SSH rule is revoked when mixed with other PF rules
     - no firewall rule found: the PF rule is still revoked
     - a firewall revoke throwing, a firewall lookup throwing, or a PF revoke 
returning false: the other rules are still tried and the result is false
     - VPC: no firewall lookup, PF rule revoked
   - `mvn -pl plugins/integrations/kubernetes-service test`: 86 tests, all pass
   
   #### How did you try to break this feature and the system with this change?
   
   - Other rules on the same port on another public IP of the network: not 
matched
   - Failures part way through: each rule is still tried and the failure is 
reported
   


-- 
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