Upgrade from 1.8 to 1.9 lost connected macs in all but one network

Bug #1536754 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned
1.10
Invalid
High
Unassigned

Bug Description

We had many networks defined in our MAAS 1.8 system, and all networks had all our nodes connected to them. In other words, list-connected-macs <network> would return one mac per node for all <network>.

After upgrading that to 1.9, just one network had results for list-connected-macs. It also so happens that this network in particular is the managed one, all the others were not managed.

Tags: landscape

Related branches

tags: added: kanban-cross-team
Revision history for this message
Mike Pontillo (mpontillo) wrote :

It looks like this is because we are joining the MACs to the Subnet via the IP address table. If (for whatever reason) the MACs in question don't have IP addresses, it looks like you might hit this issue.

Can you execute "sudo maas-region-admin dbshell" on the region, and then run this query:

https://paste.ubuntu.com/14591836/

I'll paste the query here as well:

SELECT
    subnet.name,
    vlan.vid,
    fabric.name,
    iface.mac_address
FROM
    maasserver_subnet subnet
    LEFT OUTER JOIN maasserver_vlan vlan
        on subnet.vlan_id = vlan.id
    LEFT OUTER JOIN maasserver_fabric fabric
        on vlan.fabric_id = fabric.id
    LEFT OUTER JOIN maasserver_interface iface
        on iface.vlan_id = vlan.id
ORDER BY subnet.name, vlan.vid, iface.mac_address;

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.9.1
tags: removed: kanban-cross-team
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I get what looks like the correct output. Many macs listed for each network.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Note that this is only an issue for 1.9 and 1.10; in MAAS 2.0 we are dropping support for the (legacy) networks API endpoint.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Thanks. I believe this is the fix:

https://paste.ubuntu.com/14591973/

As a workaround, that patch could be applied to /usr/lib/python2.7/dist-packages/maasserver/api/networks.py until an official fix is released.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

That worked for me

tags: added: landscape
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: 1.9.1 → none
status: Fix Committed → Invalid
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.