Posts by anothernas

    Regarding #109:

    I have no plans to maintain or add to the plugin except for very easy changes that don't need much testing. You will have to supply pull requests or convince nrandon to work on it again.

    ryecoaaron, I know you don't want to work on it, and that's ok. But you also know that it's pointless to create a pull request that nobody looks at, apart from the fact that simple OMV users like me would have to register and learn to use github. And that it's not possible to convince nrandon if he doesn't read messages anymore (which is his decision and not up for discussion here).

    My tiny wish would be that the autoshutdown plugin gets a little more love. I hope someone integrates this bugfix [1] or implements an even better solution to the problem.


    [1] RE: AutoShutdown plugin does not shutdown if Overridewakealarm is set for next day and locale is not english

    means:


    My tiny wish is that existing OMV plugins do not remain completely unmaintained, and that a maintainer is found for the autoshutdown plugin in particular. It doesn't have to be ryecoaaron.

    For future reference, the command I now use is

    Code
    omv-upgrade && sleep 60s && echo "\nApply changes:" && omv-rpc -u admin "Config" "applyChanges" "{\"modules\": $(cat /var/lib/openmediavault/dirtymodules.json), \"force\": false}"

    This is run once a week as user “root” in a scheduled task. It does the upgrade, waits for some time as suggested in #12, and then applies the changes. And since this is a scheduled task, I will receive all the details about the upgrade via email.


    Perfect, thank you everyone.

    When using "omv-upgrade" as user "root" in console or scheduled task, should this be executed with "sudo" or without?


    I'm not sure if sudo enables some kind of elevated privileges for user root, or if omv root has any permission in any case.

    1) How does autoshutdown plugin work?

    2) What do these mean: Cycles / Seconds?

    3) Shutdown command which is better for power and

    4) can it also wake back up if someone starts to use plex etc.. ?

    1) The task of the Autoshutdown plugin is to shut down the system. You can select which tests must be passed before the system may be shut down (e.g. no user logged in or processor idle). If any of the selected tests are not passed, the system will not shut down.


    2) You can specify that the system is not shut down immediately when all tests are passed, but only when all tests are passed cyclically in succession. The "seconds" are the delay between one test and the next.


    3) depends :)


    4) Powering up the system is a separate process from this. However, the autoshutdown plugin is able to switch it on at certain times, even at different times per weekday or only on certain weekdays.


    If one wants the system to turn on when the user tries to use the service, please read about Wake on Lan. In short: Make sure that WOL is supported by the network interface and BIOS, that WOL is enabled in the BIOS and OMV, and make sure that your client sends a magic wake-up message. Once set up, it works perfectly! Even the combination of WOL and timed switch-on!

    However, I have observed that the error message is also reproducible on the console:


    Is it right that I execute both commands with sudo?

    Can you execute both commands several times in a row without this error? Even if no update is available?

    In the meantime, I thought it might be due to the planned task environment. So I split it into two tasks (1x upgrade command, 30 minutes delayed 1x apply command), but the error message is the same.


    And the manual execution of the scheduled task "Apply changes" leads to a red popup "500 - Internal Server Error"

    Code
    root@ananas:~# dpkg -l | grep openm
    ii  libopenmpt0:amd64                 0.4.11-1                             amd64        module music library based on OpenMPT -- shared library
    ii  openmediavault                    6.6.0-2                              all          openmediavault - The open network attached storage solution
    ii  openmediavault-autoshutdown       6.0.9                                all          OpenMediaVault AutoShutdown Plugin
    ii  openmediavault-filebrowser        6.0.7-1                              all          openmediavault File Browser plugin
    ii  openmediavault-flashmemory        6.2                                  all          folder2ram plugin for openmediavault
    ii  openmediavault-keyring            1.0.2-2                              all          GnuPG archive keys of the openmediavault archive
    ii  openmediavault-minidlna           6.0.3                                all          OpenMediaVault miniDLNA (DLNA server) plugin
    ii  openmediavault-omvextrasorg       6.3.1                                all          OMV-Extras.org Package Repositories for OpenMediaVault

    The "libopenmpt0:amd64" and "openmediavault-keyring" must have been automatically installed since I did not install them. And they are not listed in System > Plugins.

    What plugins do you have installed? [...] Please also post the output of ls -alh /srv/salt/omv/deploy/pam

    Since I do not know a way to export or query the list of installed plugins:

    Written down from GUI > System > Plugins

    openmediavault-filebrowser 6.0.7-1

    openmediavault-omvextrasorg 6.3.1

    openmediavault-flashmemory 6.2

    openmediavault-autoshutdown 6.0.9

    openmediavault-minidlna 6.0.3


    Code
    root@ananas:~# ls -alh /srv/salt/omv/deploy/pam
    insgesamt 16K
    drwxr-xr-x  2 root root 4,0K 18. Aug 20:20 .
    drwxr-xr-x 45 root root 4,0K 18. Aug 20:20 ..
    -rw-r--r--  1 root root 1,2K 24. Feb 12:54 default.sls
    -rw-r--r--  1 root root  907 24. Feb 12:54 init.sls

    The omv-rpc command above, executed by a scheduled task, frequently leads to a mail report like this

    Code
    {"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed:   0\n-----------\nTotal states run:    0\nTotal run time:  0.000 ms","trace":"OMV\\ExecException: Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed:   0\n-----------\nTotal states run:    0\nTotal run time:  0.000 ms in \/usr\/share\/php\/openmediavault\/system\/process.inc:242\nStack trace:\n#0 \/usr\/share\/php\/openmediavault\/engine\/module\/serviceabstract.inc(62): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engine d\/rpc\/config.inc(174): OMV\\Engine\\Module\\ServiceAbstract->deploy()\n#2 [internal function]: Engined\\Rpc\\Config->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(537): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}}

    This message is from the upgrade (6.6.0-2) over (6.5.7-1).

    Is it normal that is still contains "Failed to execute..."?

    I am not sure if it is a good idea to delay the start of services in my installation. It may end up causing other problems elsewhere.


    It also doesn't help to boot less frequently - that only reduces the probability of occurrence, but doesn't fix the cause. Actually, I would expect services to be started by default in an order that does not lead to errors.


    Are you sure that this is not a bug in OMV that only shows up at boot time and not always? And which has not yet been detected and fixed in the default installation, because many systems are not booted often?

    You need to delay some time.

    Even with 120 seconds delay I still get this response:

    Code
    {"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"OMV\\Rpc\\Exception: Failed to read from socket: Resource temporarily unavailable in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:172\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 2)\n#1 {main}"}}

    The log output is very short (and says nothing to me):

    Code: uncut
    root@ananas:~# journalctl -u php7.4-fpm.service
    -- Journal begins at Sat 2023-06-10 01:07:48 CEST, ends at Sat 2023-07-22 11:10:04 CEST. --
    Jul 17 21:11:13 ananas systemd[1]: Stopping The PHP 7.4 FastCGI Process Manager...
    root@ananas:~#

    Hardware is an Intel Celeron J4125 CPU with 8 GB RAM.

    systemd-analyze says Startup finished in 6.647s (firmware) + 6.889s (loader) + 4.276s (kernel) + 10.654s (userspace) = 28.468s

    Sometimes when booting OMV I get an email with an error message "Execution failed php-fpm". This only happens with what feels like every 10th boot, but not for the first time.

    What can be the reason and what can be improved so that the system boots reliably without an error message?