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] syncer:0.4.0 unable to parse the cluster[spec.componentSpecs.instances] #8806

Closed
duanhui8 opened this issue Jan 14, 2025 · 2 comments · Fixed by apecloud/kubeblocks-addons#1423
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@duanhui8
Copy link

Describe the bug
test the instance template functionality, but Syncer 4.0 is unable to parse the cluster, resulting in the failure of the MySQL cluster startup.

To Reproduce
Steps to reproduce the behavior:

  1. kubectl edit cluster xx
    componentSpecs:
  • componentDefRef: mysql
    disableExporter: true
    enabledLogs:
    • auditlog
    • error
    • slow
      **instances:
    • env:
      • name: test_myintancetemplate
        value: my test instancetemplate
        name: test
        replicas: 1**
  1. ClusterController, ComponentController, and InstanceSetController can correctly parse the instance template and update the corresponding pod templates, but Syncer 0.4.0 unable to parse the cluster and fails to start with an error(all pod).
    3、error:
    2025-01-14T17:55:59+08:00 INFO HA Get Cluster failed. {"cluster-name": "t1", "error": "json: cannot unmarshal object into Go struct field ClusterComponentSpec.spec.componentSpecs.instances of type string"}

Expected behavior
Syncer starts normally, can parse the cluster, and successfully starts the MySQL instance.

Screenshots
syncer报错

Desktop (please complete the following information):

  • OS: centos8
  • Kubernetes: v1.31.0
  • Version kb0.9.2 syncer:0.3.9&&syncer:0.4.0
@duanhui8 duanhui8 added the kind/bug Something isn't working label Jan 14, 2025
@duanhui8 duanhui8 changed the title [BUG] [BUG] syncer:0.4.0 unable to parse the cluster[spec.componentSpecs.instances] Jan 14, 2025
@duanhui8
Copy link
Author

cluster
this is cluster.yaml

@xuriwuyun
Copy link
Contributor

If instances are used in the cluster, the generated pod name should start from the maximum index of other pods. This can be achieved by specifying the unexpected pod name in offlineInstances.

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

Successfully merging a pull request may close this issue.

3 participants