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

   ### Description
   
   `listKubernetesClusters` built `etcdips` from etcd node port forwarding 
rules whose public port equals the **current** 
`cloud.kubernetes.etcd.node.start.port`. Etcd rules are created once at start 
port + i, so only the first etcd node's rule could match, and none match after 
the setting is changed.
   
   | | before | after |
   |---|---|---|
   | rule match | public port == current etcd start port | tcp, private port 22 
(what `setupKubernetesEtcdNetworkRules` creates), not revoked |
   | setting changed later | `etcdips` empty | unaffected |
   | IP row missing | NPE fails the whole list call | rule skipped |
   | IP lookups | one per etcd node | one per distinct IP |
   
   - lookup moved to `KubernetesClusterManagerImpl#getEtcdIps`
   - related: #14825 resolves each node's SSH rule by VM id the same way for 
upgrades; the two merge cleanly
   
   Fixes: #14826
   
   ### 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?
   
   | test | checks |
   |---|---|
   | `testGetEtcdIpsFindsRulesOutsideCurrentEtcdStartPort` | rules at 
60000/60001 with the setting at 50000 are found (fails on the old code: `{}`) |
   | `testGetEtcdIpsUsesOnlyUnrevokedTcpRulesToSshPort` | port 2379, udp, 
revoked and 22-30 range rules ignored; Add-state rule kept |
   | `testGetEtcdIpsSkipsMissingIpAddress` | missing IP row skipped, no NPE |
   
   - `KubernetesCluster*Test` in `kubernetes-service`: 59 tests pass
   - also passes merged with #14825
   
   #### How did you try to break this feature and the system with this change?
   
   - removed each filter clause in turn: a test fails for each
   


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