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] create clickhouse cluster failed after upgrade from 082 to 091 #8271

Closed
tianyue86 opened this issue Oct 12, 2024 · 3 comments
Closed
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@tianyue86
Copy link

tianyue86 commented Oct 12, 2024

Describe the bug

tianyue@localhost .kube % kbcli version
Kubernetes: v1.30.4+k3s1
KubeBlocks: 0.9.1 helm upgraded from 0.8.2
kbcli: 0.9.1
Upgrade process:

kbcli091 install kb082 then follow below upgrade doc to helm upgrade to kb091
https://infracreate.feishu.cn/wiki/JIitwuY0giNFc0kWTUTcKxUHn3b

helm -n kb-system upgrade kubeblocks kubeblocks/kubeblocks --version 0.9.1 --set upgradeAddons=false --set admissionWebhooks.enabled=true --set admissionWebhooks.ignoreReplicasCheck=true --set crd.enabled=false 

To Reproduce
Steps to reproduce the behavior:

  1. create clickhouse cluster by following yaml:
    https://github.com/apecloud/kubeblocks-addons/blob/release-0.9/examples/clickhouse/cluster.yaml

  2. check cluster: no status

NAMESPACE   NAME                        CLUSTER-DEFINITION   VERSION                 TERMINATION-POLICY   STATUS      AGE
default              clickhouse-cluster   clickhouse                      clickhouse-22.9.4   Delete                                                   24m
  1. check
    tianyue@localhost .kube % k get cmp
NAME                                              DEFINITION         SERVICE-VERSION     STATUS    AGE
clickhouse-cluster-ch-keeper                                                                                          18m
clickhouse-cluster-clickhouse                                                                         Running   18m
clickhouse-cluster-clickhouse-1                                                                      Running   18m
  1. describe cmp clickhouse-cluster-ch-keeper
tianyue@localhost .kube % k describe cmp clickhouse-cluster-ch-keeper
Name:         clickhouse-cluster-ch-keeper
Namespace:    default
Labels:       app.kubernetes.io/instance=clickhouse-cluster
              app.kubernetes.io/managed-by=kubeblocks
              apps.kubeblocks.io/cluster-uid=6f595d8e-4de3-4f4c-a0c6-c91abd0c10ac
              apps.kubeblocks.io/component-name=ch-keeper
              clusterdefinition.kubeblocks.io/name=clickhouse
              clusterversion.kubeblocks.io/name=clickhouse-22.9.4
Annotations:  kubeblocks.io/generation: 1
API Version:  apps.kubeblocks.io/v1alpha1
Kind:         Component
Metadata:
  Creation Timestamp:  2024-10-12T09:06:59Z
  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:                  clickhouse-cluster
    UID:                   6f595d8e-4de3-4f4c-a0c6-c91abd0c10ac
  Resource Version:        47591
  UID:                     c8d45eee-624e-4178-bce4-cc4f25080f5b
Spec:
  Comp Def:  
  Replicas:  1
  Resources:
    Limits:
      Cpu:     500m
      Memory:  1Gi
    Requests:
      Cpu:     500m
      Memory:  1Gi
  Scheduling Policy:
    Affinity:
      Node Affinity:
        Preferred During Scheduling Ignored During Execution:
          Preference:
            Match Expressions:
              Key:       kb-data
              Operator:  In
              Values:
                true
          Weight:  100
      Pod Anti Affinity:
        Preferred During Scheduling Ignored During Execution:
          Pod Affinity Term:
            Label Selector:
              Match Labels:
                app.kubernetes.io/instance:         clickhouse-cluster
                apps.kubeblocks.io/component-name:  ch-keeper
            Topology Key:                           kubernetes.io/hostname
          Weight:                                   100
    Tolerations:
      Effect:    NoSchedule
      Key:       kb-data
      Operator:  Equal
      Value:     true
      Effect:    NoSchedule
      Key:       kb-data
      Operator:  Equal
      Value:     true
    Topology Spread Constraints:
      Label Selector:
        Match Labels:
          app.kubernetes.io/instance:         clickhouse-cluster
          apps.kubeblocks.io/component-name:  ch-keeper
      Max Skew:                               1
      Topology Key:                           kubernetes.io/hostname
      When Unsatisfiable:                     ScheduleAnyway
  Service Account Name:                       kb-clickhouse-cluster
  Volume Claim Templates:
    Name:  data
    Spec:
      Access Modes:
        ReadWriteOnce
      Resources:
        Requests:
          Storage:  20Gi
Status:
  Conditions:
    Last Transition Time:  2024-10-12T09:06:59Z
    Message:               The operator has started the provisioning of Cluster: clickhouse-cluster-ch-keeper
    Observed Generation:   1
    Reason:                PreCheckSucceed
    Status:                True
    Type:                  ProvisioningStarted
Events:
  Type     Reason   Age                   From                  Message
  ----     ------   ----                  ----                  -------
  Warning  Warning  7m54s (x17 over 18m)  component-controller  failed to render configmap: [failed to render configuration template[cm:clickhouse-keeper-tpl][key:00_default_overrides.xml], error: [template: clickhouse-keeper-tpl:26:8: executing "clickhouse-keeper-tpl" at <$.component.monitor.enable>: map has no entry for key "monitor"]]

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 Oct 12, 2024
@shanshanying shanshanying assigned loomts and unassigned shanshanying Oct 14, 2024
@shanshanying
Copy link
Contributor

@loomts pls check the cluster.yaml for release 0.8 and release 0.9.

@shanshanying
Copy link
Contributor

@sophon-zt I guess Clickhouse Relase 0.8 is not working on KB 0.9, since, 'component.monitor' is not available any more.
image

@loomts
Copy link
Contributor

loomts commented Nov 15, 2024

This issue used the old example create the clickhouse cluster, already updated the examples and adapt backward compatibility for older KB versions before v0.9.0.

@loomts loomts closed this as completed Nov 15, 2024
@github-actions github-actions bot added this to the Release 0.9.2 milestone Nov 15, 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