OpenMediaVault-Plugin-Developers / installScript

script that installs omv-extras and openmediavault if not installed already.
1.1k stars 207 forks source link

OpenMediaVault-install script not compatible with PiVPN on Raspbian buster? #19

Closed thagorastos closed 4 years ago

thagorastos commented 4 years ago

After setting up a fresh installation of Raspbian Buster and having installed PiVPN, I launched the installation script for OpenMediaVault. After a while I got this:

----------
          ID: configure_netplan_ethernet_tun0
    Function: file.managed
        Name: /etc/netplan/20-openmediavault-tun0.yaml
      Result: True
     Comment: File /etc/netplan/20-openmediavault-tun0.yaml updated
     Started: 01:23:12.673166
    Duration: 56.094 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: 01:23:12.731009
    Duration: 267.453 ms
     Changes:   
              ----------
              pid:
                  1597
              retcode:
                  78
              stderr:
                  /etc/netplan/20-openmediavault-tun0.yaml:5:20: Error in network definition: Invalid MAC address '', must be XX:XX:XX:XX:XX:XX
                          macaddress: 
                                     ^
              stdout:

Summary for raspi4
------------
Succeeded: 7 (changed=8)
Failed:    1
------------
Total states run:     8
Total run time: 479.690 ms
It is recommended to reboot and then setup the network adapter in the openmediavault web interface.

Just after that, my ssh connection was closed (crashed?) and that was the last I saw from my raspberry. It couldn't even reboot any more. This probably means that you may need an extra check for this error, correct?

ryecoaaron commented 4 years ago

You must setup everything after running the install script. It needs to convert the networking to netplan and it cannot accommodate everything someone may setup.

thagorastos commented 4 years ago

Ok, but if the installation process renders my setup unbootable maybe there is an issue with the installation process itself concerning netplan. Maybe something like this for my specific case?

ryecoaaron commented 4 years ago

That probably happened because OMV doesn't understand a vpn network yet the installation script added. Yes, I could filter out the vpn network but I would have to know all names of all vpn network adapters. This is a bad idea and if the script is run before the vpn is setup, there is no problem.

thagorastos commented 4 years ago

Indeed, I restarted my setup from scratch and installed OMV before OpenVPN. It does work. Maybe an additional check in the installation script to warn you if you have multiple tun* virtual interfaces would be nice.

Thank you for your help.

ryecoaaron commented 4 years ago

I changed the script to skip a few different virtual NICs. Not sure if this would fix the issue you had but there is no reason to process them - https://github.com/OpenMediaVault-Plugin-Developers/installScript/commit/dae40a18bfbd85c0557780941728bc4251288d19