Autoshutdown-Plugin not working under OMV v4 and Debian Stretch with 4.12 kernel

  • If I could, I would, but I'm just a normal user with no programming experience. I detect a bug and post, like 90% of the users in this forum do (and with 90% of the forums in the www).
    I do use OMV v4 otherwise I wouldn't have found this issue. Sorry, but your post couldn't help me furhter

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    • Offizieller Beitrag

    this plugin is not ready for OMV v4.

    The reason it is in the repos is for testing since OMV 4.x is in testing. The only person really maintaining the plugin is me and I don't use it and have no way to test it. I'm not sure how I can fix it.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It's a pity that you're the only one.
    What I found out in the meantime is, that the script can't read the setting from the ethernet-card correct.



    But I've no clue how to fix it or where to start

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • @ryecoaaron


    Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script? I found them approx. one hour ago but now they're gone. By looking closer I could find them in the code.
    I can say that these codes are working.


    There was another fix according to port scanning or similar. This one I can't find any more because it was also posted together with the pull request. Maybe you also added this fix to the script.


    I've also seen that you added the fix from @tkaiser. This one is also working perfect.


    So, it looks that ASD is now ready for OMV v4.


    Thank you @ryecoaaron, @tkaiser and @yo1frenchtoast for helping in this matter to get the Autoshutdown-Plugin working perfect for OMV v4/Debian 9


    @yo1frenchtoast
    I've seen on your GitHub-side for ASD that you're still using the "old"-ethernet-card-naming at line 1180 (look at here). This is good for OMV v3 but not for OMV v4. Maybe you also update this issue so that you won't face any problems when you upgrade.

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    • Offizieller Beitrag

    Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script?

    Yes. I also pushed the latest version of the plugin to the OMV 4.x repo.

  • I am testing ASD right now with OMV 4, but it is complaining about a syntax error for FORCE_NIC.


    /usr/sbin/autoshutdown.sh: Zeile 1155: Syntaxfehler beim unerwarteten Wort `|'
    /usr/sbin/autoshutdown.sh: Zeile 1155: ` [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {'


    i thought it should not check for FORCE_NIC on stretch.


    And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.

  • You're right but don't have much time yet. Replace these lines from 1151-1163


    with these ones


    Code
    # FORCE_NIC
    	if [ ! -z "$FORCE_NIC" ]; then
    		[[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {
    			_log "WARN: Invalid parameter format: FORCE_NIC"
    			_log "WARN: You set it to '$FORCE_NIC', which is not a correct syntax. It has to match '[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}'"
    			_log "WARN: with spaces between every NIC: e.g. \"eth1 wlan0 usb3 eth1.2\""
    			_log "WARN: Unsetting FORCE_NIC"
    			unset FORCE_NIC; }
    	fi

    and everything should work (at least for me)
    Don't know what happened here.

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    • Offizieller Beitrag

    And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.

    There was a bracket instead of a parentheses. Fixed in 4.0.1 in repo now.

  • @ryecoaaron


    Just tested the upgrade. Everything works like expected. Thanks for fixing it :thumbup: Great job

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • Hi,
    I want to follow this threat and report a seemingly different issue with autoshutdown (4.02).
    I have just made a fresh install of OMV4 and everything seems to work smoothly, with the exeption of autoshutdown.
    Whenever I start the service, it exits after a few minutes with the following lines found in syslog:

    Code
    Dec 29 09:37:46 TINE autoshutdown.sh[2214]: /usr/sbin/autoshutdown.sh: line 1199: ifconfig: command not found
    Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Main process exited, code=exited, status=1/FAILURE
    Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Unit entered failed state.
    Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Failed with result 'exit-code'.

    Any advice on this? As I said, apart from that OMV is running great and I can live without autoshutdown.
    Thanks for the great work,
    T.

    • Offizieller Beitrag

    Any advice on this?

    Install net-tools... apt-get install net-tools The plugin needs to be ported to use the iproute commands.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Just another observation: autoshutdown seems to log into "boot" not into "syslog"

    It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • There is some way to fix the logging? Or do we need to wait for the next autoshutdown update?

    Intel G4400 - Asrock H170M Pro4S - 8GB ram - Be Quiet Pure Power 11 400 CM - Nanoxia Deep Silence 4 - 6TB Seagate Ironwolf - RAIDZ1 3x10TB WD - OMV 5 - Proxmox Kernel

  • It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test

    I tried to logger test and wrote inside "boot". There is some way to correct this behavoir of autoshutdown?

    Intel G4400 - Asrock H170M Pro4S - 8GB ram - Be Quiet Pure Power 11 400 CM - Nanoxia Deep Silence 4 - 6TB Seagate Ironwolf - RAIDZ1 3x10TB WD - OMV 5 - Proxmox Kernel

    • Offizieller Beitrag

    There is some way to correct this behavoir of autoshutdown?

    The plugin would probably have to be change to not use logger. Not real high on priority list right now.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!