Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omv-firstaid - configure network interface not working with RPI 4 #417

Closed
WastlJ opened this issue Aug 13, 2019 · 14 comments

Comments

@WastlJ
Copy link

commented Aug 13, 2019

Description of issue/question

omv-firstaid - configure network interface not working with RPI 4

Steps to reproduce issue

  1. start omv-firstaid
  2. choose option 1
  3. get error message

Versions report

newest OMV5.x

Error Message

ERROR: dialog-like terminated due to an error: the dialog-like program exited with status 3 (which was passed to it as the DIALOG_ERROR environment variable). Sometimes, the reason is simply that dialog was given a height or width parameter that is too big for the terminal in use. Its output, with leading and trailing whitespace stripped, was:
Error: Expected at least 5 tokens for --menu, have 4.

If you need more output, just tell me.

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 14, 2019

@WastlJ

This comment has been minimized.

Copy link
Author

commented Aug 17, 2019

I think this has something to do with the network port on the PI itself. Everything else works properly within omv-firstaid. Just the configure network thing does not. I tried several other values in the files you mentioned. But it does not work at all after clicking the option 1.

Stty size is 32 76

@Dungeonseeker

This comment has been minimized.

Copy link

commented Aug 17, 2019

Can confirm same issue on my Ras Pi 4 as well, I agree it's probably not a terminal sizing issue as I've tested it on a 2160p monitor over DP, a 1080p TV over HDMI and also via SSH on my Monitor, Tablet and Phone, exact same result every time. I struggle to believe all those devices share a terminal size.

Unlike OP I'm running OMV 4.

votdev added a commit that referenced this issue Aug 20, 2019

- Fix issue #417
- Fix some pylint warnings

Signed-off-by: Volker Theile <votdev@gmx.de>
@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

It seems no network interfaces are detected. The commit 66b6569 will display an error in this case.

@votdev votdev closed this Aug 20, 2019

@votdev votdev added 4.x 5.x bug labels Aug 20, 2019

@ryecoaaron

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

While that does fix the error, why is not finding the network interface? It is eth0 and configured properly in the omv web interface for dhcp on my system.

votdev added a commit that referenced this issue Aug 20, 2019

Issue #417: Exit omv-firstaid and show an error when no network inter…
…faces are detected.

Signed-off-by: Volker Theile <votdev@gmx.de>
@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

While that does fix the error, why is not finding the network interface? It is eth0 and configured properly in the omv web interface for dhcp on my system.

I can not tell you why. UDEV is used to identify the network interfaces, see https://github.com/openmediavault/openmediavault/blob/master/deb/openmediavault/usr/share/openmediavault/firstaid/modules.d/10configure_network.py#L57.

@ryecoaaron

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

It is finding it but it is returning a device_type of 'none'. Not sure how to fix that.

for device in context.list_devices(subsystem="net"):
... print(device.sys_name)
... print(device.device_type)
...
eth0
None
wlan0
wlan
docker0
bridge
lo
None
vethb514523
None

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

Could you execute

device = pyudev.Device.from_name(context, "net", "eth0")
print(device)

and the same for wlan0, docker0 and vethb514523.

@ryecoaaron

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

device = pyudev.Device.from_name(context, "net", "eth0")
main:1: DeprecationWarning: Will be removed in 1.0. Use equivalent Devices method instead.
print(device)
Device('/sys/devices/platform/scb/fd580000.genet/net/eth0')

device = pyudev.Device.from_name(context, "net", "wlan0")
print(device)
Device('/sys/devices/platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0')

device = pyudev.Device.from_name(context, "net", "docker0")
print(device)
Device('/sys/devices/virtual/net/docker0')

device = pyudev.Device.from_name(context, "net", "vethb514523")
print(device)
Device('/sys/devices/virtual/net/vethb514523')

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

Thx, but this will not produce the expected result, sorry. Please execute the following code:

import pyudev
context = pyudev.Context()
for name in ['eth0', 'wlan0', 'docker0', 'vethb514523']:
    print("====== {} ======".format(name))
    device = pyudev.Devices.from_name(context, "net", name)
    list(device.properties)
    for prop in device.properties:
        print("{}={}".format(prop, device.properties.get(prop)))
@ryecoaaron

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

