diff --git a/.gitignore b/.gitignore index 7306e3369..d2a0b5929 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ vendor/ deps/ .vscode/ **/*.enterprise.go -**/*.enterprise.go **/enterprise/** enterprise.mk local/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b7f62f10e..16614f6e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - (Feature) Allow to restart DBServers in cases when WriteConcern will be satisfied - (Feature) Allow to configure action timeouts - (Feature) (AT) Add ArangoTask API +- (Bugfix) Fix NPE in State fetcher ## [1.2.8](https://github.com/arangodb/kube-arangodb/tree/1.2.8) (2022-02-24) - Do not check License V2 on Community images diff --git a/go.mod b/go.mod index 4955b9d4d..e50443547 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,6 @@ require ( github.com/arangodb/go-driver v1.2.1 github.com/arangodb/go-driver/v2 v2.0.0-20211021031401-d92dcd5a4c83 github.com/arangodb/go-upgrade-rules v0.0.0-20180809110947-031b4774ff21 - github.com/arangodb/rebalancer v0.1.1 github.com/cenkalti/backoff v2.2.1+incompatible github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 github.com/ghodss/yaml v1.0.0 diff --git a/pkg/deployment/member/state.go b/pkg/deployment/member/state.go index c1df61c51..8b2e17962 100644 --- a/pkg/deployment/member/state.go +++ b/pkg/deployment/member/state.go @@ -125,17 +125,17 @@ func (s *stateInspector) RefreshState(ctx context.Context, members api.Deploymen } else { cs.Version = v } - } - hctx, cancel := globals.GetGlobalTimeouts().ArangoDCheck().WithTimeout(ctx) - defer cancel() - if cluster, err := c.Cluster(hctx); err != nil { - h.Error = err - } else { - if health, err := cluster.Health(hctx); err != nil { + hctx, cancel := globals.GetGlobalTimeouts().ArangoDCheck().WithTimeout(ctx) + defer cancel() + if cluster, err := c.Cluster(hctx); err != nil { h.Error = err } else { - h.Members = health.Health + if health, err := cluster.Health(hctx); err != nil { + h.Error = err + } else { + h.Members = health.Health + } } }