← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~smoser/cloud-init:bug/1669860-no-rename-bonds into cloud-init:master

 


Diff comments:

> diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
> old mode 100755
> new mode 100644
> index 1cf98ef..ff358c6
> --- a/cloudinit/net/__init__.py
> +++ b/cloudinit/net/__init__.py
> @@ -358,6 +386,8 @@ def get_interfaces_by_mac(devs=None):
>                  raise
>      ret = {}
>      for name in devs:
> +        if not interface_has_own_mac(name):
> +            continue

Do we know all of the callers of this don't rely on seeing 'bond0' or 'eth0.78' in the list?

I think if we filtered out a 'stolen' mac interface I'd like to see a debug log entry for that
in case we're not 100% confident that none of the other network code needs a bond mac mapping or something.

Maybe adding a filter= parameter which defaults to None, and in our rename path, pass in a filter='stolen' or 'duplicates'
as in the rename case we know we don't want duplicates, elsewhere I'm not so sure without more investigation.

>          mac = get_interface_mac(name)
>          # some devices may not have a mac (tun0)
>          if mac:


-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/321578
Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:bug/1669860-no-rename-bonds into cloud-init:master.


References