Errors importing config from 22.7.11_1 into 24.7

Started by bhigh, August 16, 2024, 12:31:50 AM

Previous topic - Next topic
I'm in the process of replacing my router hardware and updating OPNsense and I'm running into some issues when importing the configs.

The biggest issue I found is that auto generated VLAN names do not pass the naming requirements in 24.07. This will bite anyone grading from older versions and it can't be fixed through the web interface.

My existing router is a Protectli FW4B, which has i210 NICs. The new router is a CWWK system with i226 NICs. The i210 device names are igbN and the i226 devices are named igcN.

When importing the config it calls out that the interfaces don't match and links me to the Assignments configuration. I am able to select the new devices for my LAN and WAN, but it fails when saving with a message "VLAN parent interface igb1 does not exist" and reverts the changes.

From the VLAN config page I'm unable to edit the VLANs.

If I change the parent and try to save, it fails with The device name prefix "vlan" is required.. The VLAN uses an auto-generated name such as `igb1_vlan10`.

If I try to change the device name it fails with
QuoteInterface is assigned and you cannot change the device name while assigned.

I created a copy of each VLAN with a new VLAN tag, since the tag must be unique. There is an inconsistency with the edit error. The edit screen had required the prefix "vlan", but the create screen says
QuoteOnly a maximum of 15 characters is allowed starting with "vlan0" combined with numeric characters and dots, e.g. "vlan0.1.104".

Now the VLAN interface can be changed to the new VLAN devices, but trying to save still fails with "VLAN parent interface igb1 does not exist."

I was able to resolve this by editing the backup xml and changing the bad names with:

sed -E -e 's/igb1_vlan(\d*)/vlan0.\1/'


After importing the updated config it's possible to change the VLAN parents to the new device names. Once the VLANs are updated the last step is to update the interface assignments from igbN to igcN and save.


Hi,

As soon as you copy a previously created VLAN device with the old naming you can no longer use the old name, especially since it is already taken by the copied from entry. ;)


Cheers,
Franco

The problem is that it's not possible to edit the existing VLANs.

The name can't be changed while the interface is in use and the interface assignments can't be changed if the config has any VLANs (even unused) with an invalid name.

Sorry, I'm not quite there yet. Why does it need changing? The name is accepted on the original one, but it's in use at the same time. These are two separate things, no?


Cheers,
Franco

Not exactly following either, but long term experience is that editing the config.xml beforehand to adjust for interface mismatches between different HW is whole lot easier and less error-prone than trying to use the assignments prompt. Even more so when there are VLANs or LAGGs involved.