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

Empty volumes list after rebooting virtual machine

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.12
    • Component/s: None
    • Labels:

      Description

      After rebooting a virtual machine the volumes list was empty and
      Firebug console displayed a traceback (see below).
      (After like two minutes, the volume items showed up in the list.
      But this makes the WebUI tests fail (every time the jenkins job runs, the machine will reboot first [stateless]) until the list contains elements again.

      Traceback:
      File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
        114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
        57.         return view_func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/rest_framework/viewsets.py" in view
        79.             return self.dispatch(request, *args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
        403.             response = self.handle_exception(exc)
      File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
        400.             response = handler(request, *args, **kwargs)
      File "/srv/openattic/backend/rest/multinode/handlers.py" in list
        57.                 results.append(serializer.data)
      File "/usr/lib/python2.7/dist-packages/rest_framework/serializers.py" in data
        572.                 self._data = self.to_native(obj)
      File "/srv/openattic/backend/volumes/restapi.py" in to_native
        298.         data.update(serializers.HyperlinkedModelSerializer.to_native(self, obj))
      File "/usr/lib/python2.7/dist-packages/rest_framework/serializers.py" in to_native
        351.             value = field.field_to_native(obj, field_name)
      File "/usr/lib/python2.7/dist-packages/rest_framework/fields.py" in field_to_native
        1041.         value = getattr(self.parent, self.method_name)(obj)
      File "/srv/openattic/backend/volumes/restapi.py" in get_status
        317.         return obj.get_status()
      File "/srv/openattic/backend/volumes/models.py" in get_status
        490.         flags = self._get_status()
      File "/srv/openattic/backend/volumes/models.py" in _get_status
        465.             pd = self.blockvolume_or_none.perfdata
      File "/srv/openattic/backend/volumes/models.py" in perfdata
        851.         if serv.last_check is None:
      File "/srv/openattic/backend/nagios/models.py" in last_check
        140.             tstamp = int(self.state["last_check"]) or self.rrd.last_check
      File "/srv/openattic/backend/nagios/models.py" in rrd
        135.         return RRD(xmlpath)
      File "/srv/openattic/backend/nagios/graphbuilder.py" in __init__
        598.         self.xml = minidom.parse(xmlpath)
      File "/usr/lib/python2.7/xml/dom/minidom.py" in parse
        1918.         return expatbuilder.parse(file)
      File "/usr/lib/python2.7/xml/dom/expatbuilder.py" in parse
        924.             result = builder.parseFile(fp)
      File "/usr/lib/python2.7/xml/dom/expatbuilder.py" in parseFile
        211.             parser.Parse("", True)
       
      Exception Type: ExpatError at /api/volumes
      Exception Value: no element found: line 1, column 0
      

      This happened again, with the following traceback: Edit: And again.

      Traceback:
      File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
        114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
        57.         return view_func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/rest_framework/viewsets.py" in view
        79.             return self.dispatch(request, *args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
        403.             response = self.handle_exception(exc)
      File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
        400.             response = handler(request, *args, **kwargs)
      File "/srv/openattic/backend/rest/multinode/handlers.py" in list
        57.                 results.append(serializer.data)
      File "/usr/lib/python2.7/dist-packages/rest_framework/serializers.py" in data
        572.                 self._data = self.to_native(obj)
      File "/srv/openattic/backend/volumes/restapi.py" in to_native
        311.         data.update(serializers.HyperlinkedModelSerializer.to_native(self, obj))
      File "/usr/lib/python2.7/dist-packages/rest_framework/serializers.py" in to_native
        351.             value = field.field_to_native(obj, field_name)
      File "/usr/lib/python2.7/dist-packages/rest_framework/fields.py" in field_to_native
        1041.         value = getattr(self.parent, self.method_name)(obj)
      File "/srv/openattic/backend/volumes/restapi.py" in get_usage
        328.         return obj.get_volume_usage()
      File "/srv/openattic/backend/volumes/models.py" in get_volume_usage
        381.                 obj.get_volume_usage(stats)
      File "/srv/openattic/backend/lvm/models.py" in get_volume_usage
        524.                 snapstats = snapshot_so.get_volume_usage()
      File "/srv/openattic/backend/volumes/models.py" in get_volume_usage
        381.                 obj.get_volume_usage(stats)
      File "/srv/openattic/backend/lvm/models.py" in get_volume_usage
        503.                 stats["bd_used"] = self.storageobj.megs * float(self.lvm_info["LVM2_DATA_PERCENT"]) / 100.
      Exception Type: ValueError at /api/volumes
      Exception Value: could not convert string to float: 
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                swagner Sebastian Wagner
                Reporter:
                lpaduano Paduano, Laura
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h