Skip to content

Commit

Permalink
Avoid looping over remote resource provisioned flag merge
Browse files Browse the repository at this point in the history
As we purge the service status.json after provisioned flag merge,
the daemon retains the last known provisioned flag mtime and
unduly loops over remerge.

Also update the cached provisoned flag mtime, so the retained
value is up-to-date and we can skip the merge on the next loop
iterations.
  • Loading branch information
cvaroqui committed Oct 16, 2017
1 parent a8dc628 commit d412888
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/osvcd_mon.py
Expand Up @@ -1637,6 +1637,7 @@ def merge_hb_data_provision(self):
svc.svcname, resource.rid, str(remote.state),
nodename)
resource.write_is_provisioned_flag(remote.state, remote.mtime)
shared.CLUSTER_DATA[rcEnv.nodename]["services"]["status"][svc.svcname]["resources"][resource.rid]["provisioned"]["mtime"] = remote.mtime
changed = True
if changed:
svc.purge_status_data_dump()
Expand Down

0 comments on commit d412888

Please sign in to comment.