Commit aae0d49c authored by Julien Muchembled's avatar Julien Muchembled

erp5/repman: stop doing extra serialization of odbc.ini content with base64

This was useless. dumps is enough.
parent d6dd35af
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance.cfg] [instance.cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = af2fc4a7a0f782fed2cb1112ef3cb397 md5sum = 1c9c4c254f371337fe08b7922901f8a9
[instance-repman.cfg] [instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in _update_hash_filename_ = instance-repman.cfg.jinja2.in
...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30 ...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
[template-mariadb.cfg] [template-mariadb.cfg]
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in _update_hash_filename_ = instance-mariadb.cfg.jinja2.in
md5sum = 938f1e8087395757f5ae861d20500658 md5sum = aa25693b324ce5acc00f29b96a2516c0
[template-my-cnf] [template-my-cnf]
_update_hash_filename_ = templates/my.cnf.in _update_hash_filename_ = templates/my.cnf.in
......
...@@ -214,16 +214,10 @@ wait-for-files = ...@@ -214,16 +214,10 @@ wait-for-files =
{{ supervisord_lib.supervisord_program("mariadb", maradb_program_dict) }} {{ supervisord_lib.supervisord_program("mariadb", maradb_program_dict) }}
{% do part_list.append("supervisord-mariadb") %} {% do part_list.append("supervisord-mariadb") %}
[odbc-ini-text]
text = {{ dumps(base64.b64encode( slapparameter_dict.get('odbc-ini', '').encode() )) }}
[{{ section('odbc-ini') }}] [{{ section('odbc-ini') }}]
< = jinja2-template-base recipe = slapos.recipe.template
rendered = ${directory:etc}/odbc.ini output = ${directory:etc}/odbc.ini
template = inline:{% raw -%} inline = {{ dumps(slapparameter_dict.get('odbc-ini', '')) }}
{{ parameter_dict['text'].decode('base64') }}
{%- endraw %}
context = section parameter_dict odbc-ini-text
[{{ section('logrotate-entry-mariadb') }}] [{{ section('logrotate-entry-mariadb') }}]
< = logrotate-entry-base < = logrotate-entry-base
......
...@@ -108,4 +108,3 @@ template = {{ template_mariadb }} ...@@ -108,4 +108,3 @@ template = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
section parameter_dict template-mariadb-parameters section parameter_dict template-mariadb-parameters
import base64 base64
...@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196 ...@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 4a1e279e3757c964caaa27137fecb66f md5sum = 2daa3aaa1263705c4628864230049c67
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
...@@ -70,7 +70,7 @@ md5sum = 274365ebbade26558ca4836837e781aa ...@@ -70,7 +70,7 @@ md5sum = 274365ebbade26558ca4836837e781aa
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = ed280a76c22247cf2a05fac29b8a8b30 md5sum = 165b0a50672138ee4a3fbe9239af11ba
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
......
...@@ -197,15 +197,9 @@ environ = ...@@ -197,15 +197,9 @@ environ =
[{{ section('odbc-ini') }}] [{{ section('odbc-ini') }}]
< = jinja2-template-base recipe = slapos.recipe.template
rendered = ${directory:etc}/odbc.ini output = ${directory:etc}/odbc.ini
template = inline:{% raw -%} inline = {{ dumps(slapparameter_dict.get('odbc-ini', '')) }}
{{ base64.b64decode(text).decode('utf-8') }}
{%- endraw %}
text = {{ dumps(base64.b64encode(slapparameter_dict.get('odbc-ini', '').encode('utf-8'))) }}
context =
key text :text
import base64 base64
[{{ section('logrotate-entry-mariadb') }}] [{{ section('logrotate-entry-mariadb') }}]
< = logrotate-entry-base < = logrotate-entry-base
......
...@@ -178,7 +178,6 @@ template = {{ template_mariadb }} ...@@ -178,7 +178,6 @@ template = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-mariadb-parameters section parameter_dict dynamic-template-mariadb-parameters
import base64 base64
# Keep a section for backward compatibility for removed types # Keep a section for backward compatibility for removed types
# Once the section is removed, ghost instances will keep failing until # Once the section is removed, ghost instances will keep failing until
......
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