matrixone-operator
matrixone-operator copied to clipboard
[Bug]: cannot edit logset due to: LogSet.core.matrixorigin.io "mo-reg" is invalid: spec.initialConfig: Invalid value: "null": initialConfig is immutable
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93): 0.8.0-alpha.6
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
report error when update logset:
023-07-26T06:40:39Z ERROR Reconciler error {"controller": "logset", "controllerGroup": "core.matrixorigin.io", "controllerKind": "LogSet", "LogSet": {"name":"mo-reg","namespace":"mo-reg"}, "namespace": "mo-reg", "name": "mo-reg", "reconcileID": "bc24ee96-5bc6-4408-823b-f89dc7653e38", "error": "error removing finalizer: admission webhook \"vlogset.kb.io\" denied the request: LogSet.core.matrixorigin.io \"mo-reg\" is invalid: spec.initialConfig: Invalid value: \"null\": initialConfig is immutable", "errorVerbose": "admission webhook \"vlogset.kb.io\" denied the request: LogSet.core.matrixorigin.io \"mo-reg\" is invalid: spec.initialConfig: Invalid value: \"null\": initialConfig is immutable\nerror removing finalizer\ngithub.com/matrixorigin/controller-runtime/pkg/reconciler.(*Reconciler[...]).finalize\n\t/go/pkg/mod/github.com/matrixorigin/[email protected]/pkg/reconciler/reconciler.go:336\ngithub.com/matrixorigin/controller-runtime/pkg/reconciler.(*Reconciler[...]).Reconcile\n\t/go/pkg/mod/github.com/matrixorigin/[email protected]/pkg/reconciler/reconciler.go:192\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1594"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
2023-07-26T06:40:39Z DEBUG events failed to remove finalizer, error: admission webhook "vlogset.kb.io" denied the request: LogSet.core.matrixorigin.io "mo-reg" is invalid: spec.initialConfig: Invalid value: "null": initialConfig is immutable {"type": "Warning", "object": {"kind":"LogSet","namespace":"mo-reg","name":"mo-reg","uid":"aee56467-e4da-4ff6-b1ab-6158a6e49dc1","apiVersion":"core.matrixorigin.io/v1alpha1","resourceVersion":"14897305082"}, "reason": "FinalizeFail"}
the spec.initialConfig
field is empty:
initialConfig:{}
Expected Behavior
No response
Steps to Reproduce
No response
Additional information
No response
initialConfig:{}
field is always set default values in logset webhook, so it should never be zero value {}
, this may be caused by uninstall mo-operator just after creating logset, and its webhook is not executed, after reinstall mo-operator, this issue will happen.
will investigate this issue more deeply and consider whether there is a good way to solve this problem