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]1.0 create clickhouse cluster failed without status #8403

Closed
tianyue86 opened this issue Nov 5, 2024 · 4 comments
Closed

[BUG]1.0 create clickhouse cluster failed without status #8403

tianyue86 opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@tianyue86
Copy link

Describe the bug

Kubernetes: v1.30.4+k3s1
KubeBlocks: 1.0.0-beta.0
kbcli: 1.0.0-alpha.0
clickhouse                     1.0.0-alpha.0   community   Enabled    true
clickhouse-24-1.0.0-alpha.0               clickhouse             24.8.3            Available     5h8m
eks and local have the same problem

To Reproduce
Steps to reproduce the behavior:

  1. Get the latest yaml
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: chclu02
  namespace: default
  labels:
    helm.sh/chart: clickhouse-cluster-1.0.0-alpha.0
    app.kubernetes.io/version: "24.8.3"
    app.kubernetes.io/instance: chclu02
spec:
  terminationPolicy: DoNotTerminate
  clusterDef: clickhouse
  topology: cluster
  componentSpecs:
    - name: ch-keeper
      componentDef: ch-keeper-24
      replicas: 1
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "1"
          memory: "2Gi"
      systemAccounts:
        - name: admin
          passwordConfig:
            length: 10
            numDigits: 5
            numSymbols: 0
            letterCase: MixedCases
            seed: chclu02
      volumeClaimTemplates:
        - name: data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi 
      tls: false
    - name: clickhouse
      componentDef: clickhouse-24
      replicas: 2
      disableExporter: false
      serviceAccountName: kb-chclu02
      systemAccounts:
        - name: admin
          passwordConfig:
            length: 10
            numDigits: 5
            numSymbols: 0
            letterCase: MixedCases
            seed: chclu02 
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "1"
          memory: "2Gi" 
      volumeClaimTemplates:
        - name: data # ref clusterDefinition components.containers.volumeMounts.name
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi 
      tls: false
  1. Create cluster by applying the above yaml
  2. Check the cluster status
NAME                     DEFINITION                      SERVICE-VERSION   STATUS     AGE
pgcluster02-postgresql   postgresql-16-1.0.0-alpha.0     16.4.0                       125m
  1. Describe the cluster
tianyue@apeclouds-MacBook-Pro kbcli % k describe cluster chclu02
Name:         chclu02
Namespace:    default
Labels:       app.kubernetes.io/instance=chclu02
              app.kubernetes.io/version=24.8.3
              clusterdefinition.kubeblocks.io/name=clickhouse
              helm.sh/chart=clickhouse-cluster-1.0.0-alpha.0
Annotations:  <none>
API Version:  apps.kubeblocks.io/v1
Kind:         Cluster
Metadata:
  Creation Timestamp:  2024-11-05T08:51:05Z
  Finalizers:
    cluster.kubeblocks.io/finalizer
  Generation:        1
  Resource Version:  42683
  UID:               f2815510-786a-4fa4-9c5a-0a8989d587ba
Spec:
  Cluster Def:  clickhouse
  Component Specs:
    Component Def:  ch-keeper-24
    Name:           ch-keeper
    Replicas:       1
    Resources:
      Limits:
        Cpu:     1
        Memory:  2Gi
      Requests:
        Cpu:     1
        Memory:  2Gi
    System Accounts:
      Name:  admin
      Password Config:
        Length:       10
        Letter Case:  MixedCases
        Num Digits:   5
        Num Symbols:  0
        Seed:         chclu02
    Tls:              false
    Volume Claim Templates:
      Name:  data
      Spec:
        Access Modes:
          ReadWriteOnce
        Resources:
          Requests:
            Storage:   10Gi
    Component Def:     clickhouse-24
    Disable Exporter:  false
    Name:              clickhouse
    Replicas:          2
    Resources:
      Limits:
        Cpu:     1
        Memory:  2Gi
      Requests:
        Cpu:               1
        Memory:            2Gi
    Service Account Name:  kb-chclu02
    System Accounts:
      Name:  admin
      Password Config:
        Length:       10
        Letter Case:  MixedCases
        Num Digits:   5
        Num Symbols:  0
        Seed:         chclu02
    Tls:              false
    Volume Claim Templates:
      Name:  data
      Spec:
        Access Modes:
          ReadWriteOnce
        Resources:
          Requests:
            Storage:   10Gi
  Termination Policy:  DoNotTerminate
  Topology:            cluster
Status:
  Conditions:
    Last Transition Time:  2024-11-05T08:51:05Z
    Message:               the referenced ClusterDefinition is unavailable: clickhouse
    Reason:                PreCheckFailed
    Status:                False
    Type:                  ProvisioningStarted
Events:                    <none>
  1. no pod when executing k get pod cmd

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tianyue86 tianyue86 added the kind/bug Something isn't working label Nov 5, 2024
@shanshanying
Copy link
Contributor

Hi @tianyue86

It reports the referenced ClusterDefinition is unavailable: clickhouse. Pls check the status of the ClusterDefinition.
Have you ever upgrade the Clickhouse Addon using helm upgrade ?

@tianyue86
Copy link
Author

error: there is no matched definitions found for the component ch-keeper
tianyue@apeclouds-MacBook-Pro kbcli % k describe clusterdefinition clickhouse
Name: clickhouse
Namespace:
Labels: app.kubernetes.io/instance=kb-addon-clickhouse
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=clickhouse
app.kubernetes.io/version=24.8.3
helm.sh/chart=clickhouse-1.0.0-alpha.0
Annotations: meta.helm.sh/release-name: kb-addon-clickhouse
meta.helm.sh/release-namespace: kb-system
API Version: apps.kubeblocks.io/v1
Kind: ClusterDefinition
Metadata:
Creation Timestamp: 2024-11-01T11:10:48Z
Finalizers:
clusterdefinition.kubeblocks.io/finalizer
Generation: 1
Resource Version: 37057352
UID: e9456482-ad4c-4736-b9ff-66b306cd4877
Spec:
Topologies:
Components:
Comp Def: ^clickhouse-24.*
Name: clickhouse
Name: standalone
Components:
Comp Def: ^clickhouse-24.*
Name: clickhouse
Comp Def: ^clickhouse-keeper-24.*
Name: ch-keeper
Name: cluster
Orders:
Provision:
ch-keeper
clickhouse
Status:
Message: there is no matched definitions found for the component ch-keeper
Observed Generation: 1
Phase: Unavailable
Topologies: cluster,standalone
Events:

@loomts
Copy link
Contributor

loomts commented Nov 7, 2024

Thinks for providing this log, I will try to fix it :D

@tianyue86
Copy link
Author

Verified and fixed. Thanks!

@github-actions github-actions bot added this to the Release 0.9.2 milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants