Commit 7e3bdc1e authored by Levin Zimmermann's avatar Levin Zimmermann

stack/erp5/WCFS: Fix connection to NEO cluster with SSL

'wendelin.core' needs to differentiate between a NEO cluster with SSL
and without SSL from a normalized zurl (e.g. a zurl which doesn't
contain any paths to encryption files). Therefore the 'neo' / 'neos'
scheme difference was introduced in nexedi/neoppod@bc3e38ea.
This patch introduces this difference in zurl that SlapOS provides for
'wendelin.core' - this essentially fixes a ERP5+WCFS setup that connects
to a NEO cluster with activated SSL.
parent b628ea13
......@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in
md5sum = 36a5adc0fb9756836ee31def4084a088
md5sum = 74a96e35ea3615243a306d375004d111
......@@ -12,7 +12,14 @@
{% if zodb['type'] == 'zeo' -%}
{% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%}
{% elif zodb['type'] == 'neo' -%}
{% set zurl = ('neo://%s@%s' % (z.pop('name'), z.pop('master_nodes')|replace(" ", ","))) -%}
{# If 'ca' in storage-dict, SSL is true. #}
{# (see https://lab.nexedi.com/nexedi/slapos/blob/397726e1/stack/erp5/instance-zodb-base.cfg.in#L17-21) #}
{% if "ca" in z -%}
{% set zurlscheme = 'neos' -%}
{% else -%}
{% set zurlscheme = 'neo' -%}
{% endif -%}
{% set zurl = ('%s://%s@%s' % (zurlscheme, z.pop('name'), z.pop('master_nodes')|replace(" ", ","))) -%}
{% set argv = [] -%}
{% set i = 0 -%}
{% for k,v in z|dictsort -%}
......
......@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in
md5sum = 36a5adc0fb9756836ee31def4084a088
md5sum = 74a96e35ea3615243a306d375004d111
......@@ -12,7 +12,14 @@
{% if zodb['type'] == 'zeo' -%}
{% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%}
{% elif zodb['type'] == 'neo' -%}
{% set zurl = ('neo://%s@%s' % (z.pop('name'), z.pop('master_nodes')|replace(" ", ","))) -%}
{# If 'ca' in storage-dict, SSL is true. #}
{# (see https://lab.nexedi.com/nexedi/slapos/blob/397726e1/stack/erp5/instance-zodb-base.cfg.in#L17-21) #}
{% if "ca" in z -%}
{% set zurlscheme = 'neos' -%}
{% else -%}
{% set zurlscheme = 'neo' -%}
{% endif -%}
{% set zurl = ('%s://%s@%s' % (zurlscheme, z.pop('name'), z.pop('master_nodes')|replace(" ", ","))) -%}
{% set argv = [] -%}
{% set i = 0 -%}
{% for k,v in z|dictsort -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment