Error when access Snapraid plugin

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Error when access Snapraid plugin

      After last update of the Snapraid plugin to 3.7.4 which finished with some error.
      Every time when I try to access Snapraid plugin I get an error window with text

      The property 'updthresh' does not exist in the model 'conf.service.snapraid'.



      With option OK or Show details

      and in detail is this text


      Source Code

      1. Error #0:
      2. OMV\AssertException: The property 'updthresh' does not exist in the model 'conf.service.snapraid'. in /usr/share/php/openmediavault/config/configobject.inc:71
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/config/configobject.inc(186): OMV\Config\ConfigObject->assertExists('updthresh')
      5. #1 /usr/share/php/openmediavault/config/configobject.inc(271): OMV\Config\ConfigObject->set('updthresh', '0', false)
      6. #2 /usr/share/php/openmediavault/config/configobject.inc(233): OMV\Config\ConfigObject->setFlatAssoc(Array, false, false)
      7. #3 /usr/share/php/openmediavault/config/database.inc(90): OMV\Config\ConfigObject->setAssoc(Array, false)
      8. #4 /usr/share/openmediavault/engined/rpc/snapraid.inc(61): OMV\Config\Database->get('conf.service.sn...')
      9. #5 [internal function]: OMVRpcServiceSnapRaid->getSettings(NULL, Array)
      10. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getSettings', NULL, Array)
      12. #8 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('SnapRaid', 'getSettings', NULL, Array, 1)
      13. #9 {main}
      Display All
      Also same error appears on Drives tab on any option under Tools and Info.
    • Looks like upgrade has replaced the /etc/snapraid.conf and /etc/snapraid-diff.conf files with clean ones, rendering the plugin unusable.

      Was able to restore /etc/snapraid.conf just by grabbing a file from root of one of my drives and replacing the one in /etc but it's still not working as it currently complaining about snapraid-diff configuration.

      Update: Removed the plugin completely, reinstalled, re-imported my drives and re-added exclusion rules - all seem to be working fine...

      The post was edited 1 time, last by usblaidas ().

    • Upgrading did not replace or otherwise damage my /etc/snapraid.conf and /etc/snapraid-diff.conf files.

      Here are the contents on my snapraid-diff.conf file. (Forum software would not allow me to upload the file itself.)

      Source Code

      1. # this file was automatically generated from
      2. # openmediavault Arrakis 4.1.23-1
      3. # and 'openmediavault-snapraid' 3.7.3
      4. SYSLOG="true"
      5. DEBUG="true"
      6. SENDMAIL="true"
      7. RUN_SCRUB="true"
      8. SCRUB_FREQUENCY_IN_DAYS=4
      9. DEL_THRESHOLD=50
      10. SCRUB_PERCENT=10
      Display All
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • gderf wrote:

      Upgrading did not replace or otherwise damage my /etc/snapraid.conf and /etc/snapraid-diff.conf files.

      Here are the contents on my snapraid-diff.conf file. (Forum software would not allow me to upload the file itself.)

      Source Code

      1. # this file was automatically generated from
      2. # openmediavault Arrakis 4.1.23-1
      3. # and 'openmediavault-snapraid' 3.7.3
      4. SYSLOG="true"
      5. DEBUG="true"
      6. SENDMAIL="true"
      7. RUN_SCRUB="true"
      8. SCRUB_FREQUENCY_IN_DAYS=4
      9. DEL_THRESHOLD=50
      10. SCRUB_PERCENT=10
      Display All
      Looks like a default file. If you had any exclusions added to the snapraid config, check your main snapraid.conf file - you will see no exclusions in that file
    • Interesting... I discovered that during upgrade it was complaining about /etc/default/omv_snapraid_excludes, which indeed was blank. Once I populated it with exclusions, upgrade finished successfully and it did update my snapraid.config file accordingly.

      It still was broken in UI so I went ahead and re-installed.

      There are still some odd things happening with snapraid-diff script though. It's complaining about line 490. I went ahead and inserted a new line before "else" statement and added "fi" to it. It's not complaining about it anymore, but not sure if I broken it in other ways lol.

      Will check the logs in the morning to see if diff sync finished successfully.
    • There are other problems. According to the changelog the update was to provide a default excludes file:

      openmediavault-snapraid (3.7.4) stable; urgency=low

      * Add default file for excludes

      but since the upgrade throws errors and doesn't seem to complete successfully the file never gets added.
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • Exact same errors here after upgrading.

      gderf wrote:

      I did check my snapraid.conf file. It was not touched in any way. All the exclusions, including those I added myself are still there.
      My conf files were wiped and started issuing errors to do with the exclusions. As above with Usblaidas, I copied from another .conf file in /Srv/dev-disk-by-label-X/snapraid.conf and added in my exclusion lines to the file in /etc/snapraid.conf. This let the OMV UI see my exclusions again but did not fix the error message:

      Source Code

      1. Error #0:
      2. OMV\AssertException: The property 'updthresh' does not exist in the model 'conf.service.snapraid'. in /usr/share/php/openmediavault/config/configobject.inc:71
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/config/configobject.inc(186): OMV\Config\ConfigObject->assertExists('updthresh')
      5. #1 /usr/share/php/openmediavault/config/configobject.inc(271): OMV\Config\ConfigObject->set('updthresh', '0', false)
      6. #2 /usr/share/php/openmediavault/config/configobject.inc(233): OMV\Config\ConfigObject->setFlatAssoc(Array, false, false)
      7. #3 /usr/share/php/openmediavault/config/database.inc(90): OMV\Config\ConfigObject->setAssoc(Array, false)
      8. #4 /usr/share/openmediavault/engined/rpc/snapraid.inc(61): OMV\Config\Database->get('conf.service.sn...')
      9. #5 [internal function]: OMVRpcServiceSnapRaid->getSettings(NULL, Array)
      10. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getSettings', NULL, Array)
      12. #8 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('SnapRaid', 'getSettings', NULL, Array, 1)
      13. #9 {main}
      Display All



      and the Diff script gives an error:

      Source Code

      1. Error #0:
      2. 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 SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- /usr/sbin/omv-snapraid-diff 2>&1' with exit code '2': /usr/sbin/omv-snapraid-diff: line 490: syntax error near unexpected token `else'
      3. /usr/sbin/omv-snapraid-diff: line 490: `else' in /usr/share/openmediavault/engined/rpc/cron.inc:175
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceCron->{closure}('/tmp/bgstatusWx...', '/tmp/bgoutputHN...')
      6. #1 /usr/share/openmediavault/engined/rpc/cron.inc(179): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      7. #2 [internal function]: OMVRpcServiceCron->execute(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
      10. #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
      11. #6 {main}
      Display All

      Trying to run an apt-get update/upgrade manually gives an error for the new snapraid install:
      (Every time you run this your exclusions vanish from the GUI in Snapraid > config section)


      Source Code

      1. Setting up openmediavault-snapraid (3.7.4) ...
      2. Updating configuration database ...
      3. Running migration conf.service.snapraid_3.7.4
      4. cat: /etc/default/omv_snapraid_excludes: No such file or directory
      5. dpkg: error processing package openmediavault-snapraid (--configure):
      6. subprocess installed post-installation script returned error exit status 1
      7. Processing triggers for openmediavault (4.1.23-1) ...
      8. Updating locale files ...
      9. Updating file permissions ...
      10. Purging internal cache ...
      11. Restarting engine daemon ...
      12. Cannot create socket to [localhost]:2812 -- Connection refused
      13. Errors were encountered while processing:
      14. openmediavault-snapraid
      15. E: Sub-process /usr/bin/dpkg returned an error code (1)
      16. root@openmediavault:~#
      Display All

      Hope some of this is useful. Luckily Snapraid still seems to function but with manual syncs/dif syncs in the meantime if you manually re-add your exclusions.

      The post was edited 3 times, last by Altecice ().

    • gderf wrote:

      ut since the upgrade throws errors and doesn't seem to complete successfully the file never gets added.

      Altecice wrote:

      Exact same errors here after upgrading.
      My bad. 3.7.5 is in the repo. I didn't test (since I don't use snapraid) a pull request assuming that it was tested.
      omv 4.1.23 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • nagubal wrote:

      Just updated to 3.7.5, no more error, thanks
      Upgrade again to 3.7.6 just to be safe.
      omv 4.1.23 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • 3.7.6 appears to have fixed everything but the Diff script is still issuing the same error at line 490.

      Source Code

      1. Error #0:
      2. 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 SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- /usr/sbin/omv-snapraid-diff 2>&1' with exit code '2': /usr/sbin/omv-snapraid-diff: line 490: syntax error near unexpected token `else'
      3. /usr/sbin/omv-snapraid-diff: line 490: `else' in /usr/share/openmediavault/engined/rpc/cron.inc:175
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceCron->{closure}('/tmp/bgstatus4v...', '/tmp/bgoutputiS...')
      6. #1 /usr/share/openmediavault/engined/rpc/cron.inc(179): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      7. #2 [internal function]: OMVRpcServiceCron->execute(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
      10. #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
      11. #6 {main}
      Display All
    • gderf wrote:

      How does one NOT have:
      Please don't make me change the plugin again... There is no way to get rid of it - code - without me changing the plugin. Can you tell me why you would want to keep a dynamically generated file that is backed up by the plugin and the backup can be removed from exclusion list by editing /etc/default/openmediavault-snapraid?
      omv 4.1.23 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Altecice wrote:

      3.7.6 appears to have fixed everything but the Diff script is still issuing the same error at line 490.
      I haven't touched that script. Someone else is going to have to fix it. Sounds a variable is set to null/empty string.
      omv 4.1.23 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      gderf wrote:

      How does one NOT have:
      Please don't make me change the plugin again... There is no way to get rid of it - code - without me changing the plugin. Can you tell me why you would want to keep a dynamically generated file that is backed up by the plugin and the backup can be removed from exclusion list by editing /etc/default/openmediavault-snapraid?
      SnapRAID places a copy of snapraid.conf in the root of every data drive. What is the point of placing this file there if it is excluded from the parity when a sync is run?

      I do not have exclude /snapraid.conf* in my /etc/default/openmediavault-snapraid, yet every copy of snapriad.conf contains this statement.

      If I add include /snapraid.conf* to /etc/default/openmediavault-snapraid both the include and the exclude statement wind up in the snapraid.conf file with the exclude statement located above the include statement.

      Which one is obeyed?
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • gderf wrote:

      What is the point of placing this file there if it is excluded from the parity when a sync is run?
      There is a snapraid.conf on every drive. Every time you change the config, a backup of that file is made on the drives with extension .bak. By default, both are excluded from the parity but you would have to lose every drive to lose your config. While you can't remove the exclude the /snapraid.conf file, you can remove the exclude for .bak files from /etc/default/openmediavault-snapraid. Excluding both from the parity was not my idea but it was requested.

      gderf wrote:

      I do not have exclude /snapraid.conf* in my /etc/default/openmediavault-snapraid, yet every copy of snapriad.conf contains this statement.
      Nope. It is hard coded in the mkconf file that I linked to. There is not way to get rid of it without a plugin change.

      gderf wrote:

      If I add include /snapraid.conf* to /etc/default/openmediavault-snapraid both the include and the exclude statement wind up in the snapraid.conf file with the exclude statement located above the include statement.

      Which one is obeyed?
      The first one which is the exclude.

      Why is this file so important to be in the parity? I agree, it should make little difference if it is. i don't know why people either really want or really don't want this dynamically generated file in the parity.
      omv 4.1.23 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Altecice wrote:

      3.7.6 appears to have fixed everything but the Diff script is still issuing the same error at line 490.

      Source Code

      1. Error #0:
      2. 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 SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- /usr/sbin/omv-snapraid-diff 2>&1' with exit code '2': /usr/sbin/omv-snapraid-diff: line 490: syntax error near unexpected token `else'
      3. /usr/sbin/omv-snapraid-diff: line 490: `else' in /usr/share/openmediavault/engined/rpc/cron.inc:175
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceCron->{closure}('/tmp/bgstatus4v...', '/tmp/bgoutputiS...')
      6. #1 /usr/share/openmediavault/engined/rpc/cron.inc(179): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      7. #2 [internal function]: OMVRpcServiceCron->execute(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
      10. #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
      11. #6 {main
      Display All


      Same error here.