canonical / canonical/cloud-init
Don't Break On Duplicate Mac Addresses
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1996789](https://bugs.launchpad.net/cloud-init/+bug/1996789)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2022-11-16T17:15:59.577005+00:00
date_fix_committed = None
date_fix_released = None
id = 1996789
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1996789
milestone = None
owner = holmanb
owner_name = Brett Holman
private = False
status = triaged
submitter = holmanb
submitter_name = Brett Holman
tags = ['sts']
duplicates = []
_Launchpad user **Brett Holman(holmanb)** wrote on 2022-11-16T17:15:59.577005+00:00_
Currently when duplicate mac addresses are detected, cloud-init dies.
While duplicate macs are typically corner cases, there are cases when they can be valid[1].
Consider this example[2]. After bonding two interfaces, the interfaces were left with duplicate mac addresses. Using cloud-init on this system fails at the time that these devices are detected.
If no network config is given, or if a config is given configuring a single address, we have the opportunity to do something intelligent to allow cloud-init to boot by using the "fallback interface" (in cloud-init this is the first interface), rather than throwing an exception and dying.
Netplan's mac matching assumes 1:1 mapping between mac addresses and interfaces, so in the case of multiple interfaces configured with matches, we still can't do anything intelligent.
[1] Until these have unique addresses, these interfaces will not be usable on the same broadcast domain, but they should still be able to work individually on different networks.
[2] https://stackoverflow.com/questions/74459180/deleted-bond-interface-left-me-with-duplicate-mac-on-two-interfaces
Contributor guide
Assessment
This issue has not been assessed yet.