Cannot clone network configuration of a machine with two VLAN interfaces

Bug #2097142 reported by Stamatis Katsaounis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
High
Unassigned
3.6
Triaged
High
Unassigned

Bug Description

Describe the bug:

Trying to clone network configuration of a source machine with a VLAN interface linked to the physical interface. e.g. eth0, eth0.1000 to a destination machine with a physical interface eth0. Running it once, it succeeds. Running it twice it fails with an error:

maas local machines clone source=rqew4t destinations=grgmxf interfaces=true
{"__all__": ["Interface with this Node config and Name already exists."]}

Steps to reproduce:

fabric_id=$(maas admin fabric read fabric-0 | jq -r .id)
vlan_id=$(maas admin vlans create $fabric_id vid=1000 | jq -r .id)

maas admin vm-host compose $VM_HOST_ID hostname=vm-1 interfaces=eth0
maas admin vm-host compose $VM_HOST_ID hostname=vm-2 interfaces=eth0

source_id=$(maas admin machines read hostname=vm-1 | jq -r .[0].system_id)
destination_id=$(maas admin machines read hostname=vm-2 | jq -r .[0].system_id)

interface_id=$(maas admin interfaces read $source_id | jq -r .[0].id)
maas admin interfaces create-vlan $source_id vlan=$vlan_id parent=$interface_id

maas local machines clone source=$source_id destinations=$destination_id interfaces=true
maas local machines clone source=$source_id destinations=$destination_id interfaces=true

Expected behavior (what should have happened?):

$ maas admin machines clone source=yakp4h destinations=grgmxf interfaces=true
Success.
$ maas admin machines clone source=yakp4h destinations=grgmxf interfaces=true
Success.

Actual behavior (what actually happened?):

$ maas admin machines clone source=yakp4h destinations=grgmxf interfaces=true
Success.
$ maas local machines clone source=yakp4h destinations=grgmxf interfaces=true
{"__all__": ["Interface with this Node config and Name already exists."]}

MAAS version and installation type (deb, snap):

snap 3.5.3-16341-g.7adb035d6 (38185)

MAAS setup (HA, single node, multiple regions/racks):

single node

Host OS distro and version:

Ubuntu Jammy

Additional context:

The clone functionality is clearing the network links of all interfaces by running node._clear_networking_configuration() but it is not deleting non-physical interfaces, which it should.

description: updated
tags: added: bug-council
Changed in maas:
milestone: 3.6.x → 3.7.0
tags: removed: bug-council
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.