aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/agent/agent.cli18
-rw-r--r--bbot/agent/agent.cxx3
-rw-r--r--bbot/agent/machine.cxx2
-rw-r--r--bbot/bbot-agent@.service6
-rw-r--r--tests/machine/testscript2
5 files changed, 24 insertions, 7 deletions
diff --git a/bbot/agent/agent.cli b/bbot/agent/agent.cli
index eb3553d..060cba0 100644
--- a/bbot/agent/agent.cli
+++ b/bbot/agent/agent.cli
@@ -189,10 +189,24 @@ namespace bbot
"Number of CPUs (threads) to use, 1 by default."
}
- size_t --ram (1024 * 1024) // 1G
+ size_t --build-ram (4 * 1024 * 1024) // 4GiB
{
"<num>",
- "Amount of RAM (in kB) to use, 1G by default."
+ "Amount of RAM (in KiB) to use for the build machine, 4GiB by default."
+ }
+
+ size_t --auxiliary-ram
+ {
+ "<num>",
+ "Amount of RAM (in KiB) to use for auxiliary machines. To disable
+ running auxiliary machines, specify \cb{0}. If unspecified, then
+ currently the behavior is the same as specifying \cb{0} but this
+ may change in the future (for example, to support a more dynamic
+ allocation strategy)."
+
+ // Note: it's not going to be easy to set it to unspecified in
+ // bbot-agent@.service so we may have to invent some special value,
+ // like `auto`.
}
string --bridge = "br1"
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index 062fd68..74f461c 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1863,7 +1863,8 @@ try
dr <<
info << "cpu(s) " << ops.cpu () <<
- info << "ram(kB) " << ops.ram () <<
+ info << "build ram(KiB) " << ops.build_ram () <<
+ info << "auxil ram(KiB) " << ops.auxiliary_ram () <<
info << "bridge " << ops.bridge ();
if (fingerprint)
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx
index 84916f6..2d9ad4f 100644
--- a/bbot/agent/machine.cxx
+++ b/bbot/agent/machine.cxx
@@ -278,7 +278,7 @@ namespace bbot
else
ram += (ops.ram () - ram) / 2;
#else
- size_t ram (ops.ram ());
+ size_t ram (ops.build_ram ());
#endif
// If we have options, use that instead of the default network and
diff --git a/bbot/bbot-agent@.service b/bbot/bbot-agent@.service
index 18b7c9e..d379b3c 100644
--- a/bbot/bbot-agent@.service
+++ b/bbot/bbot-agent@.service
@@ -14,7 +14,8 @@ Type=simple
Environment=VERBOSE=3
Environment=CPU=1
-Environment=RAM=1048576
+Environment=RAM_BUILD=4194304
+Environment=RAM_AUXIL=0
Environment=BRIDGE=br1
Environment=AUTH_KEY=
@@ -49,7 +50,8 @@ ExecStart=/build/bots/default/bin/bbot-agent \
--systemd-daemon \
--verbose ${VERBOSE} \
--cpu ${CPU} \
- --ram ${RAM} \
+ --build-ram ${RAM_BUILD} \
+ --auxiliary-ram ${RAM_AUXIL} \
--bridge ${BRIDGE} \
--auth-key ${AUTH_KEY} \
--interactive ${INTERACTIVE} \
diff --git a/tests/machine/testscript b/tests/machine/testscript
index 1590f96..76921ed 100644
--- a/tests/machine/testscript
+++ b/tests/machine/testscript
@@ -7,7 +7,7 @@
# iptables -t nat -S
# iptables -S
-test.options = --cpu 8 --ram 10485760 --verbose 3
+test.options = --cpu 8 --build-ram 10485760 --verbose 3
tftp = /build/tftp
machines = /btrfs/boris/machines # @@ TODO