You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a new Pool to the tenant at the beggining of the spec.pools array causes a error loop in Operator, Operator never recovers from it.
Operator pod shows the error message:
E0612 04:45:59.139909 1 main-controller.go:1298] [Will try again in 5sec] Update tenant tenant-1 statefulset tenant-1-pool-1 error StatefulSet.apps "tenant-1-pool-1" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"v1.min.io/console":"tenant-1-console", "v1.min.io/pool":"pool-5", "v1.min.io/tenant":"tenant-1"}: `selector` does not match template `labels`
Expected Behavior
Adding pools to the tenant resource should be idempotent, regardless of the order of the pool items in the list, as long as the pool name (spec.pools.*.name) is unique across pools.
Possible Solution
Current implementation tries to determine the pool name from by iterating spec.pools then based on the index gets the existing pool name from spec.satus.pools, this will fail becaus the existing spec.status.pools do not have the new pool name and will return the first previously existed pool name, wrongly trying to modify the existing Statefulset instead of add a new Statefulset.
Adding a new Pool to the tenant at the beggining of the
spec.pools
array causes a error loop in Operator, Operator never recovers from it.Operator pod shows the error message:
Expected Behavior
Adding pools to the tenant resource should be idempotent, regardless of the order of the pool items in the list, as long as the pool name (
spec.pools.*.name
) is unique across pools.Possible Solution
Current implementation tries to determine the pool name from by iterating
spec.pools
then based on the index gets the existing pool name fromspec.satus.pools
, this will fail becaus the existingspec.status.pools
do not have the new pool name and will return the first previously existed pool name, wrongly trying to modify the existing Statefulset instead of add a new Statefulset.operator/pkg/controller/main-controller.go
Lines 959 to 975 in a016247
Steps to Reproduce (for bugs)
Example tenant (click to expand)
pool-1
Example tenant (click to expand)
mc admin info
do not show the added Pool, only the pool that existed beforeContext
Regression
Your Environment
minio-operator
): v5.0.15, also in master (tested up to commit a016247 Jun 11 2024)The text was updated successfully, but these errors were encountered: