Skip to content

Commit 0cc8cc2

Browse files
committed
Clush: handle _ev_routing() reroute events
Display gateway reroute events. Can be quieted with -q.
1 parent b518c95 commit 0cc8cc2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/ClusterShell/CLI/Clush.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ def ev_written(self, worker, node, sname, size):
134134
if self._runtimer:
135135
self._runtimer.eh.bytes_written += size
136136

137+
def _ev_routing(self, worker, arg):
138+
prefix = "clush: "
139+
self._display.vprint_err(VERB_DEBUG, prefix + "_ev_routing: %s" % arg)
140+
if "reroute" in arg.get("event", ""):
141+
info_fmt = "rerouting commands for {targets} due to the failure " \
142+
"of gateway {gateway}"
143+
self._display.vprint_err(VERB_STD, prefix + info_fmt.format(**arg))
144+
137145
class DirectOutputHandler(OutputHandler):
138146
"""Direct output event handler class."""
139147

0 commit comments

Comments
 (0)