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

Problem aplying new interface profile - OMV 5 on Raspbian RPI 4B #683

Closed
Darkside1984 opened this issue Apr 22, 2020 · 22 comments
Closed

Problem aplying new interface profile - OMV 5 on Raspbian RPI 4B #683

Darkside1984 opened this issue Apr 22, 2020 · 22 comments

Comments

@Darkside1984
Copy link

Darkside1984 commented Apr 22, 2020

I've just to configure OMV settings after flash it in Raspbian (RPI 4B 1.1). When I apply the initial network profile (eth0 / DHP), I'm getting this error again and again. Here are the details:

Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run systemd-networkd 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/utils/path.py:265: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working if not isinstance(exes, collections.Iterable): omv: ---------- ID: configure_etc_network_interfaces Function: file.managed Name: /etc/network/interfaces Result: True Comment: File /etc/network/interfaces updated Started: 14:33:59.778341 Duration: 67.247 ms Changes: ---------- diff: --- +++ @@ -1,7 +1,8 @@ +# This file is auto-generated by openmediavault (https://www.openmediavault.org) +# WARNING: Do not edit this file, your changes will get lost. + # interfaces(5) file used by ifup(8) and ifdown(8) - -# Please note that this file is written to be used with dhcpcd -# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' +# Better use netplan.io or systemd-networkd to configure additional interface stanzas. # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d ---------- ID: remove_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 14:33:59.847139 Duration: 2.079 ms Changes: ---------- file.find: ---------- ID: remove_netplan_config_files Function: module.run Result: True Comment: file.find: ['/etc/netplan/10-openmediavault-default.yaml', '/etc/netplan/20-openmediavault-eth0.yaml'] Started: 14:33:59.849514 Duration: 2.285 ms Changes: ---------- file.find: - /etc/netplan/10-openmediavault-default.yaml - /etc/netplan/20-openmediavault-eth0.yaml ---------- ID: configure_netplan_default Function: file.managed Name: /etc/netplan/10-openmediavault-default.yaml Result: True Comment: File /etc/netplan/10-openmediavault-default.yaml updated Started: 14:33:59.852096 Duration: 17.789 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: configure_netplan_ethernet_eth0 Function: file.managed Name: /etc/netplan/20-openmediavault-eth0.yaml Result: True Comment: File /etc/netplan/20-openmediavault-eth0.yaml updated Started: 14:33:59.870184 Duration: 60.161 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: apply_netplan_config Function: cmd.run Name: netplan apply Result: False Comment: Command "netplan apply" run Started: 14:33:59.932430 Duration: 337.581 ms Changes: ---------- pid: 3633 retcode: 1 stderr: Traceback (most recent call last): File "/usr/sbin/netplan", line 23, in netplan.main() File "/usr/share/netplan/netplan/cli/core.py", line 50, in main self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 93, in command_apply stderr=subprocess.DEVNULL) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/lo']' returned non-zero exit status 1. stdout: Summary for omv ------------ Succeeded: 5 (changed=6) Failed: 1 ------------ Total states run: 6 Total run time: 487.142 ms

@votdev
Copy link
Member

votdev commented Apr 22, 2020

Duplicate of #682

@votdev votdev marked this as a duplicate of #682 Apr 22, 2020
@votdev votdev added the 5.x label Apr 22, 2020
@votdev
Copy link
Member

votdev commented Apr 22, 2020

@sagitt
Copy link

sagitt commented Apr 23, 2020

Other users confirm deleting the file helps.

today i'll try again. anyway.. why the install script won't delete the file fi was updated for do it?

@Darkside1984
Copy link
Author

@sagitt
Copy link

sagitt commented Apr 23, 2020

DId you try https://forum.openmediavault.org/index.php?thread/32153-raspberry-pi-add-network-interface-fail/ or https://forum.openmediavault.org/index.php?thread/32133-interface-eth0-error-on-raspberry-pi-4/?

I can confirm too that deleting '99-default.link' it works!

Tested new install script version 1.0.6
At the end i can see some errors and 99-default.lnk file are not deleted
so I deleted it manually from /etc/systemd/network, then reboot

Changing HOSTNAME, no errors, adding eth0, no errors.
Now all works fine. I think anyway there are some fix to do in the install script, or explain to delete file in documentation or a lot of people can have this issue.

thanks for all.

Schermata 2020-04-23 alle 12 11 03

UPDATE:

Removing the 99-default.lnk file before running the script generate no errrors.

Schermata 2020-04-23 alle 17 40 02

@Joe-Knows
Copy link

Joe-Knows commented Apr 23, 2020

@ryecoaaron
I tried the solution in the forum posts you linked on my Pi3B+, and while removing the 99-default directory does enable me to make Network changes in the OMV web gui, as soon as a reboot is performed after removing it, the device has somehow lost its eth0 network device (does not appear under ifconfig) and the device is unable to connect back to the network. This also occurs if the 99-default is removed prior to installation of OMV - after reboot, no eth0.

There is an error message in the startup after this reboot that says:
FAILED - Failed to start "Wait for Network to be Configured".

Any others ideas on a solution? Is it safe to skip configuring the network under OMV until this issue is resolved if the server has a static DHCP reservation? Or is there a way to pull the previous version of OMV before this issue showed up?

Thanks.

@ryecoaaron
Copy link
Contributor

I guess you could just skip configuring networking in the web interface. Is this a fresh install? Does your network have ipv6?

@sagitt
Copy link

sagitt commented Apr 23, 2020

@ryecoaaron
I tried the solution in the forum posts you linked on my Pi3B+, and while removing the 99-default directory does enable me to make Network changes in the OMV web gui, as soon as a reboot is performed after removing it, the device has somehow lost its eth0 network device (does not appear under ifconfig) and the device is unable to connect back to the network. This also occurs if the 99-default is removed prior to installation of OMV - after reboot, no eth0.

There is an error message in the startup after this reboot that says:
FAILED - Failed to start "Wait for Network to be Configured".

Any others ideas on a solution? Is it safe to skip configuring the network under OMV until this issue is resolved if the server has a static DHCP reservation? Or is there a way to pull the previous version of OMV before this issue showed up?

Thanks.

try delete file before install or try omv-firstaid

@Joe-Knows
Copy link

@ryecoaaron This is a fresh install on a test device. I had it installed a few weeks ago but the device lost power a couple days ago and broke so I am reinstalling. It worked fine a few weeks ago. My network does have IPv6 I believe (unifi gateway) but I do not use it and I set OMV to disable it when configuring the network.

@sagitt I already tried removing the directory prior to installing OMV. Same issue.

@hackersbox
Copy link

Oh man, i've been scratching my head and reinstalled OMV several times because if this issue. I thought my card is corrupted or something.

chiva pushed a commit to chiva/installScript that referenced this issue Apr 29, 2020
Closes openmediavault/openmediavault#682 and openmediavault/openmediavault#683

In Raspbian Buster 2020-02-13, the file is a symbolic link to /dev/null and is not detected correctly with the -f condition
@chiva
Copy link

chiva commented May 2, 2020

This can be closed as a new version of the install script has been deployed
OpenMediaVault-Plugin-Developers/installScript@ee58df4

@votdev votdev closed this as completed May 2, 2020
@Joe-Knows
Copy link

Sorry to bear bad news, but the new install script still does not resolve this issue. While this new script DOES successfully remove the 99-default folder, this still does not help because once the system is rebooted, eth0 is no longer available as a network device (only "lo" is listed) and so the device goes offline. I have just verified this again on a Raspberry Pi 3.

Previously, I was able to use omv-firstaid to resolve this (although it ended up creating an oddly named device instead of just eth0). A comment on Reddit has provided an alternate solution though. After rebooting from an OMV install, you can make the following changes to fix it:
sudo raspi-config
Select "2 Network Options"
Select "N3 Network Interface Names"
Choose "No"
Finish and Reboot.

After reboot, eth0 will be back. Unfortunately, so will the /etc/systemd/network/99-default.link folder, so we are kind of back where we started and now OMV will (once again) not let you make network changes. If for example, I try to setup eth0 as IPv4 (DHCP) and IPv6 (disabled) in OMV, I get this error after trying to apply the change:


      ID: apply_netplan_config
Function: cmd.run
    Name: netplan apply
  Result: False
 Comment: Command "netplan apply" run
 Started: 18:35:32.078393
Duration: 605.674 ms
 Changes:
          ----------
          pid:
              2562
          retcode:
              1
          stderr:
              Traceback (most recent call last):
                File "/usr/sbin/netplan", line 23, in <module>
                  netplan.main()
                File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
                  self.run_command()
                File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
                  self.func()
                File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run
                  self.run_command()
                File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
                  self.func()
                File "/usr/share/netplan/netplan/cli/commands/apply.py", line 93, in command_apply
                  stderr=subprocess.DEVNULL)
                File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
                  raise CalledProcessError(retcode, cmd)
              subprocess.CalledProcessError: Command '['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/lo']' returned non-zero exit status 1.

If I run this command manually, then I can make network changes again.
sudo rm -f /etc/systemd/network/99-default.link

However, after I reboot, then eth0 is gone yet again.

@chiva
Copy link

chiva commented May 2, 2020

I've just pushed a new pull request a few hours ago that fixes this exact problems, but there seems to be no intention to include the fix, and another solution has to be studied.
For the moment, by following the official documentation and install script, it is impossible to have a working installation in the Raspberry.

It also fixes the never working wifi in the Raspberry with OMV.

OpenMediaVault-Plugin-Developers/installScript#13

Anyways, the discarded proposal is already uploaded to Github and you can use it, this will install OMV without problems:
wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/96b465008666461f4220c3da8459f0d9aa0d2dcd/install | sudo bash

@chiva
Copy link

chiva commented May 2, 2020

Just been looking around for a bit and /etc/systemd/network/99-default.link seems to be a way to disable preditable naming, so you can't delete de file and have the old style naming.

@ryecoaaron
Copy link
Contributor

@chiva Yes I said I probably wont include that fix for the reasons I posted but I do plan on coming up with system. It just takes time which I dont have a lot of.

@ryecoaaron
Copy link
Contributor

ryecoaaron commented May 3, 2020

Install script and upgrade process have been updated to disable predictive network device naming (udev rule file linked to /dev/null) on arm boards. Disabled predictive network device naming is the default on armbian and raspbian. Tested on rpi3/4,rock64, odroid-n2 and working fine.

@Joe-Knows
Copy link

@ryecoaaron Thank you for your time and effort on this. I just did a fresh install on a Pi 3. After reboot I did not lose eth0 and I was able to make network changes without error in the GUI. Another reboot afterward found no new issues. Thanks!

@NGS99
Copy link

NGS99 commented May 9, 2020

@chiva thanks to you update I was able to use my Pi 4 4gb with wifi with your modification.

https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/96b465008666461f4220c3da8459f0d9aa0d2dcd/install | sudo bash

However, if i rebooted, then the wifi would be disabled on boot. After tinkering around, I was able to figure out that the following commands would get it working via wifi and rebooting or shutdown wouldnt cause an issue!

sudo ifconfig wlan0 up
sudo omv-firstaid
then reconfigure wireless through firstaid

@ryecoaaron Somehow using the default install script on Pi4 would disable the active wireless connection and corrupt its ability to see 5G WiFi ssids names. This means that firstaid will not fix the issue b/c the ssid names shown by the pi will be different than reality and thus, you can never connect.

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

@ryecoaaron
Copy link
Contributor

@NGS99 The script switches to netplan which is what OMV does as well. It does nothing that would corrupt your system's ability to find wifi ssids. And as I have said many times, the requires wifi to be setup after it is run.

@NGS99
Copy link

NGS99 commented May 10, 2020

@ryecoaaron Here are my steps to recreate my issue. Used a fresh install of raspbian lite, expanded card, connected to wifi and then installed OMV wirelessly with default install script listed above. At the end of the script its supposed to list your local IP to tell you what to connect to, but that was blank. That tipped me off that something went wrong during the installation. After re-enabling wireless and scanning for SSIDs, I noticed that 2.4g ssids showed up correctly, but all 5ghz were corrupted. They were either blank, like ssid="" or ssid="%20%20%20%20%20%20%20%20%20%20%20%20" or variations of that. OMV First aid could not fix it, sudo raspi-config could not fix it, as it complained about WPA_SUPPLICANT error.

I have another SD card and can attempt to recreate the corrupted wifi if you wish. If you do, let me know what you need and i'll provide.

@ryecoaaron
Copy link
Contributor

While you are still configuring wifi before running the script like I said not to do, I changed the test script (install.test) to setup wifi (with a few parts taken from @chiva PR) even though I really do not want to support wifi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants