apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.14k stars 176 forks source link

[BUG]kubeblocks crash for logs-reconfigure return invalid memory address or nil pointer dereference #4934

Closed ahjing99 closed 1 year ago

ahjing99 commented 1 year ago

➜ ~ kbcli version Kubernetes: v1.27.3-gke.100 KubeBlocks: 0.7.0-alpha.2 kbcli: 0.7.0-alpha.2

  1. Install kb
  2. Create cluster
    
    `kbcli cluster create  mysqltest1             --termination-policy=DoNotTerminate             --monitor=false --enable-all-logs=false --cluster-definition=apecloud-mysql --set cpu=100m,memory=0.5Gi,replicas=1,storage=1Gi  --namespace default `

Info: --cluster-version is not specified, ClusterVersion ac-mysql-8.0.30 is applied by default Cluster mysqltest1 created

3.  Stop cluster

kbcli cluster stop mysqltest1 --auto-approve --namespace default

OpsRequest mysqltest1-stop-prkdj created successfully, you can view the progress: kbcli cluster describe-ops mysqltest1-stop-prkdj -n default

4.  kb crash

k get ops NAME TYPE CLUSTER STATUS PROGRESS AGE logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97 Reconfiguring mysqltest1 Pending -/- 31s mysqltest1-stop-prkdj Stop mysqltest1 13s

k describe ops logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97 Name: logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97 Namespace: default Labels: app.kubernetes.io/instance=mysqltest1 ops.kubeblocks.io/ops-type=Reconfiguring Annotations: API Version: apps.kubeblocks.io/v1alpha1 Kind: OpsRequest Metadata: Creation Timestamp: 2023-08-31T06:25:12Z Finalizers: opsrequest.kubeblocks.io/finalizer Generation: 1 Managed Fields: API Version: apps.kubeblocks.io/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:spec: .: f:clusterRef: f:reconfigure: .: f:componentName: f:configurations: .: k:{"name":"mysql-consensusset-config"}: .: f:keys: .: k:{"key":"my.cnf"}: .: f:key: f:parameters: f:name: f:ttlSecondsBeforeAbort: f:type: Manager: kbcli Operation: Update Time: 2023-08-31T06:25:12Z API Version: apps.kubeblocks.io/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:finalizers: .: v:"opsrequest.kubeblocks.io/finalizer": f:labels: .: f:app.kubernetes.io/instance: f:ops.kubeblocks.io/ops-type: f:ownerReferences: .: k:{"uid":"ace03261-2d30-4f07-be33-ad85e076971a"}: Manager: manager Operation: Update Time: 2023-08-31T06:25:12Z API Version: apps.kubeblocks.io/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:status: .: f:conditions: .: k:{"type":"Progressing"}: .: f:lastTransitionTime: f:message: f:reason: f:status: f:type: f:phase: f:progress: Manager: manager Operation: Update Subresource: status Time: 2023-08-31T06:25:12Z Owner References: API Version: apps.kubeblocks.io/v1alpha1 Kind: Cluster Name: mysqltest1 UID: ace03261-2d30-4f07-be33-ad85e076971a Resource Version: 78219 UID: b7716994-9e2b-4ebe-aae2-420beb461a1b Spec: Cluster Ref: mysqltest1 Reconfigure: Component Name: mysql Configurations: Keys: Key: my.cnf Parameters: Key: general_log Value: ON Key: log_output Value: FILE Key: slow_query_log Value: ON Key: general_log_file Value: /data/mysql/log/mysqld.log Key: log_error Value: /data/mysql/log/mysqld-error.log Key: log_statements_unsafe_for_binlog Value: OFF Key: slow_query_log_file Value: /data/mysql/log/mysqld-slowquery.log Key: log_error_verbosity Value: 2 Key: long_query_time Value: 5 Name: mysql-consensusset-config Ttl Seconds Before Abort: 0 Type: Reconfiguring Status: Conditions: Last Transition Time: 2023-08-31T06:25:12Z Message: Start to process the OpsRequest: logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97 in Cluster: mysqltest1 Reason: OpsRequestProgressingStarted Status: True Type: Progressing Phase: Pending Progress: -/- Events: Type Reason Age From Message


Normal OpsRequestProgressingStarted 3m2s ops-request-controller Start to process the OpsRequest: logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97 in Cluster: mysqltest1

