docker-registry hook fail nrpe-external-master-relation-joined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Docker Registry Charm |
New
|
Undecided
|
Unassigned |
Bug Description
when adding relation between docker-registry and nrpe charm, docker-registry failed with error
hook failed: "nrpe-external-
The debug log shows
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
nagios.
File "/var/lib/
unit = unit.replace('/', '-')
AttributeError: 'NoneType' object has no attribute 'replace'
In docker-registry code line 376 setup_nagios function has following content
check_args = {}
if charm_config.
if charm_config.
nagios.
The check_args dict doesn't contain the unit argument that nagios.add_check is expecting , cause the hook fail
# line 21 in var/lib/
def add_check(self, args, name=None, description=None, context=None,
unit = unit.replace('/', '-')
Charm version:
docker-registry 1.24/stable , rev 24
nrpe : latest/stable rev 96