Comment 10 for bug 2031482

Revision history for this message
Jorge Merlino (jorge-merlino) wrote :

Hi all, I've been reviewing the possible causes for this error and I've noticed logs like these in the syslog for some machines (see for example logs on comment #6):

IP address [146.118.58.161] subnet 146.118.58.0/23: VLAN updated (vlan=5001)

This log comes from this function in src/maasserver/models/signals/interfaces.py:

def interface_vlan_update(instance, old_values, **kwargs):
 """When an interfaces VLAN is changed we need to do the following.

 * If its a controller move all assigned subnets to the new VLAN. This
   is done because the subnets defined are discovered on the
   controller and an administrator cannot change them.
 * If its a machine or device then we need to remove all links if the
   VLAN is different.
 """

This function has two different behaviors if the node is a controller or not but this log line:

log.msg(
   "%s: IP address [%s] subnet %s: "
   "VLAN updated (vlan=%s)." ...

Only occurs on the controller path and we are seeing it in non-controller machines. To separate these two cases there is this if line:

if not node.is_commissioning():

Which supposedly indicates that the node is a controller in case it is true. It is not intuitive that not is_commissioning equals that the node is a controller so it is possible that this not always works and thus sometimes the code path for controller is being taken for non-controller nodes.