k describe ops mysqltest1-stop-prkdj Name: mysqltest1-stop-prkdj Namespace: default Labels: Annotations: API Version: apps.kubeblocks.io/v1alpha1 Kind: OpsRequest Metadata: Creation Timestamp: 2023-08-31T06:25:30Z Generate Name: mysqltest1-stop- Generation: 1 Managed Fields: API Version: apps.kubeblocks.io/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:generateName: f:spec: .: f:clusterRef: f:ttlSecondsAfterSucceed: f:ttlSecondsBeforeAbort: f:type: Manager: kbcli Operation: Update Time: 2023-08-31T06:25:30Z Resource Version: 78391 UID: b66306d9-fb77-47d1-830d-c97ab249ee04 Spec: Cluster Ref: mysqltest1 Ttl Seconds After Succeed: 0 Ttl Seconds Before Abort: 0 Type: Stop Events:

➜ ~ k get pod -n kb-system NAME READY STATUS RESTARTS AGE csi-attacher-s3-0 1/1 Running 0 26m csi-provisioner-s3-0 2/2 Running 0 26m csi-s3-6jn5z 2/2 Running 0 26m csi-s3-l9984 2/2 Running 0 26m csi-s3-xgxcn 2/2 Running 0 26m kb-addon-snapshot-controller-65fcc74964-snlqc 1/1 Running 0 38m kubeblocks-6667b69f6f-swqmh 0/1 CrashLoopBackOff 4 (69s ago) 38m kubeblocks-dataprotection-844dd9f4fc-nmhnq 1/1 Running 0 38m

➜ ~ k logs kubeblocks-6667b69f6f-swqmh -n kb-system Defaulted container "manager" out of: manager, tools (init), datascript (init) 2023-08-31T06:25:47.400Z INFO setup config file: /etc/kubeblocks/config.yaml 2023-08-31T06:25:47.400Z INFO setup config settings: map[alsologtostderr:false apps:true backup_pv_configmap_name: backup_pv_configmap_namespace: backup_pvc_create_policy: backup_pvc_init_capacity: backup_pvc_name: backup_pvc_storage_class: cert_dir:/tmp/k8s-webhook-server/serving-certs cm_namespace:kb-system cm_recon_retry_duration_ms:1000 config_manager_grpc_port:9901 config_manager_log_level:info data_plane_affinity:{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"kb-data","operator":"In","values":["true"]}]},"weight":100}]}} data_plane_tolerations:[{"effect":"NoSchedule","key":"kb-data","operator":"Equal","value":"true"}] dataprotection:false default_storage_class:kb-default-sc enable_debug_sysaccounts:false enablerbacmanager:true extensions:true health_probe_bind_address::8081 kubeblocks_addon_helm_install_options:--atomic --cleanup-on-fail --wait --insecure-skip-tls-verify kubeblocks_addon_helm_uninstall_options:[] kubeblocks_addon_sa_name:kubeblocks-addon-installer kubeblocks_charts_image:apecloud/kubeblocks-charts:latest kubeblocks_datascript_clients_image:registry.cn-hangzhou.aliyuncs.com/apecloud/kubeblocks-datascript:0.7.0-alpha.2 kubeblocks_serviceaccount_name:kubeblocks kubeblocks_tools_image:registry.cn-hangzhou.aliyuncs.com/apecloud/kubeblocks-tools:0.7.0-alpha.2 kubeconfig: kubernetes_cluster_domain:cluster.local leader_elect:true leader_elect_id:001c317f log_backtrace_at::0 log_dir: logtostderr:false maxconcurrentreconciles_addon:4 maxconcurrentreconciles_clusterdef:2 maxconcurrentreconciles_clusterversion:2 maxconcurrentreconciles_dataprotection:4 metrics_bind_address::8080 pod_min_ready_seconds:10 probe_service_grpc_port:50001 probe_service_http_port:3501 probe_service_log_level:info replicated_state_machine:true stderrthreshold:2 storage:true v:0 vmodule: volumesnapshot:true volumesnapshot_api_beta:true workloads:true zap_devel:false zap_encoder:console zap_log_level: zap_stacktrace_level: zap_time_encoding:iso8601] 2023-08-31T06:25:47.418Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"} 2023-08-31T06:25:47.421Z INFO setup starting manager 2023-08-31T06:25:47.423Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"} 2023-08-31T06:25:47.423Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"} I0831 06:25:47.423545 1 leaderelection.go:248] attempting to acquire leader lease kb-system/001c317f.kubeblocks.io... I0831 06:26:04.500175 1 leaderelection.go:258] successfully acquired lease kb-system/001c317f.kubeblocks.io 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1alpha1.Cluster"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.StatefulSet"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Deployment"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1alpha1.ReplicatedStateMachine"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Service"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Secret"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.ConfigMap"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.PersistentVolumeClaim"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.PodDisruptionBudget"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1alpha1.BackupPolicy"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1alpha1.Backup"} 2023-08-31T06:26:04.501Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Job"} 2023-08-31T06:26:04.502Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.ClusterRoleBinding"} 2023-08-31T06:26:04.502Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.RoleBinding"} 2023-08-31T06:26:04.502Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.ServiceAccount"} 2023-08-31T06:26:04.502Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Pod"} 2023-08-31T06:26:04.502Z INFO Starting Controller {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster"} 2023-08-31T06:26:04.502Z INFO Starting EventSource {"controller": "clusterversion", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterVersion", "source": "kind source: v1alpha1.ClusterVersion"} 2023-08-31T06:26:04.502Z INFO Starting Controller {"controller": "clusterversion", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterVersion"} 2023-08-31T06:26:04.503Z INFO Starting EventSource {"controller": "clusterdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterDefinition", "source": "kind source: v1alpha1.ClusterDefinition"} 2023-08-31T06:26:04.503Z INFO Starting Controller {"controller": "clusterdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterDefinition"} 2023-08-31T06:26:04.503Z INFO Starting EventSource {"controller": "configconstraint", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ConfigConstraint", "source": "kind source: v1alpha1.ConfigConstraint"} 2023-08-31T06:26:04.504Z INFO Starting EventSource {"controller": "configconstraint", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ConfigConstraint", "source": "kind source: v1.ConfigMap"} 2023-08-31T06:26:04.504Z INFO Starting Controller {"controller": "configconstraint", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ConfigConstraint"} 2023-08-31T06:26:04.504Z INFO Starting EventSource {"controller": "opsrequest", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "OpsRequest", "source": "kind source: v1alpha1.OpsRequest"} 2023-08-31T06:26:04.505Z INFO Starting Controller {"controller": "opsrequest", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "OpsRequest"} 2023-08-31T06:26:04.505Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1alpha1.Cluster"} 2023-08-31T06:26:04.505Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Secret"} 2023-08-31T06:26:04.505Z INFO Starting EventSource {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "source": "kind source: v1.Job"} 2023-08-31T06:26:04.505Z INFO Starting Controller {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster"} 2023-08-31T06:26:04.505Z INFO Starting EventSource {"controller": "configmap", "controllerGroup": "", "controllerKind": "ConfigMap", "source": "kind source: v1.ConfigMap"} 2023-08-31T06:26:04.506Z INFO Starting Controller {"controller": "configmap", "controllerGroup": "", "controllerKind": "ConfigMap"} 2023-08-31T06:26:04.506Z INFO Starting EventSource {"controller": "persistentvolumeclaim", "controllerGroup": "", "controllerKind": "PersistentVolumeClaim", "source": "kind source: v1.PersistentVolumeClaim"} 2023-08-31T06:26:04.506Z INFO Starting Controller {"controller": "persistentvolumeclaim", "controllerGroup": "", "controllerKind": "PersistentVolumeClaim"} 2023-08-31T06:26:04.508Z INFO Starting EventSource {"controller": "event", "controllerGroup": "", "controllerKind": "Event", "source": "kind source: v1.Event"} 2023-08-31T06:26:04.508Z INFO Starting Controller {"controller": "event", "controllerGroup": "", "controllerKind": "Event"} 2023-08-31T06:26:04.509Z INFO Starting EventSource {"controller": "addon", "controllerGroup": "extensions.kubeblocks.io", "controllerKind": "Addon", "source": "kind source: v1alpha1.Addon"} 2023-08-31T06:26:04.509Z INFO Starting EventSource {"controller": "addon", "controllerGroup": "extensions.kubeblocks.io", "controllerKind": "Addon", "source": "kind source: v1.Job"} 2023-08-31T06:26:04.509Z INFO Starting Controller {"controller": "addon", "controllerGroup": "extensions.kubeblocks.io", "controllerKind": "Addon"} 2023-08-31T06:26:04.510Z INFO Starting EventSource {"controller": "componentclassdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ComponentClassDefinition", "source": "kind source: v1alpha1.ComponentClassDefinition"} 2023-08-31T06:26:04.510Z INFO Starting Controller {"controller": "componentclassdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ComponentClassDefinition"} 2023-08-31T06:26:04.510Z INFO Starting EventSource {"controller": "storageprovider", "controllerGroup": "storage.kubeblocks.io", "controllerKind": "StorageProvider", "source": "kind source: v1alpha1.StorageProvider"} 2023-08-31T06:26:04.510Z INFO Starting EventSource {"controller": "storageprovider", "controllerGroup": "storage.kubeblocks.io", "controllerKind": "StorageProvider", "source": "kind source: v1.CSIDriver"} 2023-08-31T06:26:04.510Z INFO Starting Controller {"controller": "storageprovider", "controllerGroup": "storage.kubeblocks.io", "controllerKind": "StorageProvider"} 2023-08-31T06:26:04.511Z INFO Starting EventSource {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine", "source": "kind source: v1alpha1.ReplicatedStateMachine"} 2023-08-31T06:26:04.511Z INFO Starting EventSource {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine", "source": "kind source: v1.StatefulSet"} 2023-08-31T06:26:04.511Z INFO Starting EventSource {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine", "source": "kind source: v1.Job"} 2023-08-31T06:26:04.511Z INFO Starting EventSource {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine", "source": "kind source: v1.Pod"} 2023-08-31T06:26:04.511Z INFO Starting Controller {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine"} 2023-08-31T06:26:05.207Z INFO Starting workers {"controller": "configmap", "controllerGroup": "", "controllerKind": "ConfigMap", "worker count": 1} 2023-08-31T06:26:05.207Z INFO Starting workers {"controller": "configconstraint", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ConfigConstraint", "worker count": 1} 2023-08-31T06:26:05.208Z INFO Starting workers {"controller": "persistentvolumeclaim", "controllerGroup": "", "controllerKind": "PersistentVolumeClaim", "worker count": 1} 2023-08-31T06:26:05.214Z INFO Starting workers {"controller": "componentclassdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ComponentClassDefinition", "worker count": 1} 2023-08-31T06:26:05.215Z INFO Starting workers {"controller": "clusterversion", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterVersion", "worker count": 2} 2023-08-31T06:26:05.216Z INFO Starting workers {"controller": "storageprovider", "controllerGroup": "storage.kubeblocks.io", "controllerKind": "StorageProvider", "worker count": 1} 2023-08-31T06:26:05.217Z INFO Starting workers {"controller": "clusterdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ClusterDefinition", "worker count": 2} 2023-08-31T06:26:05.220Z INFO Starting workers {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "worker count": 1} 2023-08-31T06:26:05.220Z INFO Starting workers {"controller": "opsrequest", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "OpsRequest", "worker count": 1} 2023-08-31T06:26:05.223Z INFO Starting workers {"controller": "replicatedstatemachine", "controllerGroup": "workloads.kubeblocks.io", "controllerKind": "ReplicatedStateMachine", "worker count": 1} 2023-08-31T06:26:05.225Z INFO Starting workers {"controller": "cluster", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Cluster", "worker count": 1} 2023-08-31T06:26:05.226Z INFO Starting workers {"controller": "addon", "controllerGroup": "extensions.kubeblocks.io", "controllerKind": "Addon", "worker count": 4} 2023-08-31T06:26:05.260Z INFO Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference {"controller": "opsrequest", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "OpsRequest", "OpsRequest": {"name":"logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97","namespace":"default"}, "namespace": "default", "name": "logs-reconfigure-7f3121ef-ced8-4dfd-8d30-d30989dace97", "reconcileID": "f8a80950-04b7-4a12-a946-4cdee07d1827"} panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x173b2c5]

goroutine 677 [running]: sigs.k8s.io/controller-runtime/pkg/internal/controller.(Controller).Reconcile.func1() /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:119 +0x1fa panic({0x1fec180, 0x378edc0}) /usr/local/go/src/runtime/panic.go:884 +0x213 github.com/apecloud/kubeblocks/apis/apps/v1alpha1.(OpsRequest).getConfigMap(0xc0022bc840, {0xc0023b5bc0, 0x2a}) /src/apis/apps/v1alpha1/opsrequest_webhook.go:167 +0x45 github.com/apecloud/kubeblocks/apis/apps/v1alpha1.(OpsRequest).validateReconfigure(0xc0022bc840, 0x4?) /src/apis/apps/v1alpha1/opsrequest_webhook.go:290 +0x350 github.com/apecloud/kubeblocks/apis/apps/v1alpha1.(OpsRequest).validateOps(0xc0022bc840?, {0x2655c58?, 0xc0022c5290?}, {0x26632d0?, 0xc000848180?}, 0xc0022cf728?) /src/apis/apps/v1alpha1/opsrequest_webhook.go:217 +0x14e github.com/apecloud/kubeblocks/apis/apps/v1alpha1.(OpsRequest).Validate(0x1fbd260?, {0x2655c58?, 0xc0022c5290?}, {0x26632d0?, 0xc000848180?}, 0xc00007ec00?, 0x50?) /src/apis/apps/v1alpha1/opsrequest_webhook.go:183 +0x7f github.com/apecloud/kubeblocks/controllers/apps/operations.(OpsManager).Do(0xc0014bd230?, {{0x2655c58, 0xc0022c5290}, {{{0xc0014bd230, 0x7}, {0xc001549f00, 0x35}}}, {{0x265afa8, 0xc0022c52f0}, 0x0}, ...}, ...) /src/controllers/apps/operations/ops_manager.go:60 +0x1a9 github.com/apecloud/kubeblocks/controllers/apps.(OpsRequestReconciler).doOpsRequestAction(0xc000843bc0, {{0x2655c58, 0xc0022c5290}, {{{0xc0014bd230, 0x7}, {0xc001549f00, 0x35}}}, {{0x265afa8, 0xc0022c52f0}, 0x0}, ...}, ...) /src/controllers/apps/opsrequest_controller.go:240 +0xe5 github.com/apecloud/kubeblocks/controllers/apps.(OpsRequestReconciler).handleOpsRequestByPhase(0xc000843bc0?, {{0x2655c58, 0xc0022c5290}, {{{0xc0014bd230, 0x7}, {0xc001549f00, 0x35}}}, {{0x265afa8, 0xc0022c52f0}, 0x0}, ...}, ...) /src/controllers/apps/opsrequest_controller.go:141 +0x29d github.com/apecloud/kubeblocks/controllers/apps.(opsControllerHandler).Handle(0x78af44e095b8?, {{0x2655c58, 0xc0022c5290}, {{{0xc0014bd230, 0x7}, {0xc001549f00, 0x35}}}, {{0x265afa8, 0xc0022c52f0}, 0x0}, ...}, ...) /src/controllers/apps/opsrequest_controller.go:290 +0x99 github.com/apecloud/kubeblocks/controllers/apps.(OpsRequestReconciler).Reconcile(0xc000843bc0, {0x2655c58, 0xc0022c5290}, {{{0xc0014bd230, 0x7}, {0xc001549f00, 0x35}}}) /src/controllers/apps/opsrequest_controller.go:68 +0x3f3 sigs.k8s.io/controller-runtime/pkg/internal/controller.(Controller).Reconcile(0x2655c58?, {0x2655c58?, 0xc0022c5290?}, {{{0xc0014bd230?, 0x1ee4a80?}, {0xc001549f00?, 0x26411f0?}}}) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:122 +0xc8 sigs.k8s.io/controller-runtime/pkg/internal/controller.(Controller).reconcileHandler(0xc0002ed220, {0x2655bb0, 0xc000538780}, {0x208c220?, 0xc0002b5fc0?}) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:323 +0x377 sigs.k8s.io/controller-runtime/pkg/internal/controller.(Controller).processNextWorkItem(0xc0002ed220, {0x2655bb0, 0xc000538780}) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:274 +0x1d9 sigs.k8s.io/controller-runtime/pkg/internal/controller.(Controller).Start.func2.2() /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:235 +0x85 created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:231 +0x587 ➜ ~

sophon-zt commented 1 year ago

The operator(opsrequest controller) calls the code of the webhook for verification. If the webhook is not enabled, it will cause a null pointer problem.

solved pr: #4876

ahjing99 commented 1 year ago

Closed as fixed by above pr