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

   ### problem
   
   Scaling a CKS cluster in an isolated network, VPC tier or Netris VPC revokes 
the SSH port forwarding rules of the nodes and re-creates them by list position 
(2222 + index), and in isolated networks also revokes one firewall rule and 
re-creates the port range.
   
   | what | effect |
   |---|---|
   | every scale | every node's SSH port forwarding rule gets a new id |
   | node added with `addNodesToKubernetesCluster` | gets a second rule on a 
positional port (its own is outside the revoked range), or loses its rule when 
it falls inside the range |
   | scale up after adding a node (isolated) | the new range 2222..2222+n-1 can 
overlap the added node's firewall rule, the firewall rule create fails with a 
conflict, and the scale fails after the old range rule and the managed nodes' 
port forwarding rules are already gone |
   | second scale after a scale (isolated) | `removeSshFirewallRule` revokes 
the first matching rule; once the range rule has been re-created, that can be 
an added node's single-port rule, and the old range rule is left in place, so 
creating the new range rule conflicts |
   | scale down with nodes listed in `nodeids` (middle workers) | remaining 
nodes are renumbered to new ports |
   | scale down (isolated) | `provisionSshPortForwardingRules` assumes added 
nodes are last in the list, which isn't true on scale down |
   
   Upgrade now reads each node's port from its rule (#14824 / #14825), so 
moving rules around on scale is not needed by anything else.
   
   ### versions
   
   4.22 and main.
   
   ### steps to reproduce
   
   1. Create a CKS cluster in an isolated network (1 control, 2 workers).
   2. Add an existing VM with `addNodesToKubernetesCluster`. It gets port 2225.
   3. `scaleKubernetesCluster size=3`.
   4. The scale fails with a firewall rule conflict, or (depending on rule 
order) the nodes end up with new port forwarding rule ids and the added node 
with two rules.
   
   ### expected
   
   Scale keeps the existing nodes' SSH rules (ports and ids) and only creates 
rules for nodes that have none, on a port that is free. Scale down removes only 
the removed nodes' own rules.
   


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