Commit 309884a
committed
CA-303529/CA-287657: Immediately setup management on first boot
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 <[email protected]>1 parent 6aec118 commit 309884a
1 file changed
+36
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
47 | 67 | | |
48 | 68 | | |
49 | 69 | | |
| |||
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
| |||
0 commit comments