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

hotsos processing crashes when duplicate config option in the nova.conf are found #899

Closed wilkmar closed 3 weeks ago

wilkmar commented 3 weeks ago

hotsos 1.18+1314~ubuntu22.04.1 sos report from case: 00384583, update 5.06.2024, 20:31

The /etc/nova/nova.conf contains legitimate double entry 'reserved_huge_pages' (it's allowed to have more than one of those [1])

INFO: analysing sosreport sosreport-compute3-2024-06-05-xtnwozb
INFO: analysing -
Exception running plugins: While reading from 'sosreport-compute3-2024-06-05-xtnwozb/etc/nova/nova.conf' [line 35]: option 'reserved_huge_pages' in section 'DEFAULT' already exists
See temp log file for possible details: /tmp/tmpel9_60kthotsos.log

Traceback (most recent call last):
  File "/usr/bin/hotsos", line 33, in <module>
    sys.exit(load_entry_point('hotsos==1.18+1314.ubuntu22.4.1', 'console_scripts', 'hotsos')())
  File "/usr/lib/python3/dist-packages/hotsos/cli.py", line 369, in main
    cli(prog_name='hotsos')
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/hotsos/cli.py", line 339, in cli
    client.run()
  File "/usr/lib/python3/dist-packages/hotsos/client.py", line 259, in run
    content = plugintools.PluginRunner(plugin).run()
  File "/usr/lib/python3/dist-packages/hotsos/core/plugintools.py", line 397, in run
    return self._run(global_searcher)
  File "/usr/lib/python3/dist-packages/hotsos/core/plugintools.py", line 432, in _run
    inst = runner()
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/common.py", line 34, in __init__
    self.nova = NovaBase()
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/nova.py", line 30, in __init__
    super().__init__('nova', *args, **kwargs)
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/openstack.py", line 541, in __init__
    self.project = OSTProjectCatalog()[name]
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/openstack.py", line 446, in __init__
    self.add('nova', config={'main': 'nova.conf'},
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/openstack.py", line 517, in add
    self._projects[name] = OSTProject(name, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/hotsos/core/plugins/openstack/openstack.py", line 322, in __init__
    self.config[label] = OpenstackConfig(path)
  File "/usr/lib/python3/dist-packages/hotsos/core/host_helpers/config.py", line 88, in __init__
    self._load()
  File "/usr/lib/python3/dist-packages/hotsos/core/host_helpers/config.py", line 156, in _load
    if self.path not in self.config.read(self.path):
  File "/usr/lib/python3.10/configparser.py", line 699, in read
    self._read(fp, filename)
  File "/usr/lib/python3.10/configparser.py", line 1098, in _read
    raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from 'sosreport-compute3-2024-06-05-xtnwozb/etc/nova/nova.conf' [line 35]: option 'reserved_huge_pages' in section 'DEFAULT' already exists

[1] https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.reserved_huge_pages