pgj commented on code in PR #4835:
URL: https://github.com/apache/couchdb/pull/4835#discussion_r1391453720
##########
dev/run:
##########
@@ -504,6 +512,119 @@ def boot_nouveau(ctx):
)
+CLOUSEAU_DIR = "clouseau"
+JAVA_VERSION_RE = re.compile('"(\d+\.\d+).*"')
+
+
+def get_java_version(java):
+ output = sp.check_output([java, "-version"],
stderr=sp.STDOUT).decode("utf-8")
+ if output:
+ matches = JAVA_VERSION_RE.search(output)
+ if matches:
+ return float(matches.groups()[0])
+
+
+@log("Start Clouseau node clouseau{idx}")
+def boot_clouseau(ctx, idx):
+ def warn(reason):
+ print("Warning: " + reason)
Review Comment:
The "check node" action is not repeated indefinitely but for a fixed amount
(10) of times. See the `ensure_all_nodes_alive()` function for the logic. I
admit that it could be annoying but the script will eventually give up on
trying.
Perhaps it may make sense to differentiate between warnings and errors. In
case of errors, the script could stop earlier ("fail fast"). I am not
convinced that `sys.exit()` is the best to express that though. I consider it
an aggressive break in the control flow and I usually keep it as the last
resort. I will look into options on how to implement this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]