Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit 9baa3d3

Browse files
authored
ref(registry): remove simpleflock and depend on Docker 1.9 minimum (#1090)
Concurrent pull issue was resolved in 1.9 (moby/moby#9718) and Kubernetes is validated against that as well
1 parent dda3a95 commit 9baa3d3

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

rootfs/registry/dockerclient.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import backoff
88
from django.conf import settings
99
from rest_framework.exceptions import PermissionDenied
10-
from simpleflock import SimpleFlock
1110

1211
import docker
1312
import docker.constants
@@ -25,8 +24,6 @@ class RegistryException(Exception):
2524
class DockerClient(object):
2625
"""Use the Docker API to pull, tag, build, and push images to deis-registry."""
2726

28-
FLOCKFILE = '/tmp/controller-pull'
29-
3027
def __init__(self):
3128
timeout = os.environ.get('DOCKER_CLIENT_TIMEOUT', docker.constants.DEFAULT_TIMEOUT_SECONDS)
3229
self.client = docker.Client(version='auto', timeout=timeout)
@@ -123,9 +120,8 @@ def pull(self, repo, tag):
123120
"""Pull a Docker image into the local storage graph."""
124121
check_blacklist(repo)
125122
logger.info("Pulling Docker image {}:{}".format(repo, tag))
126-
with SimpleFlock(self.FLOCKFILE, timeout=1200):
127-
stream = self.client.pull(repo, tag=tag, stream=True, decode=True)
128-
log_output(stream, 'pull', repo, tag)
123+
stream = self.client.pull(repo, tag=tag, stream=True, decode=True)
124+
log_output(stream, 'pull', repo, tag)
129125

130126
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
131127
def push(self, repo, tag):

rootfs/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ pyOpenSSL==16.1.0
1515
pytz==2016.6.1
1616
requests==2.11.1
1717
requests-toolbelt==0.7.0
18-
simpleflock==0.0.3
1918
jsonschema==2.5.1
2019
idna==2.1

0 commit comments

Comments
 (0)