Skip to content

Commit be35341

Browse files
authored
fix(metadata): netplan name-based fallback for cloudimg clone DHCP recovery (#34)
Append a "zfallback" netplan ethernet block (match by name=e*, dhcp4:true) after the per-NIC MAC-keyed ones. The lexicographic 'z' prefix ensures systemd-networkd processes the MAC-matched 10-netplan-id*.network files first; the name-matched 10-netplan-zfallback.network only kicks in when no idN matches — i.e. on a clone whose new MAC isn't in the snapshot's netplan. DHCP-network cloudimg clones now self-heal at next boot; static-IP cloudimg clones remain unchanged (no DHCP server to fall back to is a network-mode limitation, not a software gap).
1 parent 6e3e318 commit be35341

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

metadata/metadata.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ ethernets:
111111
dhcp4: true
112112
{{- end}}
113113
{{- end}}
114+
zfallback:
115+
match:
116+
name: "e*"
117+
dhcp4: true
118+
optional: true
114119
`))
115120
)
116121

0 commit comments

Comments
 (0)