Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] broken ut with error message "index out of range [4] with length 4 evaluating rule..." #5115

Closed
free6om opened this issue Sep 13, 2023 · 1 comment
Assignees
Labels
bug kind/bug Something isn't working
Milestone

Comments

@free6om
Copy link
Contributor

free6om commented Sep 13, 2023

Cluster Controller when creating cluster with all workloadTypes (being Stateless|Stateful|Consensus|Replication) component [It] [comp: stateless] should create RBAC resources correctly if only supports backup
/Users/free6om/GolandProjects/kubeblocks/controllers/apps/cluster_controller_test.go:2477

Timeline >>
STEP: clean resources @ 09/13/23 17:54:18.873
STEP: clear resources Cluster @ 09/13/23 17:54:18.873
STEP: clear resources ClusterVersion @ 09/13/23 17:54:18.874
STEP: clear resources ClusterDefinition @ 09/13/23 17:54:18.874
STEP: clear resources PersistentVolumeClaim @ 09/13/23 17:54:18.875
STEP: clear resources Pod @ 09/13/23 17:54:18.876
STEP: clear resources Backup @ 09/13/23 17:54:18.877
STEP: clear resources BackupPolicy @ 09/13/23 17:54:18.878
STEP: clear resources VolumeSnapshot @ 09/13/23 17:54:18.892
STEP: clear resources BackupPolicyTemplate @ 09/13/23 17:54:18.893
STEP: clear resources BackupTool @ 09/13/23 17:54:18.894
STEP: clear resources StorageClass @ 09/13/23 17:54:18.895
STEP: Create a clusterDefinition obj @ 09/13/23 17:54:18.895
STEP: Create a clusterVersion obj @ 09/13/23 17:54:18.899
STEP: Creating a BackupPolicyTemplate @ 09/13/23 17:54:18.9
[FAILED] in [It] - /Users/free6om/GolandProjects/kubeblocks/controllers/apps/cluster_controller_test.go:1385 @ 09/13/23 17:54:18.913
STEP: clean resources @ 09/13/23 17:54:18.913
STEP: clear resources Cluster @ 09/13/23 17:54:18.913
STEP: clear resources ClusterVersion @ 09/13/23 17:54:18.914
STEP: clear resources ClusterDefinition @ 09/13/23 17:54:18.921
STEP: clear resources PersistentVolumeClaim @ 09/13/23 17:54:18.934
STEP: clear resources Pod @ 09/13/23 17:54:18.935
STEP: clear resources Backup @ 09/13/23 17:54:18.936
STEP: clear resources BackupPolicy @ 09/13/23 17:54:18.937
STEP: clear resources VolumeSnapshot @ 09/13/23 17:54:18.95
STEP: clear resources BackupPolicyTemplate @ 09/13/23 17:54:18.951
STEP: clear resources BackupTool @ 09/13/23 17:54:18.954
STEP: clear resources StorageClass @ 09/13/23 17:54:18.955
STEP: clean resources @ 09/13/23 17:54:18.956
STEP: clear resources Cluster @ 09/13/23 17:54:18.956
STEP: clear resources ClusterVersion @ 09/13/23 17:54:18.957
STEP: clear resources ClusterDefinition @ 09/13/23 17:54:18.958
STEP: clear resources PersistentVolumeClaim @ 09/13/23 17:54:18.959
STEP: clear resources Pod @ 09/13/23 17:54:18.96
STEP: clear resources Backup @ 09/13/23 17:54:18.961
STEP: clear resources BackupPolicy @ 09/13/23 17:54:18.962
STEP: clear resources VolumeSnapshot @ 09/13/23 17:54:18.975
STEP: clear resources BackupPolicyTemplate @ 09/13/23 17:54:18.976
STEP: clear resources BackupTool @ 09/13/23 17:54:18.977
STEP: clear resources StorageClass @ 09/13/23 17:54:18.978
<< Timeline

[FAILED] Expected success, but got an error:
<*errors.StatusError | 0x14001fb8dc0>:
ClusterDefinition.apps.kubeblocks.io "test-clusterdef" is invalid: spec.componentDefs[2]: Invalid value: "object": internal error: runtime error: index out of range [4] with length 4 evaluating rule: componentDefs.consensusSpec is required when componentDefs.workloadType is Consensus, and forbidden otherwise
{
ErrStatus: {
TypeMeta: {Kind: "", APIVersion: ""},
ListMeta: {
SelfLink: "",
ResourceVersion: "",
Continue: "",
RemainingItemCount: nil,
},
Status: "Failure",
Message: "ClusterDefinition.apps.kubeblocks.io "test-clusterdef" is invalid: spec.componentDefs[2]: Invalid value: "object": internal error: runtime error: index out of range [4] with length 4 evaluating rule: componentDefs.consensusSpec is required when componentDefs.workloadType is Consensus, and forbidden otherwise",
Reason: "Invalid",
Details: {
Name: "test-clusterdef",
Group: "apps.kubeblocks.io",
Kind: "ClusterDefinition",
UID: "",
Causes: [
{
Type: "FieldValueInvalid",
Message: "Invalid value: "object": internal error: runtime error: index out of range [4] with length 4 evaluating rule: componentDefs.consensusSpec is required when componentDefs.workloadType is Consensus, and forbidden otherwise",
Field: "spec.componentDefs[2]",
},
],
RetryAfterSeconds: 0,
},
Code: 422,
},
}
In [It] at: /Users/free6om/GolandProjects/kubeblocks/controllers/apps/cluster_controller_test.go:1385 @ 09/13/23 17:54:18.913

@free6om free6om added the kind/bug Something isn't working label Sep 13, 2023
@free6om free6om added this to the Release 0.7.0 milestone Sep 13, 2023
@free6om
Copy link
Contributor Author

free6om commented Sep 13, 2023

this is a k8s bug: kubernetes/kubernetes#114857
fixed in K8s 1.27.
triggered by clusterdefinition validation rule.

workaround: ignore this error and retry

@free6om free6om closed this as completed Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants