ModuleNotFoundError in GraylogApi

Bug #2003795 reported by Konstantinos Kaskavelis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graylog Charm
Fix Released
High
Sudeep Bhandari

Bug Description

SQA team has a failed test run in a yoga-focal run, in lma-maas layer where nagios validator fails in check-graylog-health due to:

Exception: Errors found in nagios validation:
- check: check-graylog-health
  id: '116'
  results:
    check-output: ''
    return-code: 0
    stderr: "Traceback (most recent call last):\n File \"/usr/local/lib/nagios/plugins/check_graylog_health.py\"\
      , line 15, in <module>\n from charms.layer.graylog.api import GraylogApi,\
      \ get_ignore_indexer_failures_file\nModuleNotFoundError: No module named 'charms'\n\
      \nDuring handling of the above exception, another exception occurred:\n\nTraceback\
      \ (most recent call last):\n File \"/usr/local/lib/nagios/plugins/check_graylog_health.py\"\
      , line 18, in <module>\n from api import GraylogApi, get_ignore_indexer_failures_file\n\
      \ File \"/usr/local/lib/nagios/plugins/api.py\", line 7, in <module>\n from\
      \ tenacity import retry\nModuleNotFoundError: No module named 'tenacity'\n"
  status: completed
  timing:
    completed: 2023-01-23 18:37:15 +0000 UTC
    enqueued: 2023-01-23 18:37:14 +0000 UTC
    started: 2023-01-23 18:37:14 +0000 UTC
  unit: nrpe/3
- check: check-graylog-health
  id: '132'
  results:
    check-output: ''
    return-code: 0
    stderr: "Traceback (most recent call last):\n File \"/usr/local/lib/nagios/plugins/check_graylog_health.py\"\
      , line 15, in <module>\n from charms.layer.graylog.api import GraylogApi,\
      \ get_ignore_indexer_failures_file\nModuleNotFoundError: No module named 'charms'\n\
      \nDuring handling of the above exception, another exception occurred:\n\nTraceback\
      \ (most recent call last):\n File \"/usr/local/lib/nagios/plugins/check_graylog_health.py\"\
      , line 18, in <module>\n from api import GraylogApi, get_ignore_indexer_failures_file\n\
      \ File \"/usr/local/lib/nagios/plugins/api.py\", line 7, in <module>\n from\
      \ tenacity import retry\nModuleNotFoundError: No module named 'tenacity'\n"
  status: completed
  timing:
    completed: 2023-01-23 18:37:17 +0000 UTC
    enqueued: 2023-01-23 18:37:16 +0000 UTC
    started: 2023-01-23 18:37:16 +0000 UTC
  unit: nrpe/7

From ./3/baremetal/var/log/juju/unit-nrpe-3.log we see that:

2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 Traceback (most recent call last):
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 File "/usr/local/lib/nagios/plugins/check_graylog_health.py", line 15, in <module>
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 from charms.layer.graylog.api import GraylogApi, get_ignore_indexer_failures_file
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 ModuleNotFoundError: No module named 'charms'
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 During handling of the above exception, another exception occurred:
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 Traceback (most recent call last):
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 File "/usr/local/lib/nagios/plugins/check_graylog_health.py", line 18, in <module>
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 from api import GraylogApi, get_ignore_indexer_failures_file
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 File "/usr/local/lib/nagios/plugins/api.py", line 7, in <module>
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 from tenacity import retry
2023-01-23 18:37:14 WARNING unit.nrpe/3.run-nrpe-check logger.go:60 ModuleNotFoundError: No module named 'tenacity'

Test run:

https://solutions.qa.canonical.com/testruns/testRun/5008a79a-fb23-4fc9-8a00-f9fbd6fdad55

Logs:

https://oil-jenkins.canonical.com/artifacts/5008a79a-fb23-4fc9-8a00-f9fbd6fdad55/index.html

Tags: cdo-qa

Related branches

Changed in charm-graylog:
assignee: nobody → Sudeep Bhandari (sudeephb)
Changed in charm-graylog:
status: New → In Progress
Revision history for this message
Mert Kirpici (mertkirpici) wrote (last edit ):

Revision that contains the fix is available on the edge and candidate channels. Could you help to confirm that this issue is resolved?

Changed in charm-graylog:
status: In Progress → Fix Committed
Eric Chen (eric-chen)
Changed in charm-graylog:
milestone: none → 23.01
importance: Undecided → High
Changed in charm-graylog:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.