adding newStartRunners command

This commit is contained in:
Thomas Harvey
2017-10-16 17:33:10 -04:00
parent ce31c7f1d5
commit 337423d294
2 changed files with 43 additions and 25 deletions

View File

@@ -1,4 +1,3 @@
maxMemoryUsage=80;
baseName="crunner0";
namePrefix="cubs";
runners="";
@@ -16,9 +15,9 @@ usedMemoryPercent;
until [[ $memory -gt $maxMemoryUsage ]]; do
runnerName="${namePrefix}${RANDOM}";
lxc-start-ephemeral -o $baseName -n $runnerName --union-type overlayfs -d
if[[ $? -eq 0 ]]
then
lxc-start-ephemeral -o $baseName -n $runnerName --union-type overlayfs -d;
if[[ "$?" -eq 0 ]]; then
runners="${runners};${runnerName}";
fi
usedMemoryPercent;