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
30 stars 37 forks source link

error: "unable to determine eol info for unknown release name 'pike'" #881

Closed mustafakemalgilor closed 1 month ago

mustafakemalgilor commented 1 month ago

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

2024-05-22 13:10:58,521 113086 DEBUG hotsos.plugin.openstack [-] instantiating class hotsos.core.plugins.openstack.OpenstackChecksBase (from_cache=False)
2024-05-22 13:10:58,614 113086 DEBUG hotsos.plugin.openstack [-] release name(s) found: pike
2024-05-22 13:10:58,614 113086 WARNING hotsos.plugin.openstack [-] unable to determine eol info for unknown release name 'pike'
2024-05-22 13:10:58,614 113086 DEBUG hotsos.plugin.openstack [-] ops=[['le', 0]], input=None
2024-05-22 13:10:58,614 113086 DEBUG hotsos.plugin.openstack [-] op=le, input=None, expected=0, force_expected=True
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] failed to apply operator 'le'
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] function '_result' raised exception: '<=' not supported between instances of 'NoneType' and 'int'
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] requires.YRequirementTypeProperty.result raised the following
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] caught exception when running requirement: '<=' not supported between instances of 'NoneType' and 'int'
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] something went wrong while executing check is_eol
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 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 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 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/property.py", line 22, in _result
    result = self.apply_ops(self.ops, opinput=actual)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 158, in apply_ops
    opinput = self._apply_op(op[0], opinput=opinput, expected=expected,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 113, in _apply_op
    return getattr(operator, op)(opinput, expected)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
2024-05-22 13:10:58,614 113086 ERROR hotsos.plugin.openstack [-] something went wrong when executing decision
Traceback (most recent call last):
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/conclusions.py", line 154, in result
    result = item.result
             ^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/functools.py", line 995, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  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 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 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 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/property.py", line 22, in _result
    result = self.apply_ops(self.ops, opinput=actual)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 158, in apply_ops
    opinput = self._apply_op(op[0], opinput=opinput, expected=expected,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 113, in _apply_op
    return getattr(operator, op)(opinput, expected)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
2024-05-22 13:10:58,615 113086 ERROR hotsos.plugin.openstack [-] caught exception when running scenario eol:
Traceback (most recent call last):
  File "/workspace/github/hotsos/hotsos/core/ycheck/scenarios.py", line 150, in run
    self._run_scenario_conclusion(scenario, issue_mgr)
  File "/workspace/github/hotsos/hotsos/core/ycheck/scenarios.py", line 122, in _run_scenario_conclusion
    if conc.reached(scenario.checks):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/conclusions.py", line 194, in reached
    result = self.decision.result
             ^^^^^^^^^^^^^^^^^^^^
  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/conclusions.py", line 154, in result
    result = item.result
             ^^^^^^^^^^^
  File "/workspace/github/hotsos/.tox/py3/lib/python3.12/site-packages/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/functools.py", line 995, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  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 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 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 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/property.py", line 22, in _result
    result = self.apply_ops(self.ops, opinput=actual)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 158, in apply_ops
    opinput = self._apply_op(op[0], opinput=opinput, expected=expected,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/github/hotsos/hotsos/core/ycheck/engine/properties/requires/common.py", line 113, in _apply_op
    return getattr(operator, op)(opinput, expected)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
dosaboy commented 1 month ago

The reason for this is because our release info only covers releases that are still supported to some extent (or were at the time of writing). I believe the correct way to fix this is to have the scenario report the release as EOL if not found.