Charm writes out check_daily_store_kpi-state-fileage before nagios hostname can be determined

Bug #1735336 reported by William Grant
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent

Bug Description

The SCA charm's enable_daily_store_kpi only executes once, when the nrpe-external-master relation is available, the service is active and set up, the unit is the leader, and enable_daily_store_kpi has not yet run. This can result in the check_daily_store_kpi-state-fileage check being written out to /var/lib/nagios/export with a bad hostname, as charmhelpers.contrib.charmsupport.nrpe.NRPE only calculates the right hostname one nagios_hostname has been set by the other end of the nrpe-external-master relation, but the function can run before that happens. Nagios updates then fail until the check export is corrected or removed.

We should probably execute enable/disable_daily_store_kpi as appropriate on every hook except update-status, matching the behaviour of more modern charms and ensuring that relation and config changes are respected, without adding disruptive restarts on regular operations like update-status.

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.