====== eth0 ======
['DEVPATH', 'ID_NET_DRIVER', 'ID_NET_NAME_MAC', 'ID_NET_NAMING_SCHEME', 'ID_PATH', 'ID_PATH_TAG', 'IFINDEX', 'INTERFACE' , 'SUBSYSTEM', 'SYSTEMD_ALIAS', 'TAGS', 'USEC_INITIALIZED']
DEVPATH=/devices/platform/scb/fd580000.genet/net/eth0
ID_NET_DRIVER=bcmgenet
ID_NET_NAME_MAC=enxdca632047fb6
ID_NET_NAMING_SCHEME=v240
ID_PATH=platform-fd580000.genet
ID_PATH_TAG=platform-fd580000_genet
IFINDEX=2
INTERFACE=eth0
SUBSYSTEM=net
SYSTEMD_ALIAS=/sys/subsystem/net/devices/eth0
TAGS=:systemd:
USEC_INITIALIZED=3823082
====== wlan0 ======
['DEVPATH', 'DEVTYPE', 'ID_NET_DRIVER', 'ID_NET_NAME_MAC', 'ID_NET_NAMING_SCHEME', 'ID_PATH', 'ID_PATH_TAG', 'IFINDEX', 'INTERFACE', 'SUBSYSTEM', 'SYSTEMD_ALIAS', 'TAGS', 'USEC_INITIALIZED']
DEVPATH=/devices/platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0
DEVTYPE=wlan
ID_NET_DRIVER=brcmfmac
ID_NET_NAME_MAC=wlxdca632047fb7
ID_NET_NAMING_SCHEME=v240
ID_PATH=platform-fe300000.mmcnr
ID_PATH_TAG=platform-fe300000_mmcnr
IFINDEX=3
INTERFACE=wlan0
SUBSYSTEM=net
SYSTEMD_ALIAS=/sys/subsystem/net/devices/wlan0
TAGS=:systemd:
USEC_INITIALIZED=4870151
====== docker0 ======
['DEVPATH', 'DEVTYPE', 'ID_NET_DRIVER', 'ID_NET_NAMING_SCHEME', 'IFINDEX', 'INTERFACE', 'SUBSYSTEM', 'SYSTEMD_ALIAS', 'T AGS', 'USEC_INITIALIZED']
DEVPATH=/devices/virtual/net/docker0
DEVTYPE=bridge
ID_NET_DRIVER=bridge
ID_NET_NAMING_SCHEME=v240
IFINDEX=4
INTERFACE=docker0
SUBSYSTEM=net
SYSTEMD_ALIAS=/sys/subsystem/net/devices/docker0
TAGS=:systemd:
USEC_INITIALIZED=126389995
====== vethb514523 ======
['DEVPATH', 'ID_NET_DRIVER', 'IFINDEX', 'INTERFACE', 'SUBSYSTEM', 'SYSTEMD_ALIAS', 'TAGS', 'USEC_INITIALIZED']
DEVPATH=/devices/virtual/net/vethb514523
ID_NET_DRIVER=veth
IFINDEX=6
INTERFACE=vethb514523
SUBSYSTEM=net
SYSTEMD_ALIAS=/sys/subsystem/net/devices/vethb514523
TAGS=:systemd:
USEC_INITIALIZED=127613413

@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

Any suggestion what we can use instead of the currently expected properties ID_MODEL_FROM_DATABASEor ID_VENDOR_FROM_DATABASE?

Example:

ID_MODEL_FROM_DATABASE=Virtio network device
ID_MODEL_ID=0x1000
ID_NET_DRIVER=virtio_net
ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
ID_NET_NAME_MAC=enx525400bb28d1
ID_NET_NAME_PATH=enp0s5
ID_NET_NAME_SLOT=ens5
ID_NET_NAMING_SCHEME=v240
ID_PATH=pci-0000:00:05.0
ID_PATH_TAG=pci-0000_00_05_0
ID_PCI_CLASS_FROM_DATABASE=Network controller
ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
ID_VENDOR_FROM_DATABASE=Red Hat, Inc.
@votdev

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

Maybe the ID_NET_NAME_MAC, but that does not exist for all devices, too?

@ryecoaaron

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

It exists for the devices that should be used though. So, I would think that would work.

votdev added a commit that referenced this issue Aug 20, 2019

Issue #417: Do not skip interfaces that do not have helpful identific…
…ation information.

Signed-off-by: Volker Theile <votdev@gmx.de>

votdev added a commit that referenced this issue Aug 20, 2019

Issue #417: Do not skip interfaces that do not have helpful identific…
…ation information.

Signed-off-by: Volker Theile <votdev@gmx.de>
(cherry picked from commit 7a9c5b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.