[2.3+] Can't change which fabric a vlan belongs to

Bug #1704501 reported by Jason Hobbs
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Mike Pontillo
2.3
Fix Released
High
Mike Pontillo

Bug Description

There is no way, via the API or the UI, to change which fabric a vlan belongs to. We'd like to move all of our vlans to the same fabric, since they're all part of the same switch infrastructure. Ideally we could just change the fabric a vlan is associated with via the API. This would move all of the subnets along with it. Instead, we have to create new vlans on the new fabric, then move all of our existing subnets to the new vlans.

Related branches

description: updated
Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.3.0
Revision history for this message
Blake Rouse (blake-rouse) wrote :

I believe this was done for a reason, but can't remember why....

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

Yes, it's possible that we restricted this due to some type of edge case that was causing a problem. But it will need to be revisited in the context of beacons, since we might detect after-the-fact that a VLAN is actually on a different fabric than we thought it was on.

tags: added: foundations-engine
tags: added: internal
Changed in maas:
milestone: 2.3.0 → 2.3.x
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

subscribed to field high

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Can you provide data as to how the network looks like:

1. What vlans/fabrics are automatically created
2. What rack controller interfaces do you have
3. Whether all VLANs are indeed connected to the same fabric, physically.

Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
milestone: 2.3.x → 2.4.0beta2
status: Triaged → Incomplete
Revision history for this message
Andres Rodriguez (andreserl) wrote :

ALso, it would be helpful to understand a few extra things.

1. Were those vlans that you want to move created by yourself or that were automatically discovered?

2. If automatically discovered, how were these added? e.g. you connected a new rack controller connected to completely different netowrks? Or is this issue in a single region/rack that display two fabrics with vlans divided among those?

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

I've thought for a long time that a "merge fabrics" operation should be implemented.

That said, you can work around this by modifying the database directly. For example, if you wanted to move everything into fabric-0, first you could update every VLAN to assign it a unique VID, and do something like this:

$ sudo maas-region dbshell

maasdb=# select id, name from maasserver_fabric;
 id | name
----+----------
  0 | fabric-0
  1 | fabric-1
(2 rows)

maasdb=# update maasserver_vlan set fabric_id=0;
UPDATE 2

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

Actually, if you use the "hack the database" workaround, you'd need one more command to clean up the now-empty fabrics, or the UI will start failing to reload the subnets page:

maasdb=# delete from maasserver_fabric where id != 0;
DELETE 1

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

Also, have you tried going to the controller details > interfaces tab and selecting the fabric for each controller's interface there?

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

WRT #6/#7, that sounds helpful.

WRT #8, sorry, this is all done through an automated script. What would the API equivalent of that be?

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

WRT #4, #5, I feel like those questions are distractions from the issue reported in this bug, which is that I can't move vlans between fabrics, regardless of how they got that way. Those questions more inline with bug 1754484 ("maas creates separate fabrics for each interface on a rack controller Edit").

Still, here's the info you asked for in the form of a dump of the interfaces from the rack controllers:

https://pastebin.canonical.com/p/jv22Sm8BFq/

All of the fabrics/vlans in that dump were created automatically.

All of the vlans belong to the same fabric - we don't reuse vlan ID's in our organization, so we have no need for vlan namespaces. They are all connected to the same set of switches.

Changed in maas:
status: Incomplete → New
Revision history for this message
Dean Henrichsmeyer (dean) wrote :

MAAS will never be able to correctly detect everything so we should do our best but then allow the administrator to correct it. We should allow them to move vlans between fabrics. Particularly because no one can think of a good reason why you shouldn't be able to do that.

summary: - can't change which fabric a vlan belongs to
+ [2.3+] Can't change which fabric a vlan belongs to
Changed in maas:
status: New → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.