summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahoo-inc.com>2017-04-05 15:39:51 +0200
committerHåkon Hallingstad <hakon@yahoo-inc.com>2017-04-05 15:39:51 +0200
commit3f59696d6a749793a828e1393cab312527390e15 (patch)
treed3d07c9b09fcf47d94dab06e104501d130f5d59c /node-admin
parentd69e78f8a2b50870b86b56f6c753f20c7b7fb415 (diff)
Use VESPA_TOTAL_MEMORY_MB when starting container
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/docker/DockerOperationsImpl.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/docker/DockerOperationsImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/docker/DockerOperationsImpl.java
index d49b5ee40c7..0ae807f7f04 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/docker/DockerOperationsImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/docker/DockerOperationsImpl.java
@@ -171,10 +171,12 @@ public class DockerOperationsImpl implements DockerOperations {
long minMainMemoryAvailableMb = (long) (nodeSpec.minMainMemoryAvailableGb.get() * 1024);
if (minMainMemoryAvailableMb > 0) {
command.withMemoryInMb(minMainMemoryAvailableMb);
- // TOTAL_MEMORY_MB is used to make any jdisc container think the machine
+ // VESPA_TOTAL_MEMORY_MB is used to make any jdisc container think the machine
// only has this much physical memory (overrides total memory reported by `free -m`).
- command.withEnvironment("TOTAL_MEMORY_MB", Long.toString(minMainMemoryAvailableMb));
command.withEnvironment("VESPA_TOTAL_MEMORY_MB", Long.toString(minMainMemoryAvailableMb));
+
+ // TODO: Remove once the lowest version in prod is 6.95
+ command.withEnvironment("TOTAL_MEMORY_MB", Long.toString(minMainMemoryAvailableMb));
}
}