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

Utilize the new errors package to encapsulate reconcile requeue/error handling #172

Merged
merged 9 commits into from
Mar 11, 2022

Conversation

narphu
Copy link
Collaborator

@narphu narphu commented Mar 10, 2022

As part of #168 we added a new error handling package. The function IsReconcileAborted verifies if the reconcile needs a re-queue, needs to be re-queued after a delay or returned an error. This function can be utilized at other points of reconcilers where similar check happens.

narphu added 7 commits March 8, 2022 17:31
Conflicts:
	api/v1beta1/verticadb_types.go
	config/manifests/bases/verticadb-operator.clusterserviceversion.yaml
	pkg/controllers/offlineupgrade_reconcile_test.go
	pkg/controllers/onlineupgrade_reconciler.go
Conflicts:
	api/v1beta1/verticadb_types.go
	pkg/controllers/offlineupgrade_reconcile.go
	pkg/controllers/offlineupgrade_reconcile_test.go
	pkg/controllers/onlineupgrade_reconcile_test.go
	pkg/controllers/onlineupgrade_reconciler.go
	pkg/controllers/verticadb_controller.go
	pkg/errors/errors.go
@narphu
Copy link
Collaborator Author

narphu commented Mar 10, 2022

I have left the err!=nil checks as they are. Not sure if we need to complicate that check with a function call. I can do that as well if there is any value to it.

@narphu
Copy link
Collaborator Author

narphu commented Mar 11, 2022

Not sure why the test failed here. It passed on my local

@spilchen
Copy link
Collaborator

Not sure why the test failed here. It passed on my local

It seemed like it had trouble rescheduling pods after it deleted them. Step 10 in crash-before-createdb will delete all 3 pods, then wait for them to get rescheduled by checking the install count in the VerticaDB. Something is happening that prevents this. This likely isn't related to your change. Do you mind adding this to 10-assert.yaml in the crash-before-createdb testcase?

apiVersion: v1
kind: Pod
metadata:
  name: v-crash-before-createdb-defsc-0
status:
  phase: Running
---
apiVersion: v1
kind: Pod
metadata:
  name: v-crash-before-createdb-defsc-1
status:
  phase: Running
---
apiVersion: v1
kind: Pod
metadata:
  name: v-crash-before-createdb-defsc-2
status:
  phase: Running

If we hit this again we will have pod information dumped.

Also, can you remove these lines from kuttl-test.yaml?

 22 suppress:
 23   - events

Dumping out the events might be helpful here.

Copy link
Collaborator

@spilchen spilchen left a comment

Choose a reason for hiding this comment

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

This looks good. I had a suggestion for a few places we missed. Also, it seems like there was some extra changes from the previous PR?

@narphu
Copy link
Collaborator Author

narphu commented Mar 11, 2022

Also, can you remove these lines from kuttl-test.yaml?

Sure. I can add this.

@@ -11,12 +11,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: vertica.com/v1beta1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry if I caused confusion here, but can we keep the old check too? So it would check each of the 3 pods, plus the VerticaDB.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh ok. Will do.

@spilchen spilchen merged commit d9e4c2d into vertica:main Mar 11, 2022
spilchen pushed a commit to spilchen/vertica-kubernetes that referenced this pull request Mar 21, 2022
… handling (vertica#172)

As part of vertica#168 we added a new error handling package. The function
IsReconcileAborted verifies if the reconcile needs a re-queue, needs to be
re-queued after a delay or returned an error. This function can be utilized at
other points of reconcilers where similar check happens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants