Revert "Rate limit testenv creation"
This reverts commit 0030f6c664
.
Test env requests are queuing up and nothing is getting a env in a timely
mannor. As I think we are still trying to create envs for jobs that have
timed out. Revert this to our behaviour befor last week while we investigate
the problem.
Change-Id: I79353941d838628e492b46acce6dde8ef2ec3aff
This commit is contained in:
parent
837133e5e1
commit
a04150eb99
|
@ -12,10 +12,6 @@ vcsrepo {"/opt/stack/tripleo-ci":
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
}
|
}
|
||||||
|
|
||||||
package {"python-posix_ipc":
|
|
||||||
ensure => "present",
|
|
||||||
}
|
|
||||||
|
|
||||||
cron {"refresh-server":
|
cron {"refresh-server":
|
||||||
command => "timeout 20m puppet apply /opt/stack/tripleo-ci/scripts/te-broker/te-broker.pp",
|
command => "timeout 20m puppet apply /opt/stack/tripleo-ci/scripts/te-broker/te-broker.pp",
|
||||||
minute => "*/30"
|
minute => "*/30"
|
||||||
|
|
|
@ -31,7 +31,6 @@ import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import gear
|
import gear
|
||||||
import posix_ipc
|
|
||||||
|
|
||||||
# 100Mb log files
|
# 100Mb log files
|
||||||
maxBytes=1024*1024*100
|
maxBytes=1024*1024*100
|
||||||
|
@ -126,15 +125,9 @@ class TEWorkerThread(threading.Thread):
|
||||||
try:
|
try:
|
||||||
with tempfile.NamedTemporaryFile('r') as fp:
|
with tempfile.NamedTemporaryFile('r') as fp:
|
||||||
os.environ["TE_DATAFILE"] = fp.name
|
os.environ["TE_DATAFILE"] = fp.name
|
||||||
# Limit the number of concurrent environment creations to 5.
|
logger.info(
|
||||||
# This will hopefully reduce the number of testenv creations
|
subprocess.check_output([self.scriptfiles[0], self.num, arguments.get("envsize","2"), arguments.get("ucinstance","")], stderr=subprocess.STDOUT))
|
||||||
# that fail or timeout due to an overloaded controller.
|
clientdata = fp.read()
|
||||||
with posix_ipc.Semaphore('testenv-worker',
|
|
||||||
flags=posix_ipc.O_CREAT,
|
|
||||||
initial_value=5):
|
|
||||||
logger.info(
|
|
||||||
subprocess.check_output([self.scriptfiles[0], self.num, arguments.get("envsize","2"), arguments.get("ucinstance","")], stderr=subprocess.STDOUT))
|
|
||||||
clientdata = fp.read()
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
logger.error(e.output)
|
logger.error(e.output)
|
||||||
clientdata = "Couldn't retrieve env"
|
clientdata = "Couldn't retrieve env"
|
||||||
|
|
Loading…
Reference in New Issue