Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zoe
main
Commits
3c129690
Commit
3c129690
authored
Mar 01, 2017
by
Daniele Venzano
Browse files
Reset memory limiting
parent
5d03ec78
Changes
2
Hide whitespace changes
Inline
Side-by-side
zoe_lib/swarm_client.py
View file @
3c129690
...
...
@@ -208,13 +208,20 @@ class SwarmClient:
log_config
=
docker
.
utils
.
LogConfig
(
type
=
"json-file"
)
try
:
host_config
=
self
.
cli
.
create_host_config
(
network_mode
=
options
.
network_name
,
binds
=
options
.
get_volume_binds
(),
mem_limit
=
options
.
get_memory_limit
(),
memswap_limit
=
options
.
get_memory_limit
(),
restart_policy
=
options
.
restart_policy
,
port_bindings
=
port_bindings
,
log_config
=
log_config
)
if
options
.
get_memory_limit
()
==
-
1
:
host_config
=
self
.
cli
.
create_host_config
(
network_mode
=
options
.
network_name
,
binds
=
options
.
get_volume_binds
(),
restart_policy
=
options
.
restart_policy
,
port_bindings
=
port_bindings
,
log_config
=
log_config
)
else
:
host_config
=
self
.
cli
.
create_host_config
(
network_mode
=
options
.
network_name
,
binds
=
options
.
get_volume_binds
(),
mem_limit
=
options
.
get_memory_limit
(),
memswap_limit
=
options
.
get_memory_limit
(),
restart_policy
=
options
.
restart_policy
,
port_bindings
=
port_bindings
,
log_config
=
log_config
)
cont
=
self
.
cli
.
create_container
(
image
=
image
,
environment
=
options
.
environment
,
network_disabled
=
False
,
...
...
zoe_master/zapp_to_docker.py
View file @
3c129690
...
...
@@ -73,8 +73,7 @@ def _spawn_service(execution: Execution, service: Service, env_subst_dict: dict)
copts
=
DockerContainerOptions
()
copts
.
gelf_log_address
=
get_conf
().
gelf_address
copts
.
name
=
service
.
dns_name
if
service
.
description
[
'required_resources'
][
'memory'
]
!=
-
1
:
copts
.
set_memory_limit
(
service
.
description
[
'required_resources'
][
'memory'
])
copts
.
set_memory_limit
(
service
.
description
[
'required_resources'
][
'memory'
])
copts
.
network_name
=
get_conf
().
overlay_network_name
copts
.
labels
=
{
'zoe.execution.name'
:
execution
.
name
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment