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

   ### Description
   
   This PR fixes the revert in CKS add-node so a failed add removes exactly the 
SSH rules it created for that node.
   
   Fixes: #14774
   
   | before | after |
   |---|---|
   | firewall rule found by network + port (no purpose filter), so it could be 
the PF rule; revoke threw `Unable to find <id> having purpose [Firewall, 
Ipv6Firewall]` | firewall rules matched by public IP, port, tcp, purpose 
Firewall |
   | a throw in the firewall revoke skipped the PF revoke, so both rules leaked 
| PF first, then firewall, each revoke on its own; failures are logged |
   | all PF rules of the VM were revoked | only PF rules on the cluster IP, SSH 
port, destination 22 |
   | could revoke a rule that was already there (e.g. after a port conflict) | 
rule ids are recorded before provisioning; only new ones are reverted |
   
   `KubernetesClusterAddWorker` only. The same code is on main.
   
   ### 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
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   
   - New `KubernetesClusterAddWorkerTest` (9 tests): revoke order, pre-existing 
rules kept, other PF rules kept, one failed revoke doesn't skip the other, VPC 
skips firewall, and `validateAndSetupNode` on a firewall conflict, a PF 
conflict and a PF apply failure.
   - `mvn -pl plugins/integrations/kubernetes-service test`: all tests pass.
   
   #### How did you try to break this feature and the system with this change?
   
   - Port conflict with an existing rule: the existing rule is not touched.
   - Failed revoke: logged, the other rule is still revoked, and the batch 
carries on as before.
   - Rules left behind by the old bug count as pre-existing and still need a 
one-time manual delete.
   


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