Merge "Ignore non permanenet addresses in udev too"

This commit is contained in:
Jenkins 2016-09-16 17:57:04 +00:00 committed by Gerrit Code Review
commit c0f71f74bf
2 changed files with 5 additions and 2 deletions

View File

@ -806,7 +806,10 @@ def get_sys_interfaces(interface, args):
mac_addr_type = open(
'%s/%s/addr_assign_type' % (sys_root, iface), 'r').read().strip()
# TODO why? is it not valid to configure randomly assigned mac addrs?
# Interfaces without a permanent address are likely created by some
# other system on the host like a running neutron agent. In these cases
# that system should be responsible for configuring the interface not
# glean.
if mac_addr_type != PERMANENT_ADDR_TYPE:
continue
mac = open('%s/%s/address' % (sys_root, iface), 'r').read().strip()

View File

@ -1 +1 @@
SUBSYSTEM=="net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="glean@$name.service"
SUBSYSTEM=="net", ACTION=="add", ATTR{addr_assign_type}=="0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="glean@$name.service"