mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Fix NPE in state fetcher (#936)
This commit is contained in:
parent
6712304dd2
commit
73f8fad8f7
4 changed files with 9 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,7 +8,6 @@ vendor/
|
|||
deps/
|
||||
.vscode/
|
||||
**/*.enterprise.go
|
||||
**/*.enterprise.go
|
||||
**/enterprise/**
|
||||
enterprise.mk
|
||||
local/
|
|
@ -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
|
||||
|
|
1
go.mod
1
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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue