Skip to content

Error when checking provider #15

@shreddedbacon

Description

@shreddedbacon

When checking a provider, if there is an error somewhere, the error is not very nice to understand. We might be able to handle errors for this a little bit better.

if err := r.checkMariaDBProviders(provider, &mariaDBConsumer, req.NamespacedName); err != nil {
opLog.Error(err, "Error checking the providers in the cluster")
return ctrl.Result{}, err

2020-03-27T02:31:36.827Z	DEBUG	controller-runtime.controller	Successfully Reconciled	{"controller": "mariadbprovider", "request": "dbaas-operator/development"}
2020-03-27T02:31:36.952Z	ERROR	controllers.MariaDBConsumer	Error checking the providers in the cluster	{"mariadbconsumer": "test-branch-develop/mariadb", "error": "Unable to get provider usage, something went wrong: Unable to execute query SELECT COUNT(1) AS TableCount\n\tFROM information_schema.tables\n\tWHERE table_schema NOT IN ('information_schema','mysql', 'sys'); on mariadb-development-svr.mariadb.database.azure.com: Error 9999: An internal error has occurred. Please retry or report your issues.\u0000"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
github.com/amazeeio/dbaas-operator/controllers.(*MariaDBConsumerReconciler).Reconcile
	/workspace/controllers/mariadbconsumer_controller.go:130
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190913080033-27d36303b655/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190913080033-27d36303b655/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190913080033-27d36303b655/pkg/util/wait/wait.go:88```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions