-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
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
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. |
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?
If we hit this again we will have pod information dumped. Also, can you remove these lines from kuttl-test.yaml?
Dumping out the events might be helpful here. |
There was a problem hiding this 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?
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok. Will do.
… 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.
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.