Use VESPA_TOTAL_MEMORY_MB when starting container
@@ -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));
}
}
