Skip to content

Commit abaeef7

Browse files
committed
Revert "feat(controller): disable swap usage if there is a memory limit"
1 parent 3a1a429 commit abaeef7

3 files changed

Lines changed: 1 addition & 12 deletions

File tree

deis/settings.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os.path
77
import random
88
import string
9-
import semantic_version
109
import sys
1110
import tempfile
1211

@@ -341,12 +340,3 @@
341340
if os.path.exists('/templates/confd_settings.py'):
342341
sys.path.append('/templates')
343342
from confd_settings import * # noqa
344-
345-
346-
DOCKER_VERSION = os.environ.get('DOCKER_VERSION', '1.4.1')
347-
348-
DISABLE_SWAP = ""
349-
350-
if (semantic_version.validate(DOCKER_VERSION) and
351-
semantic_version.Version(DOCKER_VERSION) >= semantic_version.Version('1.5.0')):
352-
DISABLE_SWAP = "--memory-swap=-1"

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ paramiko==1.15.2
1616
psycopg2==2.6
1717
python-etcd==0.3.2
1818
PyYAML==3.11
19-
semantic_version==2.3.1
2019
setproctitle==1.1.8
2120
static==1.1.1
2221
South==1.0.2

scheduler/fleet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _create_container(self, name, image, command, unit, **kwargs):
129129
# prepare memory limit for the container type
130130
mem = kwargs.get('memory', {}).get(l['c_type'], None)
131131
if mem:
132-
l.update({'memory': '-m {} {} '.format(mem.lower(), settings.DISABLE_SWAP)})
132+
l.update({'memory': '-m {}'.format(mem.lower())})
133133
else:
134134
l.update({'memory': ''})
135135
# prepare memory limit for the container type

0 commit comments

Comments
 (0)