Description
Expected Behavior
The file backend should update the runtime config with new changes when the backend-file-path file is updated.
Current Behavior
It currently does not update the runtime config as far as I can tell. Running the following command:
smee -backend-kube-enabled=false -backend-file-enabled -backend-file-path=/opt/smee/example.yaml -syslog-enabled=false -dhcp-addr=0.0.0.0:67 -dhcp-ip-for-packet=172.16.0.22 -http-addr=172.16.0.22:80 -dhcp-http-ipxe-binary-url="http://172.16.0.22/ipxe/" -dhcp-http-ipxe-script-url="http://172.16.0.22/auto.ipxe" -dhcp-tftp-ip=172.16.0.22:69
with the following backend-file-path /opt/smee/example.yaml
03:cc:aa:c6:0b:36:
ipAddress: "172.16.0.29"
subnetMask: "255.255.240.0"
defaultGateway: "172.16.0.17"
nameServers:
- "8.8.8.8"
- "1.1.1.1"
hostname: "infra-2"
domainName: "example.com"
broadcastAddress: "172.16.0.31"
ntpServers:
- "132.163.96.2"
- "132.163.96.3"
leaseTime: 86400
domainSearch:
- "example.com"
netboot:
allowPxe: true
ipxeScriptUrl: "https://boot.netboot.xyz"
and then I make a change and write /opt/smee/example.yaml
it does not update the runtime config. For example I have been changing the IP address from 172.16.0.29
to 172.16.0.28
and the server I am testing with always gets 172.16.0.29
from DHCP.
The info log message https://github.com/tinkerbell/smee/blob/main/internal/backend/file/file.go#L210 never shows up in stdout.
Possible Solution
Something is dun goofed up in https://github.com/tinkerbell/smee/blob/main/internal/backend/file/file.go
Steps to Reproduce (for bugs)
See above.
Context
I am trying to automate my datacenter deployment with iPXE booting in my rack and smee
seems pretty great for that job. In the short term I plan on using the file backend to automate imaging Fedora CoreOS servers. Long term I hope that maybe a more programmatic backend like Redis could be added to make it easier to add and remove servers that need to be iPXE booted via Smee.
Your Environment
- Operating System and version (e.g. Linux, Windows, MacOS):
root@compute-1:~# cat /etc/os-release
NAME="Fedora Linux"
VERSION="39.20240104.3.0 (CoreOS)"
ID=fedora
VERSION_ID=39
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora CoreOS 39.20240104.3.0"
- How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:
Podman and CLI for now while I test smee out for my usecase. I am going to port it to Nomad with the Podman driver if I can get things working.