MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit dedc66ea authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

pull factory images from the registry before starting the sandbox

parent f878b649
...@@ -450,8 +450,7 @@ class SandboxManager(Manager): ...@@ -450,8 +450,7 @@ class SandboxManager(Manager):
# docker image # docker image
if version is None: if version is None:
image = "%s/factory/%s:%s" % (self.ctrl.registry, image = "%s:%s" % (ctrl.gen_factory_name(webapp.docker_os),
webapp.docker_os.docker_name,
webapp.docker_os.version) webapp.docker_os.version)
else: else:
image = "%s:%s" % (webapp.image_name, version.number) image = "%s:%s" % (webapp.image_name, version.number)
...@@ -868,6 +867,11 @@ exec /.toolbox/bin/sshd -D ...@@ -868,6 +867,11 @@ exec /.toolbox/bin/sshd -D
# pull requested image # pull requested image
yield from ctrl.image_manager.pull(sandbox_version.id) yield from ctrl.image_manager.pull(sandbox_version.id)
else:
# pull image
yield from ctrl.image_manager.sandbox_pull_manager.process((
ctrl.gen_factory_name(webapp.docker_os),
webapp.docker_os.version))
# start sandbox # start sandbox
yield from self.run_in_executor(self._start, webapp, sandbox_version) yield from self.run_in_executor(self._start, webapp, sandbox_version)
...@@ -1559,6 +1563,9 @@ class DockerController: ...@@ -1559,6 +1563,9 @@ class DockerController:
return os.path.join(self.datastore_path, str(job.user_id), return os.path.join(self.datastore_path, str(job.user_id),
str(job.webapp_id), job.access_token) str(job.webapp_id), job.access_token)
def gen_factory_name(self, docker_os):
return "%s/factory/%s" % (self.registry, docker_os.docker_name)
def check_host_path(self, funcname, path, *, nolink=True): def check_host_path(self, funcname, path, *, nolink=True):
"""Validate a path before using it as an external volume in docker """Validate a path before using it as an external volume in docker
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment