Skip to content

Windows agent does start when data-dir in config.yaml contains a drive letter #9320

@jwomack

Description

@jwomack

Environmental Info:
RKE2 Version:
rke2.exe version v1.33.6+rke2r1 (2c22982)
go version go1.24.9

Node(s) CPU architecture, OS, and Version:
amd64
Microsoft Windows [Version 10.0.20348.4405]

Cluster Configuration:
3 Masters
5 Linux Workers
1 Windows Worker

Describe the bug:
After settings the data-dir: "D:/var/lib/rancher/rke2" in the C:\etc\rancher\rke2\config.yaml, startup will fail.
From the debug output
level=fatal msg="Error: mkdir c:\D:: The filename, directory name, or volume label syntax is incorrect."

Steps To Reproduce:

  • Installed RKE2: Followed the directions for Windows Air-Gap Install using image rke2-windows-ltsc2022-amd64-images.tar.gz and rke2.windows-amd64.tar.gz.
  • Run: c:\usr\local\bin\rke2.exe agent --config /etc/rancher/rke2/config.yaml --debug

Expected behavior:
To be able to install on a drive other than C:\

Actual behavior:
Agent fails to start

Additional context / logs:
time="2025-12-03T00:01:13-08:00" level=info msg="Starting rke2 agent v1.33.6+rke2r1 (2c22982)"
time="2025-12-03T00:01:13-08:00" level=info msg="Updated load balancer rke2-agent-load-balancer default server: :9345"
time="2025-12-03T00:01:13-08:00" level=info msg="Running load balancer rke2-agent-load-balancer 127.0.0.1:6444 -> [] [default: :9345]"
time="2025-12-03T00:01:13-08:00" level=debug msg="Supervisor proxy using supervisor=https://127.0.0.1:6444 apiserver=https://127.0.0.1:6444 lb=true"
time="2025-12-03T00:01:13-08:00" level=warning msg="Cluster CA certificate is not trusted by the host CA bundle, but the token does not include a CA hash. Use the full token from the server's node-token file to enable Cluster CA validation."
time="2025-12-03T00:01:13-08:00" level=info msg="Updated load balancer rke2-api-server-agent-load-balancer default server: :6443"
time="2025-12-03T00:01:13-08:00" level=info msg="Running load balancer rke2-api-server-agent-load-balancer 127.0.0.1:6443 -> [] [default: :6443]"
time="2025-12-03T00:01:13-08:00" level=debug msg="Supervisor proxy apiserver port changed; apiserver=https://127.0.0.1:6443 lb=true"
time="2025-12-03T00:01:14-08:00" level=warning msg="Host resolv.conf includes loopback, multicast, or link-local nameservers - kubelet will use autogenerated resolv.conf with nameservers 8.8.8.8 2001:4860:4860::8888"
time="2025-12-03T00:01:14-08:00" level=info msg="Checking local image archives in D:\var\lib\rancher\rke2\agent\images for index.docker.io/rancher/rke2-runtime:v1.33.6-rke2r1-windows-amd64"
time="2025-12-03T00:01:14-08:00" level=info msg="Setting up calico CNI"
time="2025-12-03T00:01:14-08:00" level=debug msg="[GET]=>[/networks/] Request : "

time="2025-12-03T00:01:14-08:00" level=debug msg="[GET]=>[/networks/] Request : "

time="2025-12-03T00:01:17-08:00" level=debug msg="Found index.docker.io/rancher/rke2-runtime:v1.33.6-rke2r1-windows-amd64 in D:\var\lib\rancher\rke2\agent\images\rke2-windows-ltsc2022-amd64-images.tar.gz"
time="2025-12-03T00:01:29-08:00" level=info msg="Creating directory D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\charts"
time="2025-12-03T00:01:31-08:00" level=info msg="Creating directory D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin"
time="2025-12-03T00:01:31-08:00" level=info msg="Creating directory D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd"
time="2025-12-03T00:01:31-08:00" level=info msg="Creating directory D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\conf.d"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\conf.d\blocks.toml to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\conf.d\blocks.toml"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\conf.d\peerings.toml to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\conf.d\peerings.toml"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\confd-service.ps1 to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\confd-service.ps1"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\config-bgp.ps1 to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\config-bgp.ps1"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\config-bgp.psm1 to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\config-bgp.psm1"
time="2025-12-03T00:01:31-08:00" level=info msg="Creating directory D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\templates"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\templates\blocks.ps1.template to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\templates\blocks.ps1.template"
time="2025-12-03T00:01:31-08:00" level=info msg="Extracting file bin\confd\templates\peerings.ps1.template to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\confd\templates\peerings.ps1.template"
time="2025-12-03T00:01:32-08:00" level=info msg="Extracting file bin\calico-ipam.exe to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\calico-ipam.exe"
time="2025-12-03T00:01:33-08:00" level=info msg="Extracting file bin\calico-node.exe to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\calico-node.exe"
time="2025-12-03T00:01:34-08:00" level=info msg="Extracting file bin\calico.exe to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\calico.exe"
time="2025-12-03T00:01:35-08:00" level=info msg="Extracting file bin\containerd-shim-runhcs-v1.exe to D:\var\lib\rancher\rke2\data\v1.33.6-rke2r1-windows-amd64-13bd90b0a8d3\bin\containerd-shim-runhcs-v1.exe"
time="2025-12-03T00:01:35-08:00" level=debug msg="Calico Config: &{CNICommonConfig:{Name:Calico OverlayNetName:Calico OverlayEncap:vxlan Hostname:ConfigPath:c:\D:\var\lib\rancher\rke2\agent CNIConfDir:c:\D:\var\lib\rancher\rke2\agent\etc\cni CNIBinDir:c:\D:\var\lib\rancher\rke2\bin ClusterCIDR:10.42.0.0/16 ServiceCIDR:10.43.0.0/16 NodeIP: VxlanVNI:4096 VxlanPort:4789 Interface: IpamType:calico-ipam CNIVersion:0.3.1 KubeConfig:0xc000b8c080} KubeNetwork:Calico.* DNSServers:10.43.0.10 DNSSearch:svc.cluster.local DatastoreType:kubernetes NodeNameFile:c:\D:\var\lib\rancher\rke2\agent\calico_node_name Platform:bare-metal IPAutoDetectionMethod:first-found ETCDEndpoints: ETCDKeyFile: ETCDCertFile: ETCDCaCertFile:}"
time="2025-12-03T00:01:35-08:00" level=info msg="Shutdown request received"
time="2025-12-03T00:01:35-08:00" level=debug msg="Stopped health checking for load balancer rke2-agent-load-balancer"
time="2025-12-03T00:01:35-08:00" level=fatal msg="Error: mkdir c:\D:: The filename, directory name, or volume label syntax is incorrect."

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions