Merge lp:~ltrager/maas/fix_xenial_net_detect into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Lee Trager |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4524 |
Proposed branch: | lp:~ltrager/maas/fix_xenial_net_detect |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
121 lines (+28/-14) 3 files modified
src/provisioningserver/network.py (+1/-0) src/provisioningserver/utils/ipaddr.py (+2/-5) src/provisioningserver/utils/tests/test_ipaddr.py (+25/-9) |
To merge this branch: | bzr merge lp:~ltrager/maas/fix_xenial_net_detect |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+278634@code.launchpad.net |
Commit message
Fix cluster controller networking auto detection
* Don't require that a valid NIC has a kernel module loaded
* When falling back to scanning ip addr for devices look for network devices which follow the preedictable network interface names standard.
Description of the change
Auto detection of the cluster controllers network devices was failing for two reasons
1. MAAS's primary method of discovering NICs is to iterate through /sys/class/net. A device was only identified as a physical device that MAAS can use if its /sys entry contained device/
2. As a fall back MAAS iterates over the output of ip addr. Xenial is following the preedictable network interface names standard[1] which creates ethernet devices starting with 'en' instead of 'eth'. MAAS was checking for devices that start with 'em' while devices only come up with 'en.' Many articulates on the internet came out describing that 'em' would be used and many still report that today[2]. However the freedesktop.org spec[1] links to a comment in the udev source code[3] which explains how devices will be named starting with 'en'
1. http://
2. https:/
3. https:/
Looks good, but please keep the startswith('em') in there; that's still a valid for embedded NICs.[1]
[1]: /en.wikipedia. org/wiki/ Consistent_ Network_ Device_ Naming
https:/