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

Internal Server Error: Unhandled PermissionError: [errno 1] error listing images

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6.1
    • Fix Version/s: None
    • Component/s: None

      Description

      When trying to access the `RBDs` page while using a Ceph key which doesn't allow you to list RBDs, an internal error toasty is shown in the frontend accompanied by the information, that the

      Ceph RBD resources could not be loaded.

      I'd at least expect to see something more user friendly than the internal-server-error-toasty. Better would be to give the user the information, that the requested ressource couldn't be loaded because there's a permission problem with the used Ceph key.

      This is the key used to test this behavior:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      root@pn-seahorse /etc/ceph # cat ceph.client.storage.keyring
      [client.storage]
          key = AQDEwrtZAAAAABAAwqIFAdBdprVTSrKakLl18g==
          caps mon = "allow rw"
      root@pn-seahorse /etc/ceph #
      

      Note that this was the only key accessible by openATTIC, so openATTIC chose to use it.

      2017-12-14 13:00:01,011 5614 mod_wsgi ERROR exception#custom_handler - Internal Server Error: None
      Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/rest_framework/views.py", line 400, in dispatch
          response = handler(request, *args, **kwargs)
        File "/usr/lib/python2.7/site-packages/rest_framework/mixins.py", line 92, in list
          page = self.paginate_queryset(self.object_list)
        File "/usr/lib/python2.7/site-packages/rest_framework/generics.py", line 158, in paginate_queryset
          page_number = paginator.validate_number(page)
        File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 39, in validate_number
          if number > self.num_pages:
        File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 86, in _get_num_pages
          if self.count == 0 and not self.allow_empty_first_page:
        File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 72, in _get_count
          self._count = self.object_list.count()
        File "/srv/openattic/backend/nodb/models.py", line 202, in count
          return len(self._filtered_data)
        File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 49, in __get__
          res = instance.__dict__[self.func.__name__] = self.func(instance)
        File "/srv/openattic/backend/nodb/models.py", line 164, in _filtered_data
          filtered = [obj for obj in self._data()
        File "/srv/openattic/backend/nodb/models.py", line 93, in _data
          objects = self.model.get_all_objects(context, query=self._query)
        File "/srv/openattic/backend/ceph/models.py", line 845, in get_all_objects
          for (image_name, pool) in rbd_name_pools:
        File "/srv/openattic/backend/ceph/models.py", line 841, in <genexpr>
          for pool
        File "/srv/openattic/backend/ceph/librados.py", line 1178, in list
          return self._call_librados(_list)
        File "/srv/openattic/backend/ceph/librados.py", line 1292, in _call_librados
          return call_librados(self.fsid, func, cmd, timeout)
        File "/srv/openattic/backend/ceph/librados.py", line 439, in call_librados
          return run_in_external_process(with_client, cmd_name, timeout)
        File "/srv/openattic/backend/utilities.py", line 163, in run_in_external_process
          raise res
      PermissionError: [errno 1] error listing images
      
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            pnawracay Nawracay, Patrick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: