Template Creation Times Out When the Sandbox CIDR Overlaps the LAN
Symptom
Template creation fails during the CREATING_TEMPLATE phase:
cubemastercli run fail: template tpl-xx creation failed: context deadline exceededOr cube-bench reports errors during a benchmark run:
create HTTP 500: {"code":500,"message":"CubeMaster returned error code 130595: context deadline exceeded"}Environment
- Cube Sandbox version: e29453
- Deployment mode: bare-metal or local physical-machine deployment
- Host OS / kernel: Ubuntu 22.04 / Linux 6.6
- Related components:
Cubelet, persistent TAP devices
Root Cause
On a bare-metal or local physical-machine deployment, Cube creates many persistent TAP devices named like z192.168.0.x or z192.168.1.x.
The default configuration is in Cubelet/config/config.toml. By default, Cube creates 500 TAP devices from the 192.168.0.0/18 CIDR:
[plugins]
[plugins."io.cubelet.internal.v1.network"]
object_dir = "/usr/local/services/cubetoolbox/cube-vs/network"
eth_name = "eth0"
tap_init_num = 500
cidr = "192.168.0.0/18"Cube's default sandbox CIDR is 192.168.0.0/18. If the host LAN also uses a related range, such as 192.168.1.x, sandbox addresses can overlap with the real LAN, causing routing and port probing failures.
How to diagnose
- Check the Cubelet log at
/data/log/Cubelet/Cubelet-req.logforPortBindingFailederrors. - Verify the host LAN IP range:
ip addr show— look for theinetline on your primary NIC. - Compare with the sandbox CIDR in
Cubelet/config/config.toml.
Fix
Change the sandbox CIDR to a non-overlapping range. For example, if your LAN uses 192.168.1.0/24, change the Cubelet config to use 10.0.0.0/18:
[plugins]
[plugins."io.cubelet.internal.v1.network"]
object_dir = "/usr/local/services/cubetoolbox/cube-vs/network"
eth_name = "eth0"
tap_init_num = 500
cidr = "10.0.0.0/18"Then restart the Cubelet and network-agent services:
sudo systemctl restart cube-sandbox-cubelet.service
sudo systemctl restart cube-sandbox-network-agent.serviceRe-run the template creation or benchmark to verify the fix.