Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry on delete backend failure #330

Conversation

shyamradhakrishnan
Copy link
Contributor

@shyamradhakrishnan shyamradhakrishnan commented Sep 14, 2023

What this PR does / why we need it:

  • Retry on create/delete backend failure
  • Check for LB/NLB status before reconciliation. This is to make sure that CAPOCI do not proceed with machine creation if the LB creation fails.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #331 , #332

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 14, 2023
@shyamradhakrishnan
Copy link
Contributor Author

unit test

?   	github.com/oracle/cluster-api-provider-oci	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta1	54.676s	coverage: 23.7% of statements
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta2	0.038s	coverage: 15.6% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/config	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/metrics	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/ociutil	0.011s	coverage: 19.6% of statements
ok  	github.com/oracle/cluster-api-provider-oci/cloud/scope	239.745s	coverage: 75.1% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/compute	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/identity	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/vcn	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/util	0.264s	coverage: 73.4% of statements
ok  	github.com/oracle/cluster-api-provider-oci/controllers	26.885s	coverage: 57.9% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1	13.791s	coverage: 15.2% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2	0.016s	coverage: 4.8% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/controllers	0.983s	coverage: 56.0% of statements
?   	github.com/oracle/cluster-api-provider-oci/feature	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/version	[no test files]
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

@shyamradhakrishnan shyamradhakrishnan marked this pull request as ready for review September 14, 2023 11:27
@shyamradhakrishnan
Copy link
Contributor Author

e2e

  STEP: Tearing down the management cluster @ 09/14/23 10:43:58.283
  << Timeline
------------------------------

Ran 7 of 28 Specs in 3321.112 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 21 Skipped

Copy link
Member

@joekr joekr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few small NITs, but looks awesome!

cloud/scope/load_balancer_reconciler.go Outdated Show resolved Hide resolved
cloud/scope/machine.go Show resolved Hide resolved
cloud/scope/network_load_balancer_reconciler.go Outdated Show resolved Hide resolved
@shyamradhakrishnan shyamradhakrishnan merged commit bf1c037 into oracle:main Sep 15, 2023
2 checks passed
shyamradhakrishnan added a commit to shyamradhakrishnan/cluster-api-provider-oci that referenced this pull request Sep 15, 2023
* Retry create/delete of backend on failure and ignore reconcile if lb is not active
shyamradhakrishnan added a commit that referenced this pull request Sep 15, 2023
* Retry create/delete of backend on failure and ignore reconcile if lb is not active
shyamradhakrishnan added a commit to shyamradhakrishnan/cluster-api-provider-oci that referenced this pull request Mar 22, 2024
* Retry create/delete of backend on failure and ignore reconcile if lb is not active
shyamradhakrishnan added a commit to shyamradhakrishnan/cluster-api-provider-oci that referenced this pull request Mar 29, 2024
* Retry create/delete of backend on failure and ignore reconcile if lb is not active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
2 participants