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

Internal Server Error when creating Ceph pool if Icinga verify failes

    XMLWordPrintable

    Details

      Description

      This bug is not about the fact that icinga verify failes, because I'm not totally sure, I'm using the correct Icinga settings. Instead, this bug is about the internal server error, which is caused by icinga verify

      openattic.log:

      [28/Sep/2016 12:28:43] "GET /api/ceph/60baf4c9-def7-3646-b347-5c349b3a8110/pools HTTP/1.1" 200 17785
      [28/Sep/2016 12:29:19] "POST /api/ceph/60baf4c9-def7-3646-b347-5c349b3a8110/pools HTTP/1.1" 400 17880
      Internal Server Error: None
      Traceback (most recent call last):
        File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/views.py", line 400, in dispatch
          response = handler(request, *args, **kwargs)
        File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/mixins.py", line 54, in create
          self.object = serializer.save(force_insert=True)
        File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/serializers.py", line 595, in save
          self.save_object(self.object, **kwargs)
        File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/serializers.py", line 1037, in save_object
          obj.save(**kwargs)
        File "/home/vagrant/openattic/backend/ceph/models.py", line 440, in save
          self._update_nagios_configs()
        File "/home/vagrant/openattic/backend/ceph/models.py", line 465, in _update_nagios_configs
          nagios.restart_service()
        File "/home/vagrant/env/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
          return self._proxy_method(*args, **keywords)
        File "/home/vagrant/env/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
          **keywords)
        File "/home/vagrant/env/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
          message, timeout)
      DBusException: org.freedesktop.DBus.Python.SystemError: Traceback (most recent call last):
        File "/home/vagrant/env/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
          retval = candidate_method(self, *args, **keywords)
        File "/home/vagrant/openattic/backend/systemd/plugins.py", line 51, in loggedfunc
          return func(*args, **kwargs)
        File "/home/vagrant/openattic/backend/systemd/plugins.py", line 99, in wrapper
          return meth(self, *args, **kwargs)
        File "/home/vagrant/openattic/backend/nagios/systemapi.py", line 66, in restart_service
          invoke([nagios_settings.BINARY_NAME, "--verify-config", nagios_settings.NAGIOS_CFG_PATH])
        File "/home/vagrant/openattic/backend/systemd/procutils.py", line 119, in invoke
          raise SystemError("%s failed: %s" % (cmdline, procerr if procerr else procout))
      SystemError: "icinga" "--verify-config" "/etc/icinga/icinga.cfg" failed: 
      
      [28/Sep/2016 12:29:29] "POST /api/ceph/60baf4c9-def7-3646-b347-5c349b3a8110/pools HTTP/1.1" 500 113815
      

      Internal Server Error

      Traceback:
      File "/home/vagrant/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
        137.                 response = response.render()
      File "/home/vagrant/env/lib/python2.7/site-packages/django/template/response.py" in render
        103.             self.content = self.rendered_content
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/response.py" in rendered_content
        63.         ret = renderer.render(self.data, media_type, context)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/renderers.py" in render
        606.         context = self.get_context(data, accepted_media_type, renderer_context)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/renderers.py" in get_context
        583.             'post_form': self.get_rendered_html_form(view, 'POST', request),
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/renderers.py" in get_rendered_html_form
        463.             data = serializer.data
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/serializers.py" in data
        572.                 self._data = self.to_native(obj)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/serializers.py" in to_native
        351.             value = field.field_to_native(obj, field_name)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/fields.py" in field_to_native
        336.         return super(WritableField, self).field_to_native(obj, field_name)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/fields.py" in field_to_native
        207.             value = get_component(value, component)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/fields.py" in get_component
        58.         val = getattr(obj, attr_name)
      
      Exception Type: AttributeError at /api/ceph/60baf4c9-def7-3646-b347-5c349b3a8110/pools
      Exception Value: 'CephPool' object has no attribute 'id'
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            swagner Sebastian Wagner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: