Closed haowen159 closed 3 months ago
The problem is that you ref tidb component as componentDef: tidb
. However, our compdef names for tidb and pd are tidb-pd-7
and tidb-7
. They share the same prefix tidb
. So your ref is too vague to match the correct compdef. In this case, it actually matched tidb-pd-7
for component tidb. Thus caused the problem.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
k get cluster NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE tidb-cluster Delete 13m k get pod NAME READY STATUS RESTARTS AGE tidb-cluster-pd-0 4/4 Running 0 13m tidb-cluster-tidb-0 4/4 Running 0 13m k get cmp NAME DEFINITION SERVICE-VERSION STATUS AGE tidb-cluster-pd tidb-pd-7 7.5.2 Running 13m tidb-cluster-tidb tidb-pd-7 7.5.2 Running 13m tidb-cluster-tikv tikv-7 7.5.2 13m
k describe cmp tidb-cluster-tikv
Name: tidb-cluster-tikv Namespace: default Labels: app.kubernetes.io/instance=tidb-cluster app.kubernetes.io/managed-by=kubeblocks apps.kubeblocks.io/cluster-uid=16fb221d-6304-49cc-8f6c-a973383ee99e apps.kubeblocks.io/component-name=tikv componentdefinition.kubeblocks.io/name=tikv-7 Annotations: kubeblocks.io/generation: 2 API Version: apps.kubeblocks.io/v1alpha1 Kind: Component Metadata: Creation Timestamp: 2024-08-05T08:33:48Z Finalizers: cluster.kubeblocks.io/finalizer component.kubeblocks.io/finalizer Generation: 1 Owner References: API Version: apps.kubeblocks.io/v1alpha1 Block Owner Deletion: true Controller: true Kind: Cluster Name: tidb-cluster UID: 16fb221d-6304-49cc-8f6c-a973383ee99e Resource Version: 27889072 UID: 5d00ec3e-d803-47e0-8fed-ecc9f5c772ad Spec: Comp Def: tikv-7 Replicas: 1 Resources: Limits: Cpu: 1 Memory: 2Gi Requests: Cpu: 1 Memory: 2Gi Scheduling Policy: Affinity: Node Affinity: Preferred During Scheduling Ignored During Execution: Preference: Match Expressions: Key: kb-data Operator: In Values: true Weight: 100 Tolerations: Effect: NoSchedule Key: kb-data Operator: Equal Value: true Service Version: 7.5.2 Volume Claim Templates: Name: data Spec: Access Modes: ReadWriteOnce Resources: Requests: Storage: 20Gi Status: Conditions: Last Transition Time: 2024-08-05T08:33:48Z Message: The operator has started the provisioning of Cluster: tidb-cluster-tikv Observed Generation: 1 Reason: PreCheckSucceed Status: True Type: ProvisioningStarted Events: Type Reason Age From Message
Warning Warning 89s component-controller has no Service object found when resolving vars Warning Warning 46s (x6 over 89s) component-controller resolving vars from Service object error: more than one referent component found: pd,tidb Warning Warning 5s (x7 over 88s) component-controller resolving vars from Service object error: more than one referent component found: tidb,pd