Fix K8s scaling and deletion issue if firewall rule is for ALL ports#12806
Fix K8s scaling and deletion issue if firewall rule is for ALL ports#12806
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12806 +/- ##
============================================
- Coverage 16.25% 16.25% -0.01%
+ Complexity 13425 13424 -1
============================================
Files 5662 5662
Lines 500167 500169 +2
Branches 60740 60740
============================================
Hits 81318 81318
- Misses 409763 409765 +2
Partials 9086 9086
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // Remove existing SSH firewall rules | ||
| FirewallRule firewallRule = removeSshFirewallRule(publicIp); | ||
| int existingFirewallRuleSourcePortEnd; | ||
| if (firewallRule == null) { | ||
| throw new ManagementServerException("Firewall rule for node SSH access can't be provisioned"); | ||
| logger.warn("SSH firewall rule not found for Kubernetes cluster: {}. It may have been manually deleted or modified.", kubernetesCluster.getName()); | ||
| existingFirewallRuleSourcePortEnd = CLUSTER_NODES_DEFAULT_START_SSH_PORT + clusterVMIds.size() - 1; | ||
| } else { | ||
| existingFirewallRuleSourcePortEnd = firewallRule.getSourcePortEnd(); | ||
| } |
|
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17125 |
|
@blueorangutan test |
|
@kiranchavala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15648)
|
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM
Tested manually
-
Deploy a network with the default Kubernetes network offering
-
Acquired a public source nat ip for the network
-
Provide a TCP firewall rule which allows ALL ports
-
Deploy a cks cluster with worker node size 1
-
Scale the cks cluster
-
Scaling success
-
Down scaled the cks cluster
-
Performed life cycle operation like( stop/start and destroy) >> all worked fine
-
Tested the same operation with a user account >> worked fine
-
Test the same operation with HA enabled CKS cluster which has 3 control nodes >> worked fine



Description
This PR fixes: #11758
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?