kubectl logs -n fluid-system cacheruntime-controller-868f9494b4-46xp8 --previous
2026/08/03 17:18:24 nodeExcludeSelector is empty, no node would be excluded when syncing schedule info of runtimes
2026/08/03 17:18:24 BuildDate: 2026-07-12_09:41:07
2026/08/03 17:18:24 GitCommit: 676f47a841133ba9ffcaafe9c76b44b2cb6b11a9
2026/08/03 17:18:24 GitTreeState: dirty
2026/08/03 17:18:24 GoVersion: go1.25.12
2026/08/03 17:18:24 Compiler: gc
2026/08/03 17:18:24 Platform: linux/amd64
2026-08-03T17:18:24.423+0800 INFO setup utils/pprof.go:33 Enabling pprof {"pprof address": ":6060"}
2026-08-03T17:18:24.423+0800 INFO setup utils/pprof.go:48 Starting pprof HTTP server {"pprof server address": ":6060"}
2026-08-03T17:18:24.438+0800 INFO setup app/cache.go:143 AdvancedStatefulSet controller added successfully
2026-08-03T17:18:24.438+0800 INFO dump dump/dump.go:61 Register goroutine dump generator
2026-08-03T17:18:24.438+0800 INFO setup app/cache.go:171 starting cacheruntime-controller
2026-08-03T17:18:24.439+0800 INFO controller-runtime.metrics server/server.go:205 Starting metrics server
2026-08-03T17:18:24.439+0800 INFO controller-runtime.metrics server/server.go:244 Serving metrics server {"bindAddress": ":8080", "secure": false}
I0803 17:18:24.539967 1 leaderelection.go:250] attempting to acquire leader lease fluid-system/cache.data.fluid.io...
I0803 17:18:42.443670 1 leaderelection.go:260] successfully acquired lease fluid-system/cache.data.fluid.io
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "advancedstatefulset-controller", "source": "kind source: *v1alpha1.AdvancedStatefulSet"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "advancedstatefulset-controller", "source": "kind source: *v1.PersistentVolumeClaim"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "advancedstatefulset-controller", "source": "kind source: *v1.Pod"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:186 Starting Controller {"controller": "advancedstatefulset-controller"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "CacheRuntimeController", "source": "kind source: *v1alpha1.CacheRuntime"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "CacheRuntimeController", "source": "kind source: *v1alpha1.AdvancedStatefulSet"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:178 Starting EventSource {"controller": "CacheRuntimeController", "source": "kind source: *v1.DaemonSet"}
2026-08-03T17:18:42.444+0800 INFO controller/controller.go:186 Starting Controller {"controller": "CacheRuntimeController"}
2026-08-03T17:18:42.546+0800 INFO controller/controller.go:220 Starting workers {"controller": "advancedstatefulset-controller", "worker count": 3}
I0803 17:18:42.546842 1 statefulset_controller.go:243] "AdvancedStatefulSet deleted" statefulSet="default/mooncake-demo-master"
I0803 17:18:42.546862 1 statefulset_controller.go:243] "AdvancedStatefulSet deleted" statefulSet="default/mooncake-demo-worker"
I0803 17:18:42.546903 1 statefulset_controller.go:233] "Finished syncing AdvancedStatefulSet" statefulSet="default/mooncake-demo-worker" elapsedTime="85.875µs"
I0803 17:18:42.546869 1 statefulset_controller.go:233] "Finished syncing AdvancedStatefulSet" statefulSet="default/mooncake-demo-master" elapsedTime="53.418µs"
2026-08-03T17:18:42.547+0800 INFO controller/controller.go:220 Starting workers {"controller": "CacheRuntimeController", "worker count": 3}
2026-08-03T17:18:42.547+0800 INFO cachectl.CacheRuntime engine/engine.go:100 Set the syncRetryDuration {"cacheRuntime": {"name":"mooncake-demo","namespace":"default"}, "cache engine": "cache", "id": "default-mooncake-demo", "syncRetryDuration": 15}
2026-08-03T17:18:42.749+0800 INFO cachectl.CacheRuntime engine/util.go:56 mountRoot {"cacheRuntime": {"name":"mooncake-demo","namespace":"default"}, "cache engine": "cache", "id": "default-mooncake-demo", "path": "/runtime-mnt/cache"}
2026-08-03T17:18:42.749+0800 INFO cachectl.CacheRuntime engine/util.go:56 mountRoot {"cacheRuntime": {"name":"mooncake-demo","namespace":"default"}, "cache engine": "cache", "id": "default-mooncake-demo", "path": "/runtime-mnt/cache"}
2026-08-03T17:18:42.850+0800 INFO cachectl.CacheRuntime engine/util.go:56 mountRoot {"cacheRuntime": {"name":"mooncake-demo","namespace":"default"}, "cache engine": "cache", "id": "default-mooncake-demo", "path": "/runtime-mnt/cache"}
2026-08-03T17:18:42.850+0800 INFO controller/controller.go:115 Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference {"controller": "CacheRuntimeController", "object": {"name":"mooncake-demo","namespace":"default"}, "namespace": "default", "name": "mooncake-demo", "reconcileID": "e3fc461b-2938-4b8a-ba9d-cc640297d2fd"}
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x22bc421]
goroutine 211 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:116 +0x2cd
panic({0x285a600?, 0x3be7750?})
/usr/local/go/src/runtime/panic.go:783 +0x136
github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine.(*CacheEngine).generateRuntimeConfigData(0xc0009f0900, {0x2d6a220, 0xc0009f0cc0}, 0xc000adcc08)
/go/src/github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine/cm.go:178 +0xf81
github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine.(*CacheEngine).createRuntimeValueConfigMap(0xc0009f0900, {0x2d6a220, 0xc0009f0cc0}, 0xc000adcc08, {0xc000493ea0, 0x1, 0x1})
/go/src/github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine/cm.go:93 +0x20b
github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine.(*CacheEngine).createRuntimeConfigMaps(0xc0009f0900, {0x2d6a220, 0xc0009f0cc0}, 0xc0004ebce0)
/go/src/github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine/cm.go:57 +0x34f
github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine.(*CacheEngine).Setup(0xc0009f0900, {{0x2d6a5d8, 0xc0001776c0}, {{0xc0009c0226, 0x7}, {0xc0009c0230, 0xd}}, {0x2b418b2, 0xa}, 0xc000942008, ...})
/go/src/github.com/fluid-cloudnative/fluid/pkg/ddc/cache/engine/setup.go:50 +0x405
github.com/fluid-cloudnative/fluid/pkg/controllers.(*RuntimeReconciler).ReconcileRuntime(0xc000360370, {0x2d6fe88, 0xc0009f0900}, {{0x2d6a5d8, 0xc0001776c0}, {{0xc0009c0226, 0x7}, {0xc0009c0230, 0xd}}, {0x2b418b2, ...}, ...})
/go/src/github.com/fluid-cloudnative/fluid/pkg/controllers/runtime_controller.go:272 +0x57c
github.com/fluid-cloudnative/fluid/pkg/controllers.(*RuntimeReconciler).ReconcileInternal(0xc000360370, {{0x2d6a5d8, 0xc0001776c0}, {{0xc0009c0226, 0x7}, {0xc0009c0230, 0xd}}, {0x2b418b2, 0xa}, 0xc000942008, ...})
/go/src/github.com/fluid-cloudnative/fluid/pkg/controllers/runtime_controller.go:181 +0x13bf
github.com/fluid-cloudnative/fluid/pkg/controllers/v1alpha1/cacheruntime.(*CacheRuntimeReconciler).Reconcile(0xc00032ede0, {0x2d6a530, 0xc000a88b40}, {{{0xc0009c0226, 0x7}, {0xc0009c0230, 0xd}}})
/go/src/github.com/fluid-cloudnative/fluid/pkg/controllers/v1alpha1/cacheruntime/cacheruntime_controller.go:120 +0xb58
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0xc0002d0c80, {0x2d6a530, 0xc000a88b40}, {{{0xc0009c0226, 0x7}, {0xc0009c0230, 0xd}}})
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119 +0x15b
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0002d0c80, {0x2d6a530, 0xc000a88b40}, {0x294e800, 0xc0004b41c0})
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316 +0x44d
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0002d0c80, {0x2d6a568, 0xc000286230})
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266 +0x359
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227 +0xac
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 120
/go/src/github.com/fluid-cloudnative/fluid/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:223 +0x927
1.Create a CacheRuntimeClass that defines only master and worker components in topology — the client component is intentionally omitted. Then create a Dataset and CacheRuntime.
Note: whether the CacheRuntime spec contains a client field does not affect this bug — the panic occurs either way. The trigger is the missing client component in the CacheRuntimeClass topology:
dataset-runtime.yaml:
NAME READY STATUS RESTARTS AGE
cacheruntime-controller-868f9494b4-46xp8 1/1 Running 1 (2s ago) 6m10s
cacheruntime-controller-868f9494b4-46xp8 0/1 Error 1 (20s ago) 6m28s
cacheruntime-controller-868f9494b4-46xp8 0/1 CrashLoopBackOff 1 (12s ago) 6m39s
cacheruntime-controller-868f9494b4-46xp8 1/1 Running 2 (12s ago) 6m39s
The panic stack trace shown at the top of this issue can be found there.
Additional Information
Note: the container image and entrypoint script are irrelevant to this bug — the controller panics during ConfigMap generation, before any pod is scheduled. Any placeholder image works for reproduction.
Defining a client component in the CacheRuntimeClass topology avoids the panic:
What is your environment(Kubernetes version, Fluid version, etc.)
k8s version: 1.36.1-aliyun.1
fluid version: 1.1.0-alpha.11
Describe the bug
When the client component is not defined in the topology of a CacheRuntimeClass, generateRuntimeConfigData panics with a nil pointer dereference, causing the cacheruntime-controller pod to crash and restart.
The error message is as follows:
What you expect to happen:
I expect that when the client component is not defined in a CacheRuntimeClass, the controller should either treat the client component as disabled and continue reconciling normally, or reject the resource with a clear validation error — instead of crashing with a panic.
**How to reproduce **
1.Create a CacheRuntimeClass that defines only master and worker components in topology — the client component is intentionally omitted. Then create a Dataset and CacheRuntime.
Note: whether the CacheRuntime spec contains a client field does not affect this bug — the panic occurs either way. The trigger is the missing client component in the CacheRuntimeClass topology:
dataset-runtime.yaml:
cacheruntimeclass.yaml:
The controller pod crashes and restarts:
The panic stack trace shown at the top of this issue can be found there.
Additional Information
Note: the container image and entrypoint script are irrelevant to this bug — the controller panics during ConfigMap generation, before any pod is scheduled. Any placeholder image works for reproduction.
Defining a client component in the CacheRuntimeClass topology avoids the panic: