canonical / hotsos

Software analysis toolkit. Define checks in high-level language and leverage library to perform analysis of common Cloud applications.
Apache License 2.0
33 stars 38 forks source link

error: "failed to import and call property hotsos.core.plugins.kernel.memory.MemInfo.hugetlb_to_mem_total_percentage" #882

Closed xmkg closed 6 months ago

xmkg commented 6 months ago

Hotsos encountered an error processing a sosreport from xenial/pike environment:

2024-05-22 13:12:23,552 113086 DEBUG hotsos.plugin.kernel [-] instantiating class hotsos.core.plugins.kernel.memory.MemInfo (from_cache=False)
2024-05-22 13:12:23,552 113086 ERROR hotsos.plugin.kernel [-] failed to import and call property hotsos.core.plugins.kernel.memory.MemInfo.hugetlb_to_mem_total_percentage
Traceback (most recent call last):
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/common.py", line 442, in get_property
    _obj = getattr(_obj, _prop)
           ^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/plugins/kernel/memory.py", line 40, in __getattr__
    raise AttributeError('attribute {} not found in {}.'.
AttributeError: attribute hugetlb_to_mem_total_percentage not found in MemInfo.. Did you mean: 'mem_avail_to_mem_total_percentage'?
2024-05-22 13:12:23,552 113086 ERROR hotsos.plugin.kernel [-] function '_result' raised exception: attribute hugetlb_to_mem_total_percentage not found in MemInfo.
2024-05-22 13:12:23,552 113086 ERROR hotsos.plugin.kernel [-] requires.YPropertyVarOps.result raised the following
2024-05-22 13:12:23,552 113086 ERROR hotsos.plugin.kernel [-] caught exception when running requirement: attribute hugetlb_to_mem_total_percentage not found in MemInfo.
2024-05-22 13:12:23,553 113086 ERROR hotsos.plugin.kernel [-] something went wrong while executing check too_many_free_hugepages
Traceback (most recent call last):
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 346, in __getattribute__
    return self._get_override_attribute(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 589, in _get_override_attribute
    return super()._get_override_attribute(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 338, in _get_override_attribute
    raise AttributeError("'{}' object has no attribute '{}'"
AttributeError: 'YPropertyRequires' object has no attribute 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/checks.py", line 152, in result
    result = self.fetch_item_result(item)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/checks.py", line 37, in fetch_item_result
    result = item.result
             ^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 348, in __getattribute__
    raise exc  # pylint: disable=W0707
    ^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/requires.py", line 101, in result
    result = item.result
             ^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 348, in __getattribute__
    raise exc  # pylint: disable=W0707
    ^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 178, in result
    return self._result
           ^^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 348, in __getattribute__
    raise exc  # pylint: disable=W0707
    ^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 19, in intercept_exception_inner
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/types/varops.py", line 33, in _result
    return self._apply_ops()
           ^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/types/varops.py", line 21, in _apply_ops
    actual = self.resolve_var(self.input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/common.py", line 286, in resolve_var
    return self.context.vars.resolve(_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/vardef.py", line 28, in resolve
    value = self.get_property(value[1:])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/common.py", line 442, in get_property
    _obj = getattr(_obj, _prop)
           ^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/plugins/kernel/memory.py", line 40, in __getattr__
    raise AttributeError('attribute {} not found in {}.'.
AttributeError: attribute hugetlb_to_mem_total_percentage not found in MemInfo.. Did you mean: 'mem_avail_to_mem_total_percentage'?
2024-05-22 13:12:23,553 113086 ERROR hotsos.plugin.kernel [-] something went wrong when executing decision