Merge "Set ulimit for neutron agent containers"
This commit is contained in:
commit
7a829c128d
@ -90,6 +90,7 @@ def docker_arg_map(key, value):
|
||||
'pid': "--pid=%s" % value,
|
||||
'privileged': "--privileged=%s" % value.lower(),
|
||||
'user': "--user=%s" % value,
|
||||
'ulimit': "--ulimit=%s" % value,
|
||||
'volumes': "--volume=%s" % value,
|
||||
'volumes_from': "--volumes-from=%s" % value,
|
||||
}.get(key, None)
|
||||
@ -124,6 +125,11 @@ def run_docker_container(opts, container_name):
|
||||
arg = docker_arg_map("environment", env)
|
||||
if arg:
|
||||
cmd.append(arg)
|
||||
elif container_data == "ulimit":
|
||||
for limit in (json_data[step][container][container_data] or []):
|
||||
arg = docker_arg_map("ulimit", limit)
|
||||
if arg:
|
||||
cmd.append(arg)
|
||||
elif container_data == "volumes":
|
||||
for volume in (json_data[step][container][container_data] or []):
|
||||
arg = docker_arg_map("volumes", volume)
|
||||
|
@ -126,6 +126,7 @@ outputs:
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: /openstack/healthcheck
|
||||
ulimit: ['nofile=1024']
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
|
@ -104,6 +104,7 @@ outputs:
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: /openstack/healthcheck
|
||||
ulimit: ['nofile=1024']
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
|
@ -148,6 +148,7 @@ outputs:
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: /openstack/healthcheck
|
||||
ulimit: ['nofile=1024']
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
|
Loading…
x
Reference in New Issue
Block a user