Merge "Fix the apply issue after uploading an app twice"
This commit is contained in:
commit
59085bed17
@ -1865,6 +1865,7 @@ class DockerHelper(object):
|
|||||||
|
|
||||||
def __init__(self, dbapi):
|
def __init__(self, dbapi):
|
||||||
self._dbapi = dbapi
|
self._dbapi = dbapi
|
||||||
|
self._lock = threading.Lock()
|
||||||
self.k8s_registry = None
|
self.k8s_registry = None
|
||||||
self.gcr_registry = None
|
self.gcr_registry = None
|
||||||
self.quay_registry = None
|
self.quay_registry = None
|
||||||
@ -1967,7 +1968,13 @@ class DockerHelper(object):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
client = docker.from_env(timeout=INSTALLATION_TIMEOUT)
|
client = docker.from_env(timeout=INSTALLATION_TIMEOUT)
|
||||||
|
|
||||||
|
# It causes problem if multiple threads attempt to start the
|
||||||
|
# same container, so add lock to ensure only one thread can
|
||||||
|
# start the Armada container at a time
|
||||||
|
with self._lock:
|
||||||
armada_svc = self._start_armada_service(client)
|
armada_svc = self._start_armada_service(client)
|
||||||
|
|
||||||
if armada_svc:
|
if armada_svc:
|
||||||
if request == 'validate':
|
if request == 'validate':
|
||||||
cmd = 'armada validate ' + manifest_file
|
cmd = 'armada validate ' + manifest_file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user