nrpe hook fails "nrpe-external-master-relation-joined"

Bug #2017150 reported by Bas de Bruijne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NRPE Charm
Invalid
Undecided
Unassigned
OpenStack Nova Cloud Controller Charm
Invalid
Undecided
Unassigned

Bug Description

In testrun https://solutions.qa.canonical.com/v2/testruns/ffcf3ea8-028c-4fde-88d7-3b00fcf07d66, all the nrpe units on the OpenStack layer fail with:

====
hook failed: "nrpe-external-master-relation-joined"
====

in the debug log we see:

====
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe-external-master-relation-joined", line 6, in <module>
    services.manage()
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/services.py", line 103, in manage
    manager.manage()
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/charmhelpers/core/services/base.py", line 136, in manage
    self.reconfigure_services()
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/charmhelpers/core/services/base.py", line 190, in reconfigure_services
    self.fire_event('data_ready', service_name)
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/charmhelpers/core/services/base.py", line 237, in fire_event
    callback(service_name)
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe_utils.py", line 213, in update_monitor_relation
    relation_id=rid, relation_settings=monitor_relation.provide_data()
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe_helpers.py", line 271, in provide_data
    "monitors": self.get_monitors(),
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe_helpers.py", line 232, in get_monitors
    self.get_principal_monitors(),
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe_helpers.py", line 213, in get_principal_monitors
    return self.principal_relation.get_monitors()
  File "/var/lib/juju/agents/unit-nrpe-86/charm/hooks/nrpe_helpers.py", line 340, in get_monitors
    monitors.add_monitors(yaml.load(rel["monitors"]), "principal")
TypeError: load() missing 1 required positional argument: 'Loader'
====

Crashdumps and configs can be found here:
https://oil-jenkins.canonical.com/artifacts/ffcf3ea8-028c-4fde-88d7-3b00fcf07d66/index.html

Revision history for this message
Bas de Bruijne (basdbruijne) wrote :

This test run is using latest/candidate

Revision history for this message
Bas de Bruijne (basdbruijne) wrote :

Switching to latest/stable did not solve this issue. Looking at the juju status output (https://oil-jenkins.canonical.com/job/fce_build/23514//consoleFull towards the bottom), it looks like it depends on the primary application that nrpe is deployed to. I am wondering if there is a change introduced in OpenStack/antelope that interferes with nrpe. If a newer version of python-yaml is installed there then that would indeed uncover this issue.

I am tagging nova-cloud-controller on this bug (even though there are many more charms where this shows up).

Revision history for this message
Bas de Bruijne (basdbruijne) wrote :

It looks like this bug was fixed already with https://git.launchpad.net/charm-nrpe/commit/?id=1fbc315993a936ed0f89dc481f1bfa2fa82aec8a. I can't find if it is released already, but I will switch to nrpe latest/edge to try.

Changed in charm-nrpe:
status: New → Invalid
Changed in charm-nova-cloud-controller:
status: New → Invalid
Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 2017150] Re: nrpe hook fails "nrpe-external-master-relation-joined"

On Fri, 2023-04-21 at 16:27 +0000, Bas de Bruijne wrote:
> It looks like this bug was fixed already with
> https://git.launchpad.net/charm-
> nrpe/commit/?id=1fbc315993a936ed0f89dc481f1bfa2fa82aec8a. I can't find
> if it is released already, but I will switch to nrpe latest/edge to try.

yes, this fix is available in latest/edge

Revision history for this message
Eric Chen (eric-chen) wrote :

I push the patch to latest/candidate. You can verify it again. If there is no problem, it's probably we will push it to latest/stable next week.

Changed in charm-nrpe:
milestone: none → 23.04
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.