Skip to content

Commit

Permalink
Refuse to set service monitor targets for dummies, wrappers, scalers …
Browse files Browse the repository at this point in the history
…and slavers

The orchestrator won't know how to reach the target state for these, so
better never setting it.

Those service types are identified by a "no resources" rule.
  • Loading branch information
cvaroqui committed Sep 5, 2018
1 parent 8d64e06 commit 46efd5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/osvcd_shared.py
Expand Up @@ -418,6 +418,10 @@ def set_smon(self, svcname, status=None, local_expect=None,
global_expect=None, reset_retries=False,
stonith=None):
global SMON_DATA
instance = self.get_service_instance(svcname, rcEnv.nodename)
if instance and not instance.get("resources", {}):
# skip slavers, wrappers, scalers
return
with SMON_DATA_LOCK:
if svcname not in SMON_DATA:
SMON_DATA[svcname] = Storage({
Expand Down

0 comments on commit 46efd5a

Please sign in to comment.