Uploaded image for project: 'openATTIC'
  1. openATTIC
  2. OP-2173

"oaconfig install" after update fails with icinga configuration error

    XMLWordPrintable

    Details

    • Sprint:
      Sprint 23 - RGW, Sprint 25, Sprint 26 (Milestone 9)

      Description

      When runningĀ oaconfig install on a SLES12 system that was upgraded from 2.0.20 to 3.0.0 (snapshot of the master as of 2017-05-11 19:00), the installation fails with the following error:

      The authentication token for 'openattic' does already exist.
      Traceback (most recent call last):
        File "manage.py", line 26, in <module>
          execute_from_command_line(sys.argv)
        File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
          utility.execute()
        File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
          self.fetch_command(subcommand).run_from_argv(self.argv)
        File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
          self.execute(*args, **options.__dict__)
        File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
          output = self.handle(*args, **options)
        File "/usr/share/openattic/sysutils/management/commands/post_install.py", line 49, in handle
          sysutils.models.post_install.send(sender=sysutils.models)
        File "/usr/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send
          response = receiver(signal=self, sender=sender, **named)
        File "/usr/share/openattic/nagios/management/__init__.py", line 33, in create_nagios
          nagios.restart_service()
        File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
          return self._proxy_method(*args, **keywords)
        File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
          **keywords)
        File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
          message, timeout)
      dbus.exceptions.DBusException: org.freedesktop.DBus.Python.SystemError: Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
          retval = candidate_method(self, *args, **keywords)
        File "/usr/share/openattic/systemd/plugins.py", line 51, in loggedfunc
          return func(*args, **kwargs)
        File "/usr/share/openattic/systemd/plugins.py", line 99, in wrapper
          return meth(self, *args, **kwargs)
        File "/usr/share/openattic/nagios/systemapi.py", line 66, in restart_service
          invoke([nagios_settings.NAGIOS_BINARY_NAME, "--verify-config", nagios_settings.NAGIOS_CFG_PATH])
        File "/usr/share/openattic/systemd/procutils.py", line 116, in invoke
          raise SystemError("%s failed: %s" % (cmdline, procerr))
      SystemError: "icinga" "--verify-config" "/etc/icinga/icinga.cfg" failed: 
      

      Running icinga --verify-config /etc/icinga/icinga.cfg manually reveals the following error:

      Processing object config file '/etc/icinga/conf.d/openattic.cfg'...
      Warning: Variable 'normal_check_interval' with value '5' is DEPRECATED. Replace it with 'check_interval'.
      Warning: Variable 'retry_check_interval' with value '1' is DEPRECATED. Replace it with 'retry_interval'.
      Warning: Variable 'normal_check_interval' with value '5' is DEPRECATED. Replace it with 'check_interval'.
      Warning: Variable 'retry_check_interval' with value '1' is DEPRECATED. Replace it with 'retry_interval'.
      Processing object config file '/etc/icinga/conf.d/openattic_contacts.cfg'...
      Processing object config file '/etc/icinga/objects/openattic_plugins.cfg'...
      Processing object config file '/etc/icinga/objects/openattic_static.cfg'...
      Processing object config file '/etc/icinga/objects/commands.cfg'...
      Processing object config file '/etc/icinga/objects/contacts.cfg'...
      Processing object config file '/etc/icinga/objects/timeperiods.cfg'...
      Processing object config file '/etc/icinga/objects/templates.cfg'...
      Processing object config file '/etc/icinga/objects/localhost.cfg'...
      Processing object config directory '/etc/icinga/modules'...
         Read object config files okay...
      
      Running pre-flight check on configuration data...
      
      Checking services...
      Error: Service check command 'check_cputime' specified in service 'CPU Time' for host 'sles12sp2' (file '/etc/icinga/conf.d/openattic.cfg', line 37) not defined anywhere!
      Error: Service check command 'check_diskstats' specified in service 'Disk stats for VBOX_HARDDISK VB8d3f8bb4-34b6115c SATA 0k' for host 'sles12sp2' (file '/etc/icinga/conf.d/openattic.cfg', line 20) not defined anywhere!
      	Checked 12 services.
      Checking hosts...
      	Checked 2 hosts.
      

      Looks like there are residual entries in the database (e.g. for the hard disk), that are not getting removed during an update?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              swagner Sebastian Wagner
              Reporter:
              lgrimmer Grimmer, Lenz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: