Describe the bug
We observed that after the cluster converged, the BestPossibleExternalViewVerifier still failed to verify the state of certain resources. After enabling DEBUG logging, we found that the BestPossibleOutput for these resources contained 4 replicas, whereas the actual IdealState had only 3 replicas, suggesting the cluster had not fully converged.
This issue occurs because the BestPossibleExternalViewVerifier computes the BestPossibleOutput only for the specified resources, without accounting for the rest of the resources in the cluster. Since these resources are on WAGED, running the BestPossibleCalcStage in a dry run results in an output that differs from the cluster's actual IdealState.
Steps to Reproduce
To reproduce the issue:
- Create a cluster with several resources and enable WAGED rebalancing on them.
- Use
BestPossibleExternalViewVerifier.Builder to create a BestPossibleExternalViewVerifier instance.
- Provide only one resource by using
builder.setResources(resource).
- The verifier will fail to verify because the
BestPossibleCalcStage() is dry-run based on the assumption that only the specified resources exist, ignoring the rest of the cluster.
Expected Behavior
When there are WAGED resources in the cluster, the BestPossibleExternalViewVerifier should compute the full IdealState of the actual cluster and then return only the portion relevant to the user's request. In this way, it can compute the correct IdealState of the WAGED resources.
Additional context
Add any other context about the problem here.
Describe the bug
We observed that after the cluster converged, the
BestPossibleExternalViewVerifierstill failed to verify the state of certain resources. After enabling DEBUG logging, we found that theBestPossibleOutputfor these resources contained 4 replicas, whereas the actual IdealState had only 3 replicas, suggesting the cluster had not fully converged.This issue occurs because the
BestPossibleExternalViewVerifiercomputes theBestPossibleOutputonly for the specified resources, without accounting for the rest of the resources in the cluster. Since these resources are on WAGED, running theBestPossibleCalcStagein a dry run results in an output that differs from the cluster's actual IdealState.Steps to Reproduce
To reproduce the issue:
BestPossibleExternalViewVerifier.Builderto create aBestPossibleExternalViewVerifierinstance.builder.setResources(resource).BestPossibleCalcStage()is dry-run based on the assumption that only the specified resources exist, ignoring the rest of the cluster.Expected Behavior
When there are WAGED resources in the cluster, the
BestPossibleExternalViewVerifiershould compute the full IdealState of the actual cluster and then return only the portion relevant to the user's request. In this way, it can compute the correct IdealState of the WAGED resources.Additional context
Add any other context about the problem here.