[Bug Report] Separate container paths from host paths

Author: krocziCreated Sep 18, 2026Updated Sep 18, 2026
Labelsbugarea/Cubeletneeds-triage

Summary

The Kubernetes chart currently uses the same hostPaths values for both the host-side hostPath and the container-side mountPath, preventing custom host storage paths from being used while preserving the standard /data/... paths expected by CubeSandbox runtime components.

Environment

  • CubeSandbox version / commit: v0.7.0 / d0081641c59822e4e5653b7462e914410b81910a
  • Host OS and kernel version: RHCOS 9.6
  • KVM info (modinfo kvm): KVM available
  • Deployment mode: cluster (OCP)

Steps to Reproduce

  1. Configure the Cubelet host storage path to use a custom host path instead of the upstream default /data/cubelet, for example:

    yaml
    hostPaths:
      dataCubelet: /var/lib/cubesandbox/cubelet
  2. Deploy the chart.

  3. Allow the CubeNode and CubeNode installer to initialize the Cubelet storage and versioned components.

  4. Try to create a template that requires the Cubelet runtime and observe the error.

Expected Behavior

The host-side storage path should be independently configurable from the container-side mount path.

For example:

hostPath:  /var/lib/cubesandbox/cubelet
mountPath: /data/cubelet

Actual Behavior

The CubeSandbox components are up and running:

NAME                                      READY   STATUS    RESTARTS       AGE
cube-api-74cf9ccc8c-8zmkb                 1/1     Running   0              146m
cube-cubemastercli-6cb6756864-fnpkj       1/1     Running   0              146m
cube-dns-589f794c4-xjfv9                  1/1     Running   0              72m
cube-lifecycle-manager-75bd9557cf-smcvh   1/1     Running   2 (146m ago)   146m
cube-master-648984f665-sdwkx              1/1     Running   5 (145m ago)   146m
cube-mysql-0                              1/1     Running   0              146m
cube-node-bootstrap-jlfb4                 1/1     Running   0              146m
cube-node-btmvp                           3/3     Running   0              146m
cube-node-installer-b7lht                 4/4     Running   0              146m
cube-ops-5b886fc467-twgw5                 1/1     Running   5 (145m ago)   146m
cube-ops-5b886fc467-vx6v5                 1/1     Running   4 (146m ago)   146m
cube-proxy-58df75586d-xx52q               1/1     Running   0              97m
cube-redis-0                              1/1     Running   0              146m

The CubeNode is running and the required cube-runtime binary is present in the configured host-side Cubelet storage, but the runtime looks for it under the standard container-side path:

/data/cubelet/root/component_versions/cube-shim/v0.7.0/bin/cube-runtime

Because the customized host path is also used as the container mount path, Cubelet storage is mounted at a different path.

Template creation fails with error:

oc exec deploy/cube-cubemastercli -- \
  cubemastercli -a cube-master -p 8089 template create-from-image ...
2026/09/17 23:44:01 submitted template image job: job_id=5957b71d-a37f-4537-8460-04fa5dc7662c template_id=tpl-a37e6b58bb5c4922ac3b498a
2026/09/17 23:44:01 [1/7] PULLING progress=0% template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c
2026/09/17 23:44:03 [1/7] PULLING progress=5% template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c
2026/09/17 23:44:05 [2/7] UNPACKING progress=20% template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c artifact_id=rfs-3d4b88506904206332468085
2026/09/17 23:44:23 [5/7] DISTRIBUTING progress=70% template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c artifact_id=rfs-3d4b88506904206332468085
2026/09/17 23:44:27 [6/7] CREATING_TEMPLATE progress=85% distribution=1/1 ready, 0 failed template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c artifact_id=rfs-3d4b88506904206332468085
2026/09/17 23:44:41 [6/7] CREATING_TEMPLATE progress=100% distribution=1/1 ready, 0 failed template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c artifact_id=rfs-3d4b88506904206332468085 error=template tpl-a37e6b58bb5c4922ac3b498a creation failed: failed to execute cube-runtime snapshot: cube-runtime missing for shim version v0.7.0 at /data/cubelet/root/component_versions/cube-shim/v0.7.0/bin/cube-runtime
2026/09/17 23:44:41 template image job failed template_id=tpl-a37e6b58bb5c4922ac3b498a job_id=5957b71d-a37f-4537-8460-04fa5dc7662c artifact_id=rfs-3d4b88506904206332468085 distribution=1/1 ready, 0 failed error=template tpl-a37e6b58bb5c4922ac3b498a creation failed: failed to execute cube-runtime snapshot: cube-runtime missing for shim version v0.7.0 at /data/cubelet/root/component_versions/cube-shim/v0.7.0/bin/cube-runtime
cubemastercli run fail: template tpl-a37e6b58bb5c4922ac3b498a creation failed: failed to execute cube-runtime snapshot: cube-runtime missing for shim version v0.7.0 at /data/cubelet/root/component_versions/cube-shim/v0.7.0/bin/cube-runtime
command terminated with exit code 1

The required binary is present in the host-backed Cubelet storage at:

/var/lib/cubesandbox/cubelet/root/component_versions/cube-shim/v0.7.0/bin/cube-runtime

This is another problem that the component does not respect the custom container path, but expects the default one.

Additional Context

Since we cannot use the default hostPaths, as a workaround, we currently use a patch that introduces a separate containerPaths configuration while keeping hostPaths for the host-side storage locations.

For example:

yaml
hostPaths:
  dataCubelet: /var/lib/cubesandbox/cubelet

containerPaths:
  dataCubelet: /data/cubelet

The relevant chart templates are changed from using hostPaths for container mounts to using containerPaths, for example:

diff
-  mountPath: {{ .Values.hostPaths.dataCubelet }}
+  mountPath: {{ .Values.containerPaths.dataCubelet }}

The host-side volume continues to use hostPaths:

yaml
- name: data-cubelet
  hostPath:
    path: {{ .Values.hostPaths.dataCubelet }}
    type: DirectoryOrCreate

The same separation is applied to the other relevant paths:

yaml
containerPaths:
  dataCubelet: /data/cubelet
  dataLog: /data/log
  dataCubeShim: /data/cube-shim
  dataSnapshotPack: /data/snapshot_pack
  dataCubeShared: /data/cube-shared
  dataShared: /data/shared
  tmpCube: /tmp/cube

This results in the required separation between the physical host storage location and the path exposed inside CubeSandbox containers:

hostPath:  /var/lib/cubesandbox/cubelet
mountPath: /data/cubelet

Source: TencentCloud/CubeSandbox