OpenMediaVault-Plugin-Developers / openmediavault-omvextrasorg

OpenMediaVault plugin for omv-extras.org repository
150 stars 53 forks source link

The property 'extras' does not exist in the model 'conf.system.omvextras' #71

Closed zyrorl closed 2 years ago

zyrorl commented 2 years ago

hi there. OMV-extras isn't working for me in 6.0.8, please help:)

root@nas:~# sudo omv-confdbadm migrate "conf.system.omvextras" "6.0.8"

  Running migration conf.system.omvextras_6.0.8
root@nas:~# sudo omv-salt deploy run omvextras

raspberrypi:
    Data failed to compile:
----------
    Rendering SLS 'base:omv.deploy.omvextras.default' failed: Jinja error: The property 'extras' does not exist in the model 'conf.system.omvextras'.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl
    output = template.render(**decoded_context)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 18, in top-level template code
  File "/usr/lib/python3/dist-packages/jinja2/sandbox.py", line 465, in call
    return __context.call(__obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/salt/loader.py", line 1235, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/salt/loader.py", line 2268, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/salt/loader.py", line 2283, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 42, 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 726, in execute
    self._response = self._elements_to_object(elements)
  File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 484, in _elements_to_object
    result.set_dict(self._element_to_dict(elements[0]), False)
  File "/usr/lib/python3/dist-packages/openmediavault/config/object.py", line 208, in set_dict
    self.set(key, value, validate)
  File "/usr/lib/python3/dist-packages/openmediavault/config/object.py", line 182, in set
    self.assert_exists(name)
  File "/usr/lib/python3/dist-packages/openmediavault/config/object.py", line 152, in assert_exists
    raise openmediavault.exceptions.AssertException(
openmediavault.exceptions.AssertException: The property 'extras' does not exist in the model 'conf.system.omvextras'.

; line 18

---
[...]
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

{% set config = salt['omv_conf.get']('conf.system.omvextras') %}    <======================
{% set use_kernel_backports = salt['pillar.get']('default:OMV_APT_USE_KERNEL_BACKPORTS', True) -%}
{% set arch = grains['osarch'] %}
{% set oscodename = grains['oscodename'] %}
{% set docker = salt['pillar.get']('default:OMV_DISABLE_DOCKER', False) %}
{% set dist = pillar['productinfo']['distribution'] %}
[...]
---

I'm getting that error in CLI and in browser.

ryecoaaron commented 2 years ago

Yep, you had an upgrade from 5.x not go well. The 6.0 migration script removes the extras field - https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-omvextrasorg/blob/master/usr/share/openmediavault/confdb/migrations.d/conf.system.omvextras_6.0.sh

sudo omv-confdbadm migrate "conf.system.omvextras" "6.0"

But I would probably just remove omv-extras and re-install rather than running migration scripts.

zyrorl commented 2 years ago

thanks this has solved my problem.