TrueNAS-SCALE-22.12.0 - Cannot Add VLAN

tactis

Cadet
Joined
Feb 15, 2023
Messages
3
There appears to be a middleware bug in TrueNAS-SCALE-22.12.0 which cannot finalise the creation of a VLAN.

In Network > Interfaces, click Add

  1. Type = VLAN
  2. Name = vlan2
  3. VLAN Tag = 2
Pick parent interface, description, doesn't matter if DHCP is ticked or not (which can only be done for 1 interface). When clicking save a dialogue pops up to Register Default Gateway. No matter what valid IP is entered here, an error pops up on the next window:

'/' does not appear to be an IPv4 or IPv6 interface

Callback error:

Code:
 Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 181, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1255, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1284, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1152, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/network.py", line 438, in save_default_route
    if gw in ip_interface(f'{iface["int_address"]}/{iface["int_netmask"]}').network:
  File "/usr/lib/python3.9/ipaddress.py", line 118, in ip_interface
    raise ValueError('%r does not appear to be an IPv4 or IPv6 interface' %
ValueError: '/' does not appear to be an IPv4 or IPv6 interface


Since this also occurs on a brand new install, it seems to be a problem with the python script in the release.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Have you used TrueNAS before?

I'd suggest you start by documenting all of the network settings you want including default gateway... then the order you have entered the settings.

You may be entering the data in the wrong order....or perhaps conflicting information. Hard to tell without an overview of the system and network.
 

tactis

Cadet
Joined
Feb 15, 2023
Messages
3
Hi Morgan.
Yes I have used TrueNas before.

I thought I was very clear in my steps given to reproduce the issue. It doesn't matter what VLAN ID or Default gateway is used. I can reproduce the issue on any new install, either hardware or virtualised.

This appears to be a new bug in 22.12.0, I cannot reproduce it in 22.02.4
 

senojnai

Cadet
Joined
Feb 22, 2023
Messages
5
I have the same issue on the same vn. of Scale - defining a bridge interface, click save and it asks you for the default gateway - putting in any IP address fails with a python dump:
Error: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/main.py", line 196, in call_method result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1335, in _call return await methodobj(*prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1318, in nf return await func(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1186, in nf res = await f(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/network.py", line 438, in save_default_route if gw in ip_interface(f'{iface["int_address"]}/{iface["int_netmask"]}').network: File "/usr/lib/python3.9/ipaddress.py", line 118, in ip_interface raise ValueError('%r does not appear to be an IPv4 or IPv6 interface' % ValueError: '/' does not appear to be an IPv4 or IPv6 interface
 

senojnai

Cadet
Joined
Feb 22, 2023
Messages
5
My workaround was to follow https://www.truenas.com/community/t...-ping-truenas-scale-host-or-vice-versa.88487/

I have a single nic so on the console I removed the trueNAS IP address from the physical NIC (mine is allocated by DHCP so I just turned DHCP off)
I created a bridge interface called br0, added the physical interface as a member and gave it an alias of the truenas IP address.
Added the bridge interface to the VM and powered it up - I can now mount my NFS filesystems.
 

senojnai

Cadet
Joined
Feb 22, 2023
Messages
5
Update: Drat - my Plex app is stuck Deploying whereas it was working before this network change. I'll dig into the issue and update.
 

senojnai

Cadet
Joined
Feb 22, 2023
Messages
5
I'm going to have to get my head around how K8 and docker work as I couldn't see why Plex was stuck in a loop running a kill script.
Bottom line - I have had delete the bridge interface and re-enable dhcp on to the physical nic just to get Plex up and running again.

Hopefully there will be a fix for this soon.

@tactis - if the bridge interface is created in the gui but no alias is set then there's a popup asking for an ip address. It is following this that I get the python dump.
 

senojnai

Cadet
Joined
Feb 22, 2023
Messages
5
All fixed. My details and steps taken follow:
I initially had my router allocate a specific IP address to the MAC of the physical NIC in the server.
The physical NIC had been defined to use DHCP and so I could talk to the NAS no problem.
Then I found the issue that my VMs could not access the NAS shares - I need a bridge interface.
It turns out that the bridge interface needs an IP address. If I turn off DHCP on the physical NIC and create br0 to use DHCP then, as br0 has a different MAC address, I get a free (and unknown unless I go into the router) address and not the one I want so I did the following in one step from the GUI:
edit the physical NIC and uncheck the DHCP box, that's all. Don't add any alias addresses.
create br0 adding the physical NIC as a bridge member.
option 1: In this form, you see the MAC address so you could set your router to pass your required address to this MAC - if you want to do this then you need to check the DHCP box
option 2: Leave DHCP unchecked and add the alias ip/netmask
Run the test.
Try to connect to the GUI again from your PC. Mine connected immediately but you *might* need to flush your arp cache (on Windows open a CMD in admin mode and run "arp -a" to view, "arp -d" to flush.)
Then select Save to save your changes.

After I did this previously, my App (Plex) would not restart - the difference between then and now being the IP address had changed (I used DHCP on br0) previously.

Hope this helps.

p.s. When you do not specify an alias IP/netmask to the bridge interface, the gui prompts you for one and it is here that the address is rejected and the python stack trace appears with the "ValueError: '/' does not appear to be an IPv4 or IPv6 interface" issue. As per the steps I took, I *do* specify an alias in the form and so am not prompted.
 
Last edited:
Top