Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Display "scaler" in the svcmon output instead of <topology>/<orchestr…
…ate>

Example:

 tstscaler     warn    scaler            | /^        /
 tstscaler2    up      scaler            | /         /^
  0.tstscaler2 up!     failover/ha       | O!^       X!
  1.tstscaler2 up!     failover/ha       | O!^       X!
  • Loading branch information
cvaroqui committed Feb 8, 2018
1 parent 2508d0a commit 502aaab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/node.py
Expand Up @@ -3068,9 +3068,12 @@ def load_svc(svcname, prefix=""):
status += colorize("!", color.BROWN)
if data["placement"] == "non-optimal":
status += colorize("^", color.RED)
info = topology
if data["orchestrate"]:
info += "/" + data["orchestrate"]
if data.get("scale") is not None:
info = "scaler"
else:
info = topology
if data["orchestrate"]:
info += "/" + data["orchestrate"]
line = [
" "+colorize(prefix+svcname, color.BOLD),
status,
Expand Down Expand Up @@ -3297,6 +3300,7 @@ def load_node_compat():
services[svcname] = Storage({
"topology": _data.get("topology", ""),
"orchestrate": _data.get("orchestrate"),
"scale": _data.get("scale"),
"avail": "undef",
"overall": "",
"nodes": {},
Expand Down
2 changes: 2 additions & 0 deletions lib/svc.py
Expand Up @@ -1509,6 +1509,8 @@ def print_status_data_eval(self, refresh=False):
data["children"] = self.children
if self.orchestrate != "no":
data["orchestrate"] = self.orchestrate
if self.scale_target is not None:
data["scale"] = self.scale_target

containers = self.get_resources('container')
if len(containers) > 0:
Expand Down

0 comments on commit 502aaab

Please sign in to comment.