Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-16360: Fix R package for Windows #16369

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion h2o-core/src/main/java/water/api/CloudHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public CloudV3 status(int version, CloudV3 cloud) {
cloud.consensus = Paxos._commonKnowledge;
cloud.locked = Paxos._cloudLocked;
cloud.internal_security_enabled = H2OSecurityManager.instance().securityEnabled;

cloud.web_ip = H2O.ARGS.web_ip;

// set leader
H2ONode leader = H2O.CLOUD.leaderOrNull(); // leader might be null in client mode if clouding didn't finish yet
Expand Down
3 changes: 3 additions & 0 deletions h2o-core/src/main/java/water/api/schemas3/CloudV3.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public CloudV3() {}
@API(help="leader_idx", direction=API.Direction.OUTPUT)
public int leader_idx = -1;

@API(help="web_ip", direction=API.Direction.OUTPUT)
public String web_ip=null;

// Output fields one-per-JVM
public static class NodeV3 extends SchemaV3<Iced, NodeV3> {
public NodeV3() {}
Expand Down
5 changes: 5 additions & 0 deletions h2o-r/h2o-package/R/communication.R
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,11 @@ h2o.clusterInfo <- function() {
if (res$build_too_old) {
warning(sprintf("\nYour H2O cluster version is (%s) old. There may be a newer version available.\nPlease download and install the latest version from: https://h2o-release.s3.amazonaws.com/h2o/latest_stable.html", res$build_age))
}

if (is.null(res$web_ip)){
warning("SECURITY_WARNING: web_ip is not specified. H2O Rest API is listening on all available interfaces.")
}

}

.h2o.translateJobType <- function(type) {
Expand Down
11 changes: 0 additions & 11 deletions h2o-r/h2o-package/R/connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,6 @@ h2o.init <- function(ip = "localhost", port = 54321, name = NA_character_, start

stop("H2O failed to start, stopping execution.")
}

securityWarnings <- ""
if (file.info(stdout)$size > 0) {
securityWarnings <- grep("SECURITY_WARNING", readLines(stdout), value=TRUE)
}
if (length(securityWarnings) > 0) {
msg = paste(
"Server process startup raise a security warning:",
paste(securityWarnings, collapse = "\n"), sep = "\n")
warning(msg)
}
} else
stop("Can only start H2O launcher if IP address is localhost.")
}
Expand Down
Loading