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

openATTIC should create /var/lock/openattic if it doesn't exist

    XMLWordPrintable

    Details

      Description

      That's not a documentation issue, or a packaging issue. Instead, oA should create the folder, if it doesn't exists.

      Traceback:
      File "/home/vagrant/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
        111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/home/vagrant/env/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
        57.         return view_func(*args, **kwargs)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/viewsets.py" in view
        79.             return self.dispatch(request, *args, **kwargs)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
        403.             response = self.handle_exception(exc)
      File "/home/vagrant/env/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
        400.             response = handler(request, *args, **kwargs)
      File "/home/vagrant/openattic/backend/rest/multinode/handlers.py" in list
        57.                 results.append(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/openattic/backend/volumes/restapi.py" in to_native
        70.         data.update(serializers.HyperlinkedModelSerializer.to_native(self, 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
        1041.         value = getattr(self.parent, self.method_name)(obj)
      File "/home/vagrant/openattic/backend/volumes/restapi.py" in get_status
        88.         return obj.get_status()
      File "/home/vagrant/openattic/backend/volumes/models.py" in get_status
        484.         if self.is_locked:
      File "/home/vagrant/openattic/backend/volumes/models.py" in is_locked
        201.             with Lockfile(self.lockfile, 0):
      File "/home/vagrant/openattic/backend/systemd/lockutils.py" in __enter__
        188.         self.lock = acquire_lock(self.lockfile, self.max_wait)
      File "/home/vagrant/openattic/backend/systemd/lockutils.py" in acquire_lock
        54.         os.mkdir("/var/lock/openattic", 0755)
      
      Exception Type: OSError at /api/disks
      Exception Value: [Errno 13] Permission denied: '/var/lock/openattic'
      
      LANG=C ls /var/lock/openattic
      ls: cannot access /var/lock/openattic: No such file or directory
      (env)vagrant@vagrant-openSUSE-Leap:~> 
      
      (env)vagrant@vagrant-openSUSE-Leap:~> cat /etc/os-release 
      NAME="openSUSE Leap"
      VERSION="42.1"
      VERSION_ID="42.1"
      PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
      ID=opensuse
      ANSI_COLOR="0;32"
      CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
      BUG_REPORT_URL="https://bugs.opensuse.org"
      HOME_URL="https://opensuse.org/"
      ID_LIKE="suse"
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: