cloudinit.net refactor: find_fallback_nic

Bug #1884606 reported by Dan Watkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Wishlist
Unassigned

Bug Description

This bug is tracking part of the refactor of cloudinit.net into
cloudinit.distros.networking, specifically the refactoring of the function
named in the title of this bug. See [0] for further details.

[0] https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#cloudinit-net-cloudinit-distros-networking-hierarchy

Tags: net-refactor
Dan Watkins (oddbloke)
Changed in cloud-init:
importance: Undecided → Low
status: New → Triaged
tags: added: net-refactor
Revision history for this message
Ryan Harper (raharper) wrote :

It would be good to refactor this to match what's in cloudinit/net/init.py:find_fallback_nic_linux() where we're looking for connected devices...

> carrier = read_sys_net_int(interface, 'carrier')
> if carrier:
> connected.append(interface)
> continue
> # check if nic is dormant or down, as this may make a nick appear to
> # not have a carrier even though it could acquire one when brought
> # online by dhclient
> dormant = read_sys_net_int(interface, 'dormant')
> if dormant:
> possibly_connected.append(interface)
> continue
> operstate = read_sys_net_safe(interface, 'operstate')
> if operstate in ['dormant', 'down', 'lowerlayerdown', 'unknown']:
> possibly_connected.append(interface)
> continue

Original discussion here:
  https://github.com/canonical/cloud-init/pull/453/files#r444272062

James Falcon (falcojr)
Changed in cloud-init:
importance: Low → Wishlist
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.