Since we put in support for management-on-VLAN, setting up the management IP
address on first boot has been a little different.
In the past, xcp-networkd would set this up immediately by taking the
configuration from the MANAGEMENT_INTERFACE key in the inventory, and the
management.conf file in the first-boot data, both written by the host installer.
Then, we changed the host installer to no longer write the MANAGEMENT_INTERFACE
key, because we do not have a deterministic name for VLAN bridges: the
management bridge name becomes know only once the first-boot scripts run.
Besides, it is good to not have this naming policy encoded in the host
installer as well as in the Toolstack. The startup sequence of xcp-networkd was
changed to not configure anything in this case, and instead wait for xapi and
the first-boot scripts.
This mean that, on first boot, the management IP address was set much later
than before. Unfortunately, there are services that run at host boot time, such
as ntpdate, that do not cope with this very well.
This commit changes back to the old behaviour, where xcp-networkd immediately
configures the network on first boot, by having it derive the bridge name
itself. For the non-VLAN case, this is easy, because of the deterministic
naming policy. For the VLAN case, a bridge with a temporary name is created,
which is later replaced by xapi once the first-boot scripts run. This is in
fact the same as what happens during an emergency network reset (see
xe-reset-networking).
Since we put in support for management-on-VLAN, setting up the management IP address on first boot has been a little different.
In the past, xcp-networkd would set this up immediately by taking the configuration from the MANAGEMENT_INTERFACE key in the inventory, and the management.conf file in the first-boot data, both written by the host installer.
Then, we changed the host installer to no longer write the MANAGEMENT_INTERFACE key, because we do not have a deterministic name for VLAN bridges: the management bridge name becomes know only once the first-boot scripts run. Besides, it is good to not have this naming policy encoded in the host installer as well as in the Toolstack. The startup sequence of xcp-networkd was changed to not configure anything in this case, and instead wait for xapi and the first-boot scripts.
This mean that, on first boot, the management IP address was set much later than before. Unfortunately, there are services that run at host boot time, such as ntpdate, that do not cope with this very well.
This commit changes back to the old behaviour, where xcp-networkd immediately configures the network on first boot, by having it derive the bridge name itself. For the non-VLAN case, this is easy, because of the deterministic naming policy. For the VLAN case, a bridge with a temporary name is created, which is later replaced by xapi once the first-boot scripts run. This is in fact the same as what happens during an emergency network reset (see xe-reset-networking).
Signed-off-by: Rob Hoes rob.hoes@citrix.com