Commit cd9b0a42 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 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.

/reviewed-by @kirr @jerome
/reviewed-on !1620
parent 1e1b968f
...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8 ...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in] [instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in filename = instance-wcfs.cfg.in
md5sum = de1583217645dd4b94c41cac16cc3d67 md5sum = 1031aea6842cb68173622c84b9e1ee19
...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
{% if zodb['type'] == 'zeo' -%} {% if zodb['type'] == 'zeo' -%}
{% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%} {% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%}
{% elif zodb['type'] == 'neo' -%} {% 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 argv = [] -%}
{% set i = 0 -%} {% set i = 0 -%}
{% for k,v in z|dictsort -%} {% for k,v in z|dictsort -%}
......
...@@ -106,4 +106,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8 ...@@ -106,4 +106,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in] [instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in filename = instance-wcfs.cfg.in
md5sum = de1583217645dd4b94c41cac16cc3d67 md5sum = 1031aea6842cb68173622c84b9e1ee19
...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
{% if zodb['type'] == 'zeo' -%} {% if zodb['type'] == 'zeo' -%}
{% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%} {% set zurl = ('zeo://%s?storage=%s' % (z['server'], z['storage'])) -%}
{% elif zodb['type'] == 'neo' -%} {% 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 argv = [] -%}
{% set i = 0 -%} {% set i = 0 -%}
{% for k,v in z|dictsort -%} {% 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