summaryrefslogtreecommitdiff
path: root/interface-definitions/include/generic-interface-multi.xml.i
diff options
context:
space:
mode:
authorAlex Kudentsov <43482574+alexk37@users.noreply.github.com>2026-10-14 20:46:08 +0700
committerChristian Breunig <christian@breunig.cc>2026-10-31 09:58:29 +0000
commit153dd688b327c922ec4b371db1fdd11b8ee8cf9e (patch)
tree8fcb56faa26c097d86e76f1b7af82bdf0b2d5af2 /interface-definitions/include/generic-interface-multi.xml.i
parent639d575ad258f6f6ba629a0c50a710b736e4911d (diff)
downloadvyos-1x-153dd688b327c922ec4b371db1fdd11b8ee8cf9e.tar.gz
vyos-1x-153dd688b327c922ec4b371db1fdd11b8ee8cf9e.zip
interfaces: T3871: give a re-created Hyper-V NIC the name of the NIC it replaced
A Hyper-V NIC is known by its MAC alone. One deleted and created again on the same VM - an Azure NIC re-created, or a Hyper-V adapter removed and added - comes back with a new MAC, so nothing on it matched the store: its name stayed reserved, the new NIC got a new name, and its configuration was left on a name with no NIC. cloud-init does not run again on the same instance, so nothing else repairs it. At boot, a vacant name now goes to a new NIC only when the pairing is not in doubt: - exactly one recorded name has no NIC, and exactly one new Hyper-V NIC appeared. With more of either, the order the NICs come up in does not say which replaced which, so nothing is handed over and the names stay reserved, as before; - the name went missing at this pass. The store records which names were missing at the last pass, so a NIC removed for good does not hand its name to a NIC added at a later boot; - the name's own NIC was a Hyper-V one. The store records which names sat on a Hyper-V NIC; a MAC-keyed name can belong to other hardware, and a store written before this was recorded hands nothing over (the boot pass logs that when it holds a name back); - only at boot. On a running system the configuration under a name is not applied to the NIC that takes it, so the hotplug unit passes --hotplug, which names the new NIC like any other and records the vacant name as missing, so the next boot does not hand it over either. An adoption is logged as a warning, reported under 'adopted' in the status file (kept there across hotplug passes while it holds), and repeated by vyos-router, as a slot match is: verify the port before relying on its configuration.
Diffstat (limited to 'interface-definitions/include/generic-interface-multi.xml.i')
0 files changed, 0 insertions, 0 deletions