diff --git a/doc/source/deployer_installation.rst b/doc/source/deployer_installation.rst index 2675d5f8..a1aa9e56 100644 --- a/doc/source/deployer_installation.rst +++ b/doc/source/deployer_installation.rst @@ -278,10 +278,12 @@ that do not appear in the above configurable installation_vars.yml - "storlet_dependency". The name of the container where dependencies are uploaded to. - "storlet_log". Curently not in use. Placeholder for future log upload feature. - "storlet_images". The name of the container for uploading user tailored images. - - "storlet_timeout". The time Swift gives the a storlet to start producung output. - "storlet_gateway_module". The class implementing the storlets plugin used. Currently, we have only one such plugin. - "storlet_execute_on_proxy_only". Controls whether storlets will run only on the proxy servers. + + - The config parameters of the storlet gateway plugin + + - "storlet_timeout". The time Swift gives the a storlet to start producung output. - "restart_linux_container_timeout": The number of times the middleware tries to spwans a Docker container before giving up. - diff --git a/doc/source/engine_dev_installation.rst b/doc/source/engine_dev_installation.rst index 35bb70e1..c657a4f0 100644 --- a/doc/source/engine_dev_installation.rst +++ b/doc/source/engine_dev_installation.rst @@ -359,7 +359,6 @@ do the following: use = egg:storlets#storlet_handler storlet_container = storlet storlet_dependency = dependency - storlet_timeout = 40 storlet_gateway_module = docker storlet_gateway_conf = /etc/swift/storlet_docker_gateway.conf storlet_execute_on_proxy_only = false @@ -384,7 +383,6 @@ otherwise the file is typically /etc/swift/object-server.conf use = egg:storlets#storlet_handler storlet_container = storlet storlet_dependency = dependency - storlet_timeout = 40 storlet_gateway_module = docker storlet_gateway_conf = /etc/swift/storlet_docker_gateway.conf storlet_execute_on_proxy_only = false @@ -404,6 +402,7 @@ with the following content: script_dir = /home/docker_device/scripts storlets_dir = /home/docker_device/storlets/scopes pipes_dir = /home/docker_device/pipes/scopes + storlet_timeout = 40 docker_repo = restart_linux_container_timeout = 3 diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index 743c6f9d..37824846 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -287,7 +287,6 @@ use = egg:swift#xprofile # storlet_dependency = dependency # storlet_logcontainer = storletlog # storlet_execute_on_proxy_only = false -# storlet_timeout = 40 # storlet_gateway_module = swift.common.middleware.storlet_common.StorletStubGateway # storlet_gateway_conf = /etc/swift/storlet_stub_gateway.conf # execution_server = object diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index 1eeb40e3..91379c3f 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -631,7 +631,6 @@ use = egg:swift#xprofile # storlet_dependency = dependency # storlet_logcontainer = storletlog # storlet_execute_on_proxy_only = false -# storlet_timeout = 40 # storlet_gateway_module = docker # storlet_gateway_conf = /etc/swift/storlet_stub_gateway.conf # execution_server = proxy diff --git a/install/storlets/roles/common_files/swift_config.py b/install/storlets/roles/common_files/swift_config.py index 125b0aab..67942d4f 100644 --- a/install/storlets/roles/common_files/swift_config.py +++ b/install/storlets/roles/common_files/swift_config.py @@ -146,8 +146,6 @@ def patch_swift_config_file(conf, conf_file, service): conf.get('common-confs', 'storlet_container')) f.write('storlet_dependency = %s\n' % conf.get('common-confs', 'storlet_dependency')) - f.write('storlet_timeout = %s\n' % - conf.get('common-confs', 'storlet_timeout')) f.write('storlet_gateway_module = %s\n' % conf.get('common-confs', 'storlet_gateway_module')) f.write('storlet_gateway_conf = %s\n' % diff --git a/install/storlets/roles/common_templates/storlet-docker-gateway.conf-sample b/install/storlets/roles/common_templates/storlet-docker-gateway.conf-sample index 6979f583..d3f796e1 100644 --- a/install/storlets/roles/common_templates/storlet-docker-gateway.conf-sample +++ b/install/storlets/roles/common_templates/storlet-docker-gateway.conf-sample @@ -8,3 +8,4 @@ storlets_dir = {{ docker_device }}/storlets/scopes pipes_dir = {{ docker_device }}/pipes/scopes docker_repo = "" restart_linux_container_timeout = {{ restart_linux_container_timeout }} +storlet_timeout = {{ storlet_timeout }} diff --git a/install/storlets/roles/common_templates/swift_middleware_conf b/install/storlets/roles/common_templates/swift_middleware_conf index 5fdbb3bb..012a4a64 100644 --- a/install/storlets/roles/common_templates/swift_middleware_conf +++ b/install/storlets/roles/common_templates/swift_middleware_conf @@ -11,7 +11,6 @@ storlet_middleware = {{ storlet_middleware }} storlet_container = {{ storlet_container }} storlet_dependency = {{ storlet_dependency }} #storlet_log = {{ storlet_log }} -storlet_timeout = {{ storlet_timeout }} storlet_gateway_module = {{ storlet_gateway_module }} storlet_gateway_conf = {{ storlet_gateway_conf_file }} storlet_proxy_execution = {{ storlet_execute_on_proxy_only }} diff --git a/storlets/agent/daemon/manager.py b/storlets/agent/daemon/manager.py index 56906b6e..ac01b150 100644 --- a/storlets/agent/daemon/manager.py +++ b/storlets/agent/daemon/manager.py @@ -19,6 +19,7 @@ import os import pwd import sys import uuid +import signal from storlets.sbus import SBus from storlets.sbus.command import SBUS_CMD_PREFIX from storlets.agent.daemon.files import StorletInputFile, \ @@ -259,7 +260,7 @@ class Daemon(object): outfile.write('False: BAD') else: try: - os.kill(pid) + os.kill(pid, signal.SIGTERM) self._remove_pid(pid) outfile.write('True: OK') except OSError: