[DockerRunner] destroyOldContainers: normalize the container name
The docker api returns each name with a `/` prefix. In order to not interfere with pending compiles, the deletion process has to acquire an internal lock on the container. The LockManager uses the plain container name without the slash: `project-xxx`. Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
committed by
Jakob Ackermann
parent
7254a025ae
commit
f8cb5e36af
@@ -632,6 +632,9 @@ module.exports = DockerRunner = {
|
||||
ttl
|
||||
) {
|
||||
if (name.slice(0, 9) === '/project-' && ttl <= 0) {
|
||||
// strip the / prefix
|
||||
// the LockManager uses the plain container name
|
||||
name = name.slice(1)
|
||||
return jobs.push(cb =>
|
||||
DockerRunner.destroyContainer(name, id, false, () => cb())
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user