summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2017-06-12 09:14:56 +0200
committerGitHub <noreply@github.com>2017-06-12 09:14:56 +0200
commitda3a0d03c40ba32435cae0c2e943bf1841d166c0 (patch)
treec16b97083a41c0bb9885902c0af4fb09af800995 /node-admin
parentb37ef3813d7c13e6b0c2c50aa1c09ec60b822b1f (diff)
parent83f07585e35da85aad08675c4f1aec2220b3189d (diff)
Merge pull request #2684 from yahoo/mpolden/remove-hostname-references
Remove hostname references
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java1
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java17
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java1
3 files changed, 18 insertions, 1 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
index 4df6ab52325..9922fd489fe 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
@@ -241,6 +241,7 @@ public class StorageMaintainer {
maintainerExecutor.addJob("handle-core-dumps")
.withArgument("doneCoredumpsPath", environment.pathInNodeAdminToDoneCoredumps())
.withArgument("coredumpsPath", environment.pathInNodeAdminFromPathInNode(containerName, "/home/y/var/crash"))
+ .withArgument("feedEndpoint", environment.getCoredumpFeedEndpoint())
.withArgument("attributes", attributes);
maintainerExecutor.execute();
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
index 7f288dccb61..bc528f7393f 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
@@ -37,6 +37,7 @@ public class Environment {
private static final String LOGSTASH_NODES = "LOGSTASH_NODES";
private static final String ATHENS_DOMAIN = "ATHENS_DOMAIN";
private static final String RUNNING_LOCALLY = "RUNNING_LOCALLY";
+ private static final String COREDUMP_FEED_ENDPOINT = "COREDUMP_FEED_ENDPOINT";
private final Set<String> configServerHosts;
private final String environment;
@@ -46,6 +47,7 @@ public class Environment {
private final PathResolver pathResolver;
private final List<String> logstashNodes;
private final String athensDomain;
+ private final String feedEndpoint;
private final boolean isRunningLocally;
static {
@@ -61,6 +63,7 @@ public class Environment {
new PathResolver(),
getLogstashNodesFromEnvironment(),
getEnvironmentVariable(ATHENS_DOMAIN),
+ getEnvironmentVariable(COREDUMP_FEED_ENDPOINT),
Optional.ofNullable(System.getenv(RUNNING_LOCALLY)).map(Boolean::valueOf).orElse(false));
}
@@ -72,6 +75,7 @@ public class Environment {
PathResolver pathResolver,
List<String> logstashNodes,
String athensDomain,
+ String feedEndpoint,
boolean isRunningLocally) {
this.configServerHosts = configServerHosts;
this.environment = environment;
@@ -81,6 +85,7 @@ public class Environment {
this.pathResolver = pathResolver;
this.logstashNodes = logstashNodes;
this.athensDomain = athensDomain;
+ this.feedEndpoint = feedEndpoint;
this.isRunningLocally = isRunningLocally;
}
@@ -134,6 +139,10 @@ public class Environment {
return pathResolver;
}
+ public String getCoredumpFeedEndpoint() {
+ return feedEndpoint;
+ }
+
public boolean isRunningLocally() {
return isRunningLocally;
}
@@ -205,6 +214,7 @@ public class Environment {
private PathResolver pathResolver;
private List<String> logstashNodes = Collections.emptyList();
private String athensDomain;
+ private String feedEndpoint;
private boolean isRunningLocally = false;
public Builder configServerHosts(String... hosts) {
@@ -247,6 +257,11 @@ public class Environment {
return this;
}
+ public Builder feedEndpoint(String feedEndpoint) {
+ this.feedEndpoint = feedEndpoint;
+ return this;
+ }
+
public Builder isRunningLocally(boolean isRunningLocally) {
this.isRunningLocally = isRunningLocally;
return this;
@@ -254,7 +269,7 @@ public class Environment {
public Environment build() {
return new Environment(configServerHosts, environment, region, parentHostHostname, inetAddressResolver,
- pathResolver, logstashNodes, athensDomain, isRunningLocally);
+ pathResolver, logstashNodes, athensDomain, feedEndpoint, isRunningLocally);
}
}
}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
index 219fcb4a41c..b79207444de 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
@@ -97,6 +97,7 @@ public class LocalZoneUtils {
.withEnvironment("REGION", environment.getRegion())
.withEnvironment("CONFIG_SERVER_ADDRESS", CONFIG_SERVER_HOSTNAME)
.withEnvironment("ATHENS_DOMAIN", "fake.env")
+ .withEnvironment("COREDUMP_FEED_ENDPOINT", "http://feed-endpoint.hostname.tld/feed")
.withEnvironment("RUNNING_LOCALLY", "true")
.withUlimit("nofile", 262_144, 262_144)
.withUlimit("nproc", 32_768, 409_600)