Skip to content

Commit

Permalink
Merge branch 'master' of git+ssh://www.opensvc.com/home/opensvc/opensvc
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudveron committed Oct 6, 2017
2 parents 128e7d7 + 099c94c commit 8ba3610
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/osvcd_mon.py
Expand Up @@ -500,6 +500,8 @@ def service_orchestrator_auto(self, svc, smon, status):
"""
if not self.compat:
return
if smon.local_expect != "started":
return
if svc.frozen() or self.freezer.node_frozen():
#self.log.info("service %s orchestrator out (frozen)", svc.svcname)
return
Expand Down
6 changes: 5 additions & 1 deletion lib/osvcd_shared.py
Expand Up @@ -522,14 +522,16 @@ def get_service_instance(svcname, nodename):
#########################################################################
def placement_candidates(self, svc, discard_frozen=True,
discard_unprovisioned=True,
discard_constraints_violation=True):
discard_constraints_violation=True,
discard_start_failed=True):
"""
Return the list of service nodes meeting the following criteria:
* we have valid service instance data (not unknown, has avail)
* the node is not in maintenance
* the node is not frozen (default)
* the service is not frozen (default)
* the service instance is provisioned (default)
* the service instance smon status is not "start failed" (default)
* the service instance constraints are eval'ed True (default)
"""
candidates = []
Expand All @@ -545,6 +547,8 @@ def placement_candidates(self, svc, discard_frozen=True,
instance = self.get_service_instance(svc.svcname, nodename)
if instance is None:
continue
if discard_start_failed and instance["monitor"]["status"] == "start failed":
continue
if "avail" not in instance:
# deleting
continue
Expand Down

0 comments on commit 8ba3610

Please sign in to comment.