fdb-kubernetes-operator icon indicating copy to clipboard operation
fdb-kubernetes-operator copied to clipboard

GetMaintenanceZone() method doesn't work

Open johscheuer opened this issue 1 year ago • 1 comments

What happened?

Currently the method in https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/fdbclient/admin_client.go#L353-L361 doesn't return the correct result, as the key is incorrect. As long as the operator caches the status, this is not problematic (default behaviour). Only if a user makes use of this method directly they will notice this issue.

We have two options:

  1. Requires the management API (7.1), doing a range read:
Range limited to 10000 keys
`\xff\xff/management/maintenance/testing' is `59999743'
  1. Reading the healthyZone and decoding the value:
fdb> get \xff\x02/healthyZone
`\xff\x02/healthyZone' is `\x01\x00\x01b\xb0\x00\xdb\x0f\x07\x00\x00\x00testingy\xd3\x8a\xf3\x10<\x00\x00'

What did you expect to happen?

The method should return the current maintenance zone if active.

How can we reproduce it (as minimally and precisely as possible)?

Use the method mentioned above.

Anything else we need to know?

FDB Kubernetes operator

$ kubectl fdb version
# paste output here

Kubernetes version

$ kubectl version
# paste output here

Cloud provider

johscheuer avatar Dec 06 '23 18:12 johscheuer