aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-07-26 11:42:13 +0200
committerTor Brede Vekterli <vekterli@yahooinc.com>2023-07-26 11:42:13 +0200
commit143fbc7218e9487e029c97aa1c813acb8ffd0317 (patch)
tree606e6a6130e73c4a601104e4d7682f3713560581 /clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java
parent5bed3bea31f386ed0233b34215526463dcfb27eb (diff)
Make generated automatic feed block error messages more user-friendly
Messages are generated centrally by the cluster controller and pushed to content nodes as part of a cluster state bundle; the distributors nodes merely repeat back what they have been told. This changes the cluster controller feed block error message code to be less ambiguous and to include a URL to our public documentation about feed blocks. Example of _old_ message: ``` disk on node 1 [storage.1.local] (0.510 > 0.500) ``` Same feed block with _new_ message: ``` disk on node 1 [storage.1.local] is 51.0% full (the configured limit is 50.0%). See https://docs.vespa.ai/en/operations/feed-block.html ```
Diffstat (limited to 'clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java
index ee121d7682c..6899eaa6598 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeResourceExhaustion.java
@@ -47,18 +47,19 @@ public class NodeResourceExhaustion {
}
public String toExhaustionAddedDescription() {
- return String.format(Locale.US, "%s (%.3g > %.3g)", makeDescriptionPrefix(), resourceUsage.getUsage(), limit);
+ return String.format(Locale.US, "%s is %.1f%% full (the configured limit is %.1f%%)",
+ makeDescriptionPrefix(), resourceUsage.getUsage() * 100.0, limit * 100.0);
}
public String toExhaustionRemovedDescription() {
- return String.format(Locale.US, "%s (<= %.3g)", makeDescriptionPrefix(), limit);
+ return String.format(Locale.US, "%s (<= %.1f%%)", makeDescriptionPrefix(), limit * 100.0);
}
public String toShorthandDescription() {
- return String.format(Locale.US, "%s%s %.3g > %.3g",
+ return String.format(Locale.US, "%s%s %.1f%% > %.1f%%",
resourceType,
(resourceUsage.getName() != null ? ":" + resourceUsage.getName() : ""),
- resourceUsage.getUsage(), limit);
+ resourceUsage.getUsage() * 100.0, limit * 100.0);
}
private String makeDescriptionPrefix() {