Upgrade error : openmediavault (4.1.13-1)

    • OMV 4.x
    • Update
    • Upgrade error : openmediavault (4.1.13-1)

      Hi All,

      after doing an omv-update today I did get many updates but one did not get thrue:
      #############Snap###
      Hit:22 dl.bintray.com/openmediavault-…developers/arrakis-docker stretch Release
      Ign:24 ftp.de.debian.org/debian stretch InRelease
      Hit:25 ftp.de.debian.org/debian stretch Release
      Hit:26 openmediavault.github.io/packages arrakis InRelease
      Reading package lists... Done
      W: The repository 'file:/var/cache/openmediavault/archives Release' does not have a Release file.
      N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
      N: See apt-secure(8) manpage for repository creation and user configuration details.
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Calculating upgrade... Done
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      1 not fully installed or removed.
      After this operation, 0 B of additional disk space will be used.
      Setting up openmediavault (4.1.13-1) ...
      Updating configuration database ...
      ERROR: Failed to create the default configuration: 'Command' object has no attribute 'create_backup'
      Traceback (most recent call last):
      File "/usr/share/openmediavault/confdbadm/commands.d/create.py", line 65, in execute
      self.create_backup()
      AttributeError: 'Command' object has no attribute 'create_backup'


      During handling of the above exception, another exception occurred:


      Traceback (most recent call last):
      File "/usr/share/openmediavault/confdbadm/commands.d/create.py", line 87, in execute
      self.rollback_changes()
      AttributeError: 'Command' object has no attribute 'rollback_changes'
      ####################snip################################################

      When I try to start "omv-onfdbadm" in the shell there is no "create_backup" option !

      omv-confdbadm
      Usage: omv-confdbadm <command>


      Common commands:
      create Create the default configuration for a data model.
      delete Delete a configuration object.
      exists Check if configuration object(s) exists.
      list-ids List all data model IDs.
      migrate Apply configuration migrations.
      read Read configuration object(s).
      update Update a configuration object.


      Any hints ? ?(
    • It seems there was an error during the installation. The changed Python files seem not be copied into the right place. Try to force the installation of the package via

      Shell-Script

      1. # apt-get install --reinstall openmediavault
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • votdev wrote:

      It seems there was an error during the installation. The changed Python files seem not be copied into the right place. Try to force the installation of the package via

      Shell-Script

      1. # apt-get install --reinstall openmediavault
      Thx for the hint. did an omv-aptclean and then "apt-get install --reinstall openmediavault"


      apt-get install --reinstall openmediavault
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
      1 not fully installed or removed.
      After this operation, 0 B of additional disk space will be used.
      E: Internal Error, No file name for openmediavault:amd64


      Strangely the "faulty" version is already installed:
      omv-sysinfo
      ================================================================================
      = OS/Debian information
      ================================================================================
      No LSB modules are available.
      Distributor ID: Debian
      Description: Debian GNU/Linux 9.5 (stretch)
      Release: 9.5
      Codename: stretch


      ================================================================================
      = openmediavault information
      ================================================================================
      Release: 4.1.13-1
      Codename: Arrakis
    • Please post the output of the file /usr/lib/python3/dist-packages/openmediavault/confdbadm.py
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • What do you mean by Output ?

      cat /usr/lib/python3/dist-packages/openmediavault/confdbadm.py
      # -*- coding: utf-8 -*-
      #
      # This file is part of OpenMediaVault.
      #
      # @license gnu.org/licenses/gpl.html GPL Version 3
      # @author Volker Theile <volker.theile@openmediavault.org>
      # @copyright Copyright (c) 2009-2018 Volker Theile
      #
      # OpenMediaVault is free software: you can redistribute it and/or modify
      # it under the terms of the GNU General Public License as published by
      # the Free Software Foundation, either version 3 of the License, or
      # any later version.
      #
      # OpenMediaVault is distributed in the hope that it will be useful,
      # but WITHOUT ANY WARRANTY; without even the implied warranty of
      # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      # GNU General Public License for more details.
      #
      # You should have received a copy of the GNU General Public License
      # along with OpenMediaVault. If not, see <gnu.org/licenses/>.
      __all__ = ["ICommand"]


      import abc
      import os
      import argparse
      import shutil
      import json
      import re
      import sys
      import tempfile
      import openmediavault
      import openmediavault.config.datamodel
      import openmediavault.string



      class ICommand(metaclass=abc.ABCMeta): # lgtm[py/syntax-error]
      @abc.abstractproperty
      def description(self):
      """
      Get the module description.
      """


      @abc.abstractmethod
      def execute(self, *args):
      """
      Execute the command.
      :param args: The command arguments.
      :returns: Returns the return code.
      """



      class CommandHelper:
      _backup_path = None


      def mkBackup(self): # pylint: disable=invalid-name
      """
      .. deprecated:: 5.0
      """
      return self.create_backup()


      def create_backup(self):
      """
      Create a backup of the configuration database.
      :returns: Returns the path of the backup file, otherwise None.
      """
      config_path = openmediavault.getenv("OMV_CONFIG_FILE")
      if not os.path.exists(config_path):
      self._backup_path = False
      return None
      (fh, self._backup_path) = tempfile.mkstemp()
      shutil.copy(config_path, self._backup_path)
      return self._backup_path


      def unlinkBackup(self): # pylint: disable=invalid-name
      """
      .. deprecated:: 5.0
      """
      return self.unlink_backup()


      def unlink_backup(self):
      """
      Unlink the backup of the configuration database.
      """
      if self._backup_path is None:
      raise RuntimeError("No configuration backup exists.")
      if not self._backup_path:
      return
      os.unlink(self._backup_path)
      self._backup_path = None


      def rollbackChanges(self): # pylint: disable=invalid-name
      """
      .. deprecated:: 5.0
      """
      return self.rollback_changes()


      def rollback_changes(self):
      """
      Rollback all changes in the configuration database.
      """
      if self._backup_path is None:
      raise RuntimeError("No configuration backup exists.")
      if not self._backup_path:
      return
      shutil.copy(
      self._backup_path, openmediavault.getenv("OMV_CONFIG_FILE")
      )


      def argparse_is_uuid4(self, arg):
      """
      Check if the specified value is a valid UUID4.
      :param arg: The value to check.
      :returns: The specified value.
      :raises argparse.ArgumentTypeError:
      """
      if not openmediavault.string.is_uuid4(arg):
      raise argparse.ArgumentTypeError("No valid UUID4.")
      return arg


      def argparse_is_json(self, arg):
      """
      Check if the specified value is a valid JSON string.
      :param arg: The value to check.
      :returns: The specified value as Python dictionary.
      :raises argparse.ArgumentTypeError:
      """
      if not openmediavault.string.is_json(arg):
      raise argparse.ArgumentTypeError("No valid JSON.")
      return json.loads(arg)


      def argparse_is_json_stdin(self, arg):
      """
      Check if the specified value is a valid JSON string. Loads the
      data from STDIN if '-' is given.
      :param arg: The value to check.
      :returns: The specified value as Python dictionary.
      :raises argparse.ArgumentTypeError:
      """
      if arg == "-":
      arg = sys.stdin.read()
      return self.argparse_is_json(arg)


      def argparse_is_datamodel_id(self, arg):
      """
      Check if the specified value is a valid datamodel ID.
      Example: conf.service.ftp
      :param arg: The value to check.
      :returns: The specified value.
      :raises argparse.ArgumentTypeError:
      """
      if not re.match(r'^conf(\..+)?$', arg):
      raise argparse.ArgumentTypeError("No valid data model ID.")
      if "conf" == arg:
      return arg
      try:
      openmediavault.config.Datamodel(arg)
      except Exception as e:
      raise argparse.ArgumentTypeError(str(e))
      return arg


      OR :
      /usr/lib/python3/dist-packages/openmediavault/confdbadm.py
      -bash: /usr/lib/python3/dist-packages/openmediavault/confdbadm.py: Permission denied

      OR :

      root@openmediavault:~# python /usr/lib/python3/dist-packages/openmediavault/confdbadm.py
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/openmediavault/confdbadm.py", line 25, in <module>
      import argparse
      File "/usr/lib/python3.5/argparse.py", line 87, in <module>
      import copy as _copy
      File "/usr/lib/python3.5/copy.py", line 51, in <module>
      import types
      File "/usr/lib/python3.5/types.py", line 166, in <module>
      import functools as _functools
      File "/usr/lib/python3.5/functools.py", line 21, in <module>
      from collections import namedtuple
      ImportError: cannot import name 'namedtuple'
    • Hmmm, the Python code is the correct one, so i really don't understand the problem here. I can not reproduce this behaviour. To prevent this various unit tests have been added in the past.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • after the last "omv-update" i got the slightly fiffernt error msg:



      After this operation, 0 B of additional disk space will be used.
      Setting up openmediavault (4.1.13-1) ...
      Updating configuration database ...
      ERROR: Failed to create the default configuration: 'Command' object has no attribute 'create_backup'
      Traceback (most recent call last):
      File "/usr/share/openmediavault/confdbadm/commands.d/create.py", line 65, in execute
      self.create_backup()
      AttributeError: 'Command' object has no attribute 'create_backup'


      During handling of the above exception, another exception occurred:


      Traceback (most recent call last):
      File "/usr/share/openmediavault/confdbadm/commands.d/create.py", line 87, in execute
      self.rollback_changes()
      AttributeError: 'Command' object has no attribute 'rollback_changes'


      During handling of the above exception, another exception occurred:


      Traceback (most recent call last):
      File "/usr/sbin/omv-confdbadm", line 74, in <module>
      sys.exit(main())
      File "/usr/sbin/omv-confdbadm", line 70, in main
      return cmd_inst.execute(*sys.argv)
      File "/usr/share/openmediavault/confdbadm/commands.d/create.py", line 90, in execute
      self.unlink_backup()
      AttributeError: 'Command' object has no attribute 'unlink_backup'
      dpkg: error processing package openmediavault (--configure):
      subprocess installed post-installation script returned error exit status 1
      dpkg: dependency problems prevent configuration of openmediavault-docker-gui:
      openmediavault-docker-gui depends on openmediavault (>= 4.0.5); however:
      Package openmediavault is not configured yet.

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

    • Sorry, can't reproduce this error and it seems you're the only one having this issue. The problem is that based on your information all files are copied to the correct directories during the package update, so i'm really out of ideas what happens here.

      The last idea coming into mind is this:

      Shell-Script

      1. # rm /usr/lib/python3/dist-packages/openmediavault/__pycache__/*
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Did try again to go from "scratch"

      #Omv-aptclean

      #apt download openmediavault

      No errors at all

      Then


      # apt install --reinstall ./openmediavault_4.1.13-1_all.deb
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Note, selecting 'openmediavault' instead of './openmediavault_4.1.13-1_all.deb'
      0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
      4 not fully installed or removed.
      After this operation, 0 B of additional disk space will be used.
      E: Internal Error, No file name for openmediavault:amd64

      So why did apt not use the dwl package ?
    • votdev wrote:

      Sorry, can't reproduce this error and it seems you're the only one having this issue. The problem is that based on your information all files are copied to the correct directories during the package update, so i'm really out of ideas what happens here.

      The last idea coming into mind is this:

      Shell-Script

      1. # rm /usr/lib/python3/dist-packages/openmediavault/__pycache__/*

      Hi Votdev,

      so "fixed" the problem temporarily by downgrading to omv 4.1.12 . The downgrade went through without any problems.

      even the upgradees for omv-extra and omv docker went smoothly.

      So my guess is 13.1 & python version are the problem.
    • It seems you're the only one having this problem. I do not have any more ideas how this could happen, i can't reproduce this. I think you have to reinstall to fix it.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Users Online 1

      1 Guest