Handle public IP race conditions#9234
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #9234 +/- ##
============================================
+ Coverage 14.96% 15.01% +0.05%
- Complexity 11002 11090 +88
============================================
Files 5373 5393 +20
Lines 469311 471535 +2224
Branches 57432 61434 +4002
============================================
+ Hits 70230 70805 +575
- Misses 391307 392839 +1532
- Partials 7774 7891 +117
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@weizhouapache, could you take a look at this one? |
Will do @blueorangutan package |
|
@weizhouapache 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9911 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-10487)
|
|
codewise looks good. |
|
@blueorangutan package |
|
@sureshanaparti 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10092 |
weizhouapache
left a comment
There was a problem hiding this comment.
codewise lgtm
not tested
|
@blueorangutan test ol8 kvm-ol8 |
|
@rohityadavcloud [SL] unsupported parameters provided. Supported mgmt server os are: |
|
@blueorangutan test alma9 kvm-alma8 |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-10598)
|
|
Hi @hsato03 Can you check & fix the NPEs mentioned here: #8967 (comment) |
|
@blueorangutan package |
|
@hsato03 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10201 |
* Lock public IP * Release IP if ID is not null * Fix NPEs Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
Description
When executing many operations simultaneously with a public IP, some inconsistencies are being implemented in the environment, such as the duplicate public IP (Fixes: #8967).
For this reason, this PR adds a lock to most APIs that manipulate a public IP, preventing inconsistencies that may occur due to race conditions.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
All tests were done following the same steps but using different APIs that create rules for the IP (
createLoadBalancerRule,createFirewallRule,createPortForwardingRule,createIpForwardingRule):To test the
createRemoteAccessVpnAPI, I created a firewall rule in step 2 and called thecreateRemoteAccessVpnAPI in step 3.Before: The
disassociateIpAddressAPI threw an exception and still disassociated the IP from the VR. The APIs that kept the IP in the VR even after disassociation werecreateLoadBalancerRuleandcreateRemoteAccessVpn.Now: All APIs that create rules for the IP wait for the
disassociateIpAddressAPI to finish executing and only then begin execution, meaning that the exception is now thrown when creating the rule and no longer when disassociating the IP. No API held the IP in the VR.The tests were made in high and low performance environments. The low performance environments were more susceptible to race conditions due to the time it takes to process a request.