summaryrefslogtreecommitdiffstats
path: root/node-maintainer/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'node-maintainer/src/main')
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/TODO.md30
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/HostURLGenerator.java3
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/IPAddressVerifier.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeJsonConverter.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoInfoRetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoJsonModel.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/OutputParser.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseInstructions.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseResult.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/BenchmarkReport.java3
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/HardwareDivergenceReport.java13
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/Reporter.java (renamed from node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/ReportSender.java)14
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/SpecVerificationReport.java4
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/BenchmarkResultInspector.java3
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/HardwareBenchmarker.java7
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/README.md11
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/Benchmark.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/BenchmarkResults.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/CPUBenchmark.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/DiskBenchmark.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/MemoryBenchmark.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/HardwareNodeComparator.java3
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/README.md4
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/SpecVerifier.java7
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/VerifierSettings.java5
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/CPURetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/DiskRetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfo.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfoRetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareRetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/MemoryRetriever.java1
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/NetRetriever.java1
33 files changed, 92 insertions, 35 deletions
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/TODO.md b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/TODO.md
new file mode 100644
index 00000000000..846c52ff645
--- /dev/null
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/TODO.md
@@ -0,0 +1,30 @@
+#TODO
+Here we have listed things we did not have time to do during the summer, but that we think can be implemented later.
+
+##Spec
+- The net interface speed is at the moment approved if it is over 1 000MB/s. Since some nodes are supposed to have
+10 000MB/s a feature could be to either add information about interface speed in node repo or use the flavor to decide
+if the interface speed is correct or not.
+- In HardwareNodeComparator the spec found in node repo and on the node are compared. We set a threshold on 5%, meaning
+if a the value from the node is more than 5% away from what is said in node repo (+-), then we say it is a bad value.
+If this threshold is too high or too low, it has to be changed in this class.
+
+##Benchmark
+- BenchmarkResultInspector is the class that decides whether a benchmark result is ok or if the result should be
+ reported. The values that decides this are not given very much thought and it could be an idea to check these.
+- Benchmark is not running on docker hosts since there is not yet found a solution to only start benchmarking at reboot.
+Spec verification runs every hour on node-admin, but since node-admin reboots too often, benchmarking is at the moment
+not running here.
+
+##Reporting / Node repo
+- Since HardwareDivergenceReport is printed as a json string and then reported to noderepo as a string, a feature could
+be to not store HardwareDivergence as a string in node repo, as it is now, but as a json. This will be mostly changes
+outside of this code, but then the member variable HardwareDivergence in NodeRepoJsonModel have to be change from string
+to HardwareDivergenceReport which will cause some work in the Reporter class.
+- No actions are now taken if there is anything wrong with the node. The information is only uploaded to node repo.
+Here it is room for improvements and some possible solutions are:
+ - Continue only reporting to node repo, but have a program that scans through all nodes and makes a list of those
+ with errors in HardwareDivergence.
+ - In addition to uploading the report to node repo, have actions based on what kind of errors and what kind of state
+ the node has.
+ - Automatically create Jira tickets when something is reported wrong on a node. \ No newline at end of file
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
index c047200f7c4..e1d0e46c173 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/CommandExecutor.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons;
import org.apache.commons.exec.CommandLine;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/HostURLGenerator.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/HostURLGenerator.java
index 005dd799586..b43c9caed54 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/HostURLGenerator.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/HostURLGenerator.java
@@ -1,7 +1,6 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons;
-import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
-
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/IPAddressVerifier.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/IPAddressVerifier.java
index b9704f464c7..483c07002dd 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/IPAddressVerifier.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/IPAddressVerifier.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.noderepo;
import com.yahoo.vespa.hosted.node.verification.commons.report.SpecVerificationReport;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeJsonConverter.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeJsonConverter.java
index b1e20fbbb3e..ef6d706a1a4 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeJsonConverter.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeJsonConverter.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.noderepo;
import com.yahoo.vespa.hosted.node.verification.spec.retrievers.HardwareInfo;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoInfoRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoInfoRetriever.java
index 59cf87bd44c..4d261334d35 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoInfoRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoInfoRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.noderepo;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoJsonModel.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoJsonModel.java
index f3792af0553..043cccb681c 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoJsonModel.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/noderepo/NodeRepoJsonModel.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.noderepo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/OutputParser.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/OutputParser.java
index bac7a4e0fdc..88e1d22cc0e 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/OutputParser.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/OutputParser.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.parser;
import java.util.ArrayList;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseInstructions.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseInstructions.java
index 2044ac45e96..6fb962c8232 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseInstructions.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseInstructions.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.parser;
import java.util.ArrayList;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseResult.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseResult.java
index 130cdba86aa..df16897066b 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseResult.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/parser/ParseResult.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.parser;
import java.util.Objects;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/BenchmarkReport.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/BenchmarkReport.java
index 0d21816e69b..f27d132df42 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/BenchmarkReport.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/BenchmarkReport.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.report;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -61,7 +62,7 @@ public class BenchmarkReport {
try {
String jsonReport = om.writeValueAsString(this);
return jsonReport.length() == 2;
- } catch (JsonProcessingException e){
+ } catch (JsonProcessingException e) {
e.printStackTrace();
return false;
}
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/HardwareDivergenceReport.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/HardwareDivergenceReport.java
index 20fc19082a4..953a052ccfc 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/HardwareDivergenceReport.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/HardwareDivergenceReport.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.report;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -14,10 +15,9 @@ public class HardwareDivergenceReport {
BenchmarkReport benchmarkReport;
public void setSpecVerificationReport(SpecVerificationReport specVerificationReport) {
- if (specVerificationReport.isValidSpec()){
+ if (specVerificationReport.isValidSpec()) {
this.specVerificationReport = null;
- }
- else {
+ } else {
this.specVerificationReport = specVerificationReport;
}
}
@@ -25,15 +25,14 @@ public class HardwareDivergenceReport {
public void setBenchmarkReport(BenchmarkReport benchmarkReport) {
if (benchmarkReport.isAllBenchmarksOK()) {
this.benchmarkReport = null;
- }
- else {
+ } else {
this.benchmarkReport = benchmarkReport;
}
}
@JsonIgnore
- public boolean isHardwareDivergenceReportEmpty(){
- if (specVerificationReport == null && benchmarkReport == null){
+ public boolean isHardwareDivergenceReportEmpty() {
+ if (specVerificationReport == null && benchmarkReport == null) {
return true;
}
return false;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/ReportSender.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/Reporter.java
index 570a74a63fa..87644cb90d0 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/ReportSender.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/Reporter.java
@@ -1,7 +1,7 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.report;
import com.fasterxml.jackson.databind.ObjectMapper;
-
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoInfoRetriever;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoJsonModel;
@@ -11,17 +11,16 @@ import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
-public class ReportSender {
+public class Reporter {
- private static final Logger logger = Logger.getLogger(ReportSender.class.getName());
+ private static final Logger logger = Logger.getLogger(Reporter.class.getName());
private static void printHardwareDivergenceReport(HardwareDivergenceReport hardwareDivergenceReport) throws IOException {
ObjectMapper om = new ObjectMapper();
String report;
- if (hardwareDivergenceReport.isHardwareDivergenceReportEmpty()){
+ if (hardwareDivergenceReport.isHardwareDivergenceReportEmpty()) {
report = "null";
- }
- else {
+ } else {
report = om.writeValueAsString(hardwareDivergenceReport);
}
System.out.print(report);
@@ -48,8 +47,7 @@ public class ReportSender {
try {
HardwareDivergenceReport hardwareDivergenceReport = om.readValue(nodeRepoJsonModel.getHardwareDivergence(), HardwareDivergenceReport.class);
return hardwareDivergenceReport;
- }
- catch (IOException e){
+ } catch (IOException e) {
logger.log(Level.WARNING, "Failed to parse hardware divergence report from node repo. Report:\n" + nodeRepoJsonModel.getHardwareDivergence(), e.getMessage());
return new HardwareDivergenceReport();
}
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/SpecVerificationReport.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/SpecVerificationReport.java
index e7ece6c4a7f..424b591652b 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/SpecVerificationReport.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/report/SpecVerificationReport.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.commons.report;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -65,8 +66,7 @@ public class SpecVerificationReport {
try {
String jsonReport = om.writeValueAsString(this);
return jsonReport.length() == 2;
- }
- catch (JsonProcessingException e){
+ } catch (JsonProcessingException e) {
e.printStackTrace();
return false;
}
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/BenchmarkResultInspector.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/BenchmarkResultInspector.java
index 23f6e245e86..30592c59151 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/BenchmarkResultInspector.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/BenchmarkResultInspector.java
@@ -1,7 +1,8 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware;
-import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.BenchmarkResults;
import com.yahoo.vespa.hosted.node.verification.commons.report.BenchmarkReport;
+import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.BenchmarkResults;
public class BenchmarkResultInspector {
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/HardwareBenchmarker.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/HardwareBenchmarker.java
index a9f00e40740..e332804e880 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/HardwareBenchmarker.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/HardwareBenchmarker.java
@@ -1,15 +1,16 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware;
import com.yahoo.log.LogSetup;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
import com.yahoo.vespa.hosted.node.verification.commons.HostURLGenerator;
-import com.yahoo.vespa.hosted.node.verification.commons.report.ReportSender;
+import com.yahoo.vespa.hosted.node.verification.commons.report.BenchmarkReport;
+import com.yahoo.vespa.hosted.node.verification.commons.report.Reporter;
import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.Benchmark;
import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.BenchmarkResults;
import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.CPUBenchmark;
import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.DiskBenchmark;
import com.yahoo.vespa.hosted.node.verification.hardware.benchmarks.MemoryBenchmark;
-import com.yahoo.vespa.hosted.node.verification.commons.report.BenchmarkReport;
import java.io.IOException;
import java.net.URL;
@@ -35,7 +36,7 @@ public class HardwareBenchmarker {
benchmark.doBenchmark();
}
BenchmarkReport benchmarkReport = BenchmarkResultInspector.makeBenchmarkReport(benchmarkResults);
- ReportSender.reportBenchmarkResults(benchmarkReport, nodeInfoUrls);
+ Reporter.reportBenchmarkResults(benchmarkReport, nodeInfoUrls);
return benchmarkReport.isAllBenchmarksOK();
}
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/README.md b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/README.md
index e9fa4901814..ff580db7f73 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/README.md
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/README.md
@@ -3,6 +3,11 @@ Verification of behaviour and performance of hardware. Benchmarks cpu frequency,
A report is sent to the node repository if any of the results are below an accepted threshold.
## Code Walkthrough
-The main class, HardwareBenchmarker, calls every benchmark in the benchmark package. The results of these benchmarks are passed through
-the BenchmarkResultInspector, which creates a BenchmarkReport containing the values below the accepted threshold. ReportSender is then called such that
-the node repository is updated with the new benchmark results. \ No newline at end of file
+The main class, HardwareBenchmarker, calls every benchmark in the benchmark package.
+
+The results of these benchmarks are passed through
+the BenchmarkResultInspector, which creates a BenchmarkReport containing the values below the accepted threshold.
+
+ReportSender is then called such that
+the old HardwareDivergence report is retrieved from node repo and updated with the new results. ReportSender prints the new HardwareReport such that it
+can be updated in node repo by chef or other. \ No newline at end of file
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/Benchmark.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/Benchmark.java
index a76555d79d3..c1791ef45bd 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/Benchmark.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/Benchmark.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware.benchmarks;
/**
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/BenchmarkResults.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/BenchmarkResults.java
index 590857b81d6..999af15da09 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/BenchmarkResults.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/BenchmarkResults.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware.benchmarks;
/**
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/CPUBenchmark.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/CPUBenchmark.java
index 151dec6db8c..e70385bb3a2 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/CPUBenchmark.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/CPUBenchmark.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware.benchmarks;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/DiskBenchmark.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/DiskBenchmark.java
index f6c7035eea1..ff8e1f21612 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/DiskBenchmark.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/DiskBenchmark.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware.benchmarks;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/MemoryBenchmark.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/MemoryBenchmark.java
index 8ce78d9e18d..0aa4bc28eb1 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/MemoryBenchmark.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/hardware/benchmarks/MemoryBenchmark.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.hardware.benchmarks;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/HardwareNodeComparator.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/HardwareNodeComparator.java
index 4b96d6c9b92..0885dbafcac 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/HardwareNodeComparator.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/HardwareNodeComparator.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec;
import com.yahoo.vespa.hosted.node.verification.commons.report.SpecVerificationReport;
@@ -73,7 +74,7 @@ public class HardwareNodeComparator {
}
}
- private static boolean outsideThreshold(double value1, double value2 , double thresholdPercentage) {
+ private static boolean outsideThreshold(double value1, double value2, double thresholdPercentage) {
double lowerThresholdPercentage = 1 - thresholdPercentage;
double upperThresholdPercentage = 1 + thresholdPercentage;
return value1 < lowerThresholdPercentage * value2 || value1 > upperThresholdPercentage * value2;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/README.md b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/README.md
index ff87c7358f1..26856e078eb 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/README.md
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/README.md
@@ -10,5 +10,5 @@ It then retrieves all the hardware information at the node with the "retrievers"
"HardwareInfo" object.
SpecVerifier then uses HardwareNodeComparator to compare spec from node repo and the node itself. It generates a
-SpecVerificationReport and uses ReportSender in "commons" to generate a full json report that can update node repo
-with the new results.
+SpecVerificationReport and uses Reporter in "commons" to retrieve the old HardwareDivergence report from node repo and update it. Reporter then prints the new
+updated HardwareDivergence report such that it can be updated in node repo by chef or other.
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/SpecVerifier.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/SpecVerifier.java
index 19e1e6c0f40..ee76cb7884e 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/SpecVerifier.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/SpecVerifier.java
@@ -1,13 +1,14 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec;
import com.yahoo.log.LogSetup;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
import com.yahoo.vespa.hosted.node.verification.commons.HostURLGenerator;
-import com.yahoo.vespa.hosted.node.verification.commons.report.ReportSender;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.IPAddressVerifier;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeJsonConverter;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoInfoRetriever;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoJsonModel;
+import com.yahoo.vespa.hosted.node.verification.commons.report.Reporter;
import com.yahoo.vespa.hosted.node.verification.commons.report.SpecVerificationReport;
import com.yahoo.vespa.hosted.node.verification.spec.retrievers.HardwareInfo;
import com.yahoo.vespa.hosted.node.verification.spec.retrievers.HardwareInfoRetriever;
@@ -33,7 +34,7 @@ public class SpecVerifier {
VerifierSettings verifierSettings = new VerifierSettings(nodeRepoJsonModel);
HardwareInfo actualHardware = HardwareInfoRetriever.retrieve(commandExecutor, verifierSettings);
SpecVerificationReport specVerificationReport = makeVerificationReport(actualHardware, nodeRepoJsonModel);
- ReportSender.reportSpecVerificationResults(specVerificationReport, nodeInfoUrls);
+ Reporter.reportSpecVerificationResults(specVerificationReport, nodeInfoUrls);
return specVerificationReport.isValidSpec();
}
@@ -49,7 +50,7 @@ public class SpecVerifier {
return nodeRepoJsonModel;
}
- public static void main(String[] args) {
+ public static void main(String[] args) {
LogSetup.initVespaLogging("spec-verifier");
CommandExecutor commandExecutor = new CommandExecutor();
ArrayList<URL> nodeInfoUrls;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/VerifierSettings.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/VerifierSettings.java
index c170ac0bedf..357af559014 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/VerifierSettings.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/VerifierSettings.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec;
import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoJsonModel;
@@ -11,11 +12,11 @@ public class VerifierSettings {
private final boolean checkIPv6;
- public VerifierSettings(){
+ public VerifierSettings() {
this.checkIPv6 = true;
}
- public VerifierSettings(NodeRepoJsonModel nodeRepoJsonModel){
+ public VerifierSettings(NodeRepoJsonModel nodeRepoJsonModel) {
checkIPv6 = nodeRepoJsonModel.getIpv6Address() != null;
}
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/CPURetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/CPURetriever.java
index f0d3e258f17..b02f37533da 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/CPURetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/CPURetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/DiskRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/DiskRetriever.java
index 346d4f3f716..2b1f7cf6a77 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/DiskRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/DiskRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfo.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfo.java
index b2a91924d50..8d726c507ba 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfo.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfo.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
/**
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfoRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfoRetriever.java
index a9b0ffcd0bb..e3235590169 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfoRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareInfoRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareRetriever.java
index 2e3852a1d0f..90e00560e59 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/HardwareRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
/**
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/MemoryRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/MemoryRetriever.java
index 24a4327fe52..2a64e0f4b21 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/MemoryRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/MemoryRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/NetRetriever.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/NetRetriever.java
index 03d93494cbb..746279915bf 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/NetRetriever.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/spec/retrievers/NetRetriever.java
@@ -1,3 +1,4 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.verification.spec.retrievers;
import com.yahoo.vespa.hosted.node.verification.commons.CommandExecutor;