nrpe.py's NRPE.write() should only restart nagios-nrpe-server on change
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Unassigned |
Bug Description
With reactive charms and update-status, it seems this NRPE.write() bit of code could be exercised over and over. As a result, nagios-nrpe-server gets restarted over and over:
| Apr 8 05:58:32 ip-10-187-27-67 nrpe[9592]: Caught SIGTERM - shutting down...
| Apr 8 05:58:32 ip-10-187-27-67 nrpe[9592]: Daemon shutdown
| Apr 8 06:03:32 ip-10-187-27-67 nrpe[10345]: Caught SIGTERM - shutting down...
| Apr 8 06:03:32 ip-10-187-27-67 nrpe[10345]: Daemon shutdown
| Apr 8 06:08:31 ip-10-187-27-67 nrpe[11085]: Caught SIGTERM - shutting down...
| Apr 8 06:08:31 ip-10-187-27-67 nrpe[11085]: Daemon shutdown
| Apr 8 06:13:32 ip-10-187-27-67 nrpe[12469]: Caught SIGTERM - shutting down...
| Apr 8 06:13:32 ip-10-187-27-67 nrpe[12469]: Daemon shutdown
| Apr 8 06:18:31 ip-10-187-27-67 nrpe[13233]: Caught SIGTERM - shutting down...
| Apr 8 06:18:31 ip-10-187-27-67 nrpe[13233]: Daemon shutdown
| Apr 8 06:23:32 ip-10-187-27-67 nrpe[14037]: Caught SIGTERM - shutting down...
| Apr 8 06:23:32 ip-10-187-27-67 nrpe[14037]: Daemon shutdown
I think NRPE.write() should check that the configs it's writing out differs to the one currently there and if so, then restart nagios-nrpe-server.