Monasca agent is not thread safe
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Monasca |
Triaged
|
Undecided
|
David Schroeder |
Bug Description
The services_checks class of the monasca agent uses the threading library but has no thread safety built in. This can cause a number of unpredictable behaviors. Below are some examples:
Throwing Errors:
The main thread of the agent runs _clean which loops through jobs_status, but this dictionary can be changed by other threads in _process if there is an error. This results in an error because _clean is querying on a key that no longer exists in the dictionary. This is an easy bug to hit and we have hit several times while using the nagios plugin.
Lost Data:
In the submit_metric method of aggregator, if "context not in self.metrics", self.metrics[
Changed in monasca: | |
assignee: | nobody → David Schroeder (david-schroeder) |
status: | New → Triaged |