diff --git a/slapos/recipe/generate_erp5_tidstorage.py b/slapos/recipe/generate_erp5_tidstorage.py index 031e5f7aa3d10ff1a548343a2069f2ccf3c80e96..2f8dcba706c6ff5afbae2c9e58efbd5ed2b29f33 100644 --- a/slapos/recipe/generate_erp5_tidstorage.py +++ b/slapos/recipe/generate_erp5_tidstorage.py @@ -100,23 +100,23 @@ class Recipe(GenericSlapRecipe): zope_id = 'zope-distribution' part_list.append(zope_id) part_list.append('logrotate-entry-%s' % zope_id) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, zope_port=current_zope_port, - **zope_dict) + output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, + zope_port=current_zope_port, zope_timeserver=True, **zope_dict) # always one admin node current_zope_port += 1 zope_id = 'zope-admin' part_list.append(zope_id) part_list.append('logrotate-entry-%s' % zope_id) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, zope_port=current_zope_port, - **zope_dict) + output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, + zope_port=current_zope_port, zope_timeserver=False, **zope_dict) # handle activity key for q in range(1, json_data['activity']['zopecount'] + 1): current_zope_port += 1 part_name = 'zope-activity-%s' % q part_list.append(part_name) part_list.append('logrotate-entry-%s' % part_name) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=part_name, zope_port=current_zope_port, - **zope_dict) + output += snippet_zope % dict(zope_thread_amount=1, zope_id=part_name, + zope_port=current_zope_port, zope_timeserver=True, **zope_dict) # handle backend key snippet_backend = open(self.options['snippet-backend']).read() publish_url_list = [] @@ -127,7 +127,10 @@ class Recipe(GenericSlapRecipe): part_name = 'zope-%s-%s' % (backend_name, q) part_list.append(part_name) part_list.append('logrotate-entry-%s' % part_name) - output += snippet_zope % dict(zope_thread_amount=backend_configuration['thread-amount'], zope_id=part_name, zope_port=current_zope_port, **zope_dict) + output += snippet_zope % dict( + zope_thread_amount=backend_configuration['thread-amount'], + zope_id=part_name, zope_port=current_zope_port, zope_timeserver=False, + **zope_dict) haproxy_backend_list.append('${%(part_name)s:ip}:${%(part_name)s:port}' % dict(part_name=part_name)) # now generate backend access current_apache_port += 1 diff --git a/slapos/recipe/generic_zope_zeo_client/__init__.py b/slapos/recipe/generic_zope_zeo_client/__init__.py index b13068de019509dad3f4139afe476a2d81a953ea..23880676b158245605dcf70c0c6b213d18c6d93b 100644 --- a/slapos/recipe/generic_zope_zeo_client/__init__.py +++ b/slapos/recipe/generic_zope_zeo_client/__init__.py @@ -140,6 +140,9 @@ class Recipe(GenericBaseRecipe): zope_wrapper_template_location = self.getTemplateFilename('zope.conf.in') zope_conf_content = self.substituteTemplate(zope_wrapper_template_location, zope_config) + if self.isTrueValue(self.options['timeserver']): + zope_conf_content += self.substituteTemplate(self.getTemplateFilename( + 'zope.conf.timeserver.in'), {}) zope_conf_path = self.createFile(self.options['configuration-file'], zope_conf_content) path_list.append(zope_conf_path) diff --git a/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in b/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in index c705ce27671eb2408eaf93cc05d06f229d8623ec..645371c3aa35d13819b2737e131b55a85ca8a609 100644 --- a/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in +++ b/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in @@ -60,9 +60,3 @@ lock-filename %(lock-filename)s dump_url %(dump_url)s secret %(secret)s </product-config> - -# ERP5 Timer Service -%%import timerserver -<timer-server> - interval 5 -</timer-server> diff --git a/software/erp5/snippet-zope.cfg b/software/erp5/snippet-zope.cfg index 6f8116634c92030070ee2ff564a0bd275e7a02ba..89227f239693e2ad6f50995dfc73ca6065ec0b29 100644 --- a/software/erp5/snippet-zope.cfg +++ b/software/erp5/snippet-zope.cfg @@ -16,6 +16,8 @@ timezone = %(timezone)s zeo-connection-string = %(zeo_connection_string)s +timeserver = %(zope_timeserver)s + # Paths wrapper = $${basedirectory:services}/%(zope_id)s instance-path = $${directory:instance} diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg index f3568fe2418898a877551c256735139a956a1805..d214a28dbbc06b1d1b8cae5ad896c8152200eacd 100644 --- a/software/erp5/software.cfg +++ b/software/erp5/software.cfg @@ -88,7 +88,7 @@ mode = 0644 [template-snippet-zope] recipe = slapos.recipe.template url = ${:_profile_base_location_}/snippet-zope.cfg -md5sum = b17eb5e49d0a08b22468dd51f89dc791 +md5sum = cca86232d644f0050f1f96c270867852 output = ${buildout:directory}/template-snippet-zope.cfg mode = 0644