Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[18.09 backport] projectquota: protect concurrent map access (ENGCORE-920) #311

Merged
merged 4 commits into from
Aug 7, 2019

Conversation

kolyshkin
Copy link

@kolyshkin kolyshkin commented Aug 1, 2019

This is a backport of

to address

Clean cherry-pick, no issues (moby#39327 is required solely for a clean cherry-pick)

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 186cd7c)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 230a55d)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit cf104d8)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin added this to the 18.09.9 milestone Aug 1, 2019
@thaJeztah
Copy link
Member

Was this updated with the last version? https://jenkins.dockerproject.org/job/Docker-PRs/55137/console

22:27:54 fatal error: sync: Unlock of unlocked RWMutex
22:27:54 
22:27:54 goroutine 12 [running]:

Looks like it's cherry-picking moby@b845a74 instead of moby@1ac0a66

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not LGTM (see comment)

Protect access to q.quotas map, and lock around changing nextProjectID.

Techinically, the lock in findNextProjectID() is not needed as it is
only called during initialization, but one can never be too careful.

Fixes: 52897d1 ("projectquota: utility class for project quota controls")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1ac0a66)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Author

fixed to switch to last version of upstream commit

@thaJeztah
Copy link
Member

Janky failure should not be related https://jenkins.dockerproject.org/job/Docker-PRs/55220/console

20:50:13 FAIL: docker_cli_start_test.go:190: DockerSuite.TestStartReturnCorrectExitCode
20:50:13 
20:50:13 assertion failed: expected an error, got nil

@kolyshkin
Copy link
Author

20:50:13 FAIL: docker_cli_start_test.go:190: DockerSuite.TestStartReturnCorrectExitCode

is moby#38521

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit ebb8bfc into docker-archive:18.09 Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants