Comment 1 for bug 2056336

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

Just adding some more information to this issue. The problem occurs when running this code in /usr/lib/python3/dist-packages/metadataserver/builtin_scripts/network.py:

def update_vlan_interface(node, name, network, links):
    """Update a VLAN interface.

    :param name: Name of the interface.
    :param network: Network settings from commissioning data.
    """
    vid = network["vlan"]["vid"]
    parent_name = network["vlan"]["lower_device"]
    parent_nic = Interface.objects.get(
        node_config=node.current_config, name=parent_name
    )
    links_vlan = get_interface_vlan_from_links(node, links)
    if links_vlan:
        vlan = links_vlan
        if parent_nic.vlan.fabric_id != vlan.fabric_id: <---- fails here

That if condition just selects if an error message is shown or not and should not make the commissioning fail. The customer solved the issue by patching this code and removing that if line.

Looking at the json file there are four interfaces with vlans, two with lower_device eno1 and two with lower device bond0. Both of those parent devices have null vlan. That is my hypothesis as to why parent_nic.vlan.fabric_id can be NoneType.