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] ConfigConstraint Conversion Generates Incorrect Content After Upgrading KubeBlocks #8260

Closed
dingshun-cmss opened this issue Oct 10, 2024 · 6 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@dingshun-cmss
Copy link
Contributor

Describe the Bug

After upgrading KubeBlocks in a test environment:

  1. The ConfigConstraint objects are upgraded by the upgrade hook from v1alpha1 to v1beta1, but the converted content is incorrect.
  2. This results in the config-manager container disappearing after the DB cluster Pod is regenerated.

To Reproduce

  1. Record the ConfigConstraint before the upgrade.
  2. Create a test cluster before the upgrade.
  3. Upgrade KubeBlocks following the steps outlined in the official documentation.
  4. Record the ConfigConstraint after the upgrade. I found that all the properties in spec are missing, except for spec.immutableParameters and spec.staticParameters, which are retained.
  5. Check the containers for the DB Pods.
  6. Fix the ConfigConstraints and restart the test cluster; the config-manager container reappears.

Expected Behavior

The ConfigConstraint conversion from the upgrade hook should generate the correct content.

Additional Context

Upgrade from v0.8.4 to v0.9.1

@dingshun-cmss dingshun-cmss added the kind/bug Something isn't working label Oct 10, 2024
@shanshanying shanshanying added this to the Release 0.9.2 milestone Oct 11, 2024
@shanshanying
Copy link
Contributor

aome additional info:

  1. pre-install hook executed
  2. this engine is installed through helm (without an Addon cr)

@sophon-zt
Copy link
Contributor

Can you show the logs for the kbcli upgrade kb?

@sophon-zt
Copy link
Contributor

Verify whether webhook is enabled:

kubectl get crd configconstraints.apps.kubeblocks.io -o jsonpath='{.spec.conversion}'

@dingshun-cmss
Copy link
Contributor Author

Verify whether webhook is enabled:

kubectl get crd configconstraints.apps.kubeblocks.io -o jsonpath='{.spec.conversion}'

Here's the output for this command on my test environment:

{"strategy":"None"}

@sophon-zt
Copy link
Contributor

Verify whether webhook is enabled:

kubectl get crd configconstraints.apps.kubeblocks.io -o jsonpath='{.spec.conversion}'

Here's the output for this command on my test environment:

{"strategy":"None"}

The conversion webhook is disable. Please show the kbcli/helm upgrade logs:

kbcli logs path:
$ ls -lrt ~/.kbcli/logs  |tail -n 3
-rw-r--r--  1 zhangtao  staff   93550  7 Aug 14:52 kbcli-2024-08-07.log
-rw-r--r--  1 zhangtao  staff   10141 13 Aug 15:57 kbcli-2024-08-13.log
-rw-r--r--  1 zhangtao  staff   24684  3 Sep 18:21 kbcli-2024-09-03.log

@shanshanying
Copy link
Contributor

@dingshun-cmss we will update the upgrade doc. Since KB 0.9.1 we will enable WebHook to support multi-version APIs.

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