Hello. I somehow seem to have gotten SMB into an unrecoverable state and would like some help either recovering or simply resetting SMB and starting over.
Background:
I had SMB set up and working fine. One of my shared volumes had guest access enabled and I wanted to disable this, so I did so via the OMV UI. However, after I save>applied an error occurred and from that point I couldn't get back to the original state. Reverting the change wasn't working properly either.
Right now, OMV says that SMB is enabled (green light) but not running (red light). I've tried to disable it from the OMV UI (in the hopes that if I disable and reenable it things might fix themselves) but even this throws an error after I save>apply:
Error #0:
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; omv-salt deploy run samba 2>&1' with exit code '1': debian:
ID: configure_samba_shares
Function: file.append
Name: /etc/samba/smb.conf
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 715, in execute
self._response = self._response[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 394, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 33, in top-level template code
File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 98, in get_sharedfolder_path
mp_obj = get('conf.system.filesystem.mountpoint', sf_obj['mntentref'])
File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 39, in get
objs = db.get(id_, identifier)
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 85, in get
query.execute()
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 720, in execute
raise DatabaseQueryNotFoundException(self.xpath, self.model)
openmediavault.config.database.DatabaseQueryNotFoundException: No such object: //system/fstab/mntent[uuid='e721a3b7-bb4e-458b-885a-3c407c2addc4']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 1933, in call
**cdata['kwargs'])
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1951, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/file.py", line 5265, in append
context=context)
File "/usr/lib/python3/dist-packages/salt/states/file.py", line 1153, in _get_template_texts
**kwargs
File "/usr/lib/python3/dist-packages/salt/modules/cp.py", line 348, in get_template
**kwargs)
File "/usr/lib/python3/dist-packages/salt/fileclient.py", line 745, in get_template
**kwargs
File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 169, in render_tmpl
output = render_str(tmplstr, context, tmplpath)
File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 443, in render_jinja_tmpl
trace=tracestr)
salt.exceptions.SaltRenderError: Jinja error: No such object: //system/fstab/mntent[uuid='e721a3b7-bb4e-458b-885a-3c407c2addc4']
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 715, in execute
self._response = self._response[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 394, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 33, in top-level template code
File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 98, in get_sharedfolder_path
mp_obj = get('conf.system.filesystem.mountpoint', sf_obj['mntentref'])
File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 39, in get
objs = db.get(id_, identifier)
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 85, in get
query.execute()
File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 720, in execute
raise DatabaseQueryNotFoundException(self.xpath, self.model)
openmediavault.config.database.DatabaseQueryNotFoundException: No such object: //system/fstab/mntent[uuid='e721a3b7-bb4e-458b-885a-3c407c2addc4']
; line 33
---
[...]
{%- for share in config.shares.share | selectattr('enable') %}
[{{ salt['omv_conf.get_sharedfolder_name'](share.sharedfolderref) }}]
{%- if share.comment | length > 0 %}
comment = {{ share.comment }}
{%- endif %}
path = {{ salt['omv_conf.get_sharedfolder_path'](share.sharedfolderref) }} <======================
guest ok = {% if share.guest != 'no' %}yes{% else %}no{% endif %}
guest only = {% if share.guest == 'only' %}yes{% else %}no{% endif %}
read only = {% if share.readonly | to_bool %}yes{% else %}no{% endif %}
browseable = {% if share.browseable | to_bool %}yes{% else %}no{% endif %}
inherit acls = {% if share.inheritacls | to_bool %}yes{% else %}no{% endif %}
[...]
---
Started: 21:32:29.850984
Duration: 188.537 ms
Changes:
Succeeded: 8 (changed=2)
Failed: 1
Total states run: 9
Total run time: 541.389 ms/usr/lib/python3/dist-packages/salt/utils/jinja.py:503: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
if isinstance(values, collections.Hashable):
in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(60): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(167): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusIB...', '/tmp/bgoutputYD...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(189): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}
Alles anzeigen
This seems to be the error, but I have no idea what it means:
No such object: //system/fstab/mntent[uuid='e721a3b7-bb4e-458b-885a-3c407c2addc4']
In any case, I'm ok to wipe my SMB settings and start again, but I'm not sure how to do this. Can anyone please let me know?