Feature Request: Add Storage Node IP setting to .fogsettings
-
Hi,
I would like to suggest an improvement to FOG 1.6 regarding Storage Node IP address management.
Currently, when the IP address of a FOG server changes, the new server IP can be detected by the installer, but the existing Storage Node IP address in the FOG database may still need to be updated manually through Storage Management.
Could you please add an optional setting to /opt/fog/.fogsettings, for example:
STORAGE_node_ip=‘192.0.2.10’
The name above is only a proposal, not an existing configuration option.
Suggested behavior:
- Allow the administrator to specify the Storage Node IP address in .fogsettings or through an installer argument such as --storage-node-ip.
- During installation or upgrade, detect whether the specified IP differs from the existing registered Storage Node address.
- Update the matching existing Storage Node record in the FOG database, rather than creating a duplicate.
- Preserve the Storage Node ID, storage group, image assignments, master status, credentials and other existing settings.
- Never modify unrelated Storage Nodes.
- Display the old and new addresses and request confirmation before updating the database.
- Support unattended installations with an explicit opt-in flag.
- Validate the new address and report whether the database update succeeded.
For a Normal FOG Server, it would also be useful to offer an option to synchronize the primary Storage Node address with NET_fog_server_ip.
This would simplify IP changes, server migrations, and reinstallations, especially when the web interface is not yet accessible.
Could this feature be considered for a future FOG 1.6 dev-branch update?
-
@sgennadi Thanks for the detailed proposal. This is now in the 1.6 dev-branch.
It works a little differently from the proposal. There is no new
.fogsettingskey. The installer already keeps the server address inipaddress(NET_fog_server_ip), so on an upgrade it now checks that value against the addresses on the server:- If the saved address is still on the saved interface, nothing changes.
- If the interface was renamed (for example
eth0toens18), the installer uses the new name and keeps the address. - If the saved address is on no interface, the installer shows the old and the new address and asks before it uses the new one.
--server-ip <address>picks the address yourself. The address must be on the server, or the installer stops.-yaccepts the new address for an unattended run.
When the address changes, the installer:
- moves this server’s own record in Storage Management to the new address. The ID, storage group, master status, credentials and paths stay, so image and snapin assignments are kept.
- never touches another storage node. If another node already has the new address, it refuses and says so.
- updates
FOG_TFTP_HOSTif it still holds the old address. - issues a new web certificate for the new address. A storage node asks the master for a new one.
- reports whether the record update worked. If it fails, it tells you to set the address under Storage Management.
If FOG is also your DHCP server and the new address is on another subnet, the installer asks whether to update the DHCP settings. With
-yalone it keeps them and warns you. Add--update-dhcp-subnetto update them without the question.It is on dev-branch now. It reaches stable with the next stable release.
-
@sgennadi One addition: the installer now also moves
FOG_WEB_HOSTthe same way asFOG_TFTP_HOST. It changes the value only when it still holds the old address. A host name you set there stays.This matters because iPXE builds every boot URL after
boot.phpfromFOG_WEB_HOST, and the FOG client uses it as the server address. Before this change, a server on plain HTTP netboot kept the old address there after a move.This change is in review now (#2137). It reaches dev-branch when that merges, and stable with the next stable release.