fix(database): don't enforce client encoding
authorJavier Bértoli <javier@netmanagers.com.ar>
Wed, 14 Apr 2021 20:10:02 +0000 (17:10 -0300)
committerJavier Bértoli <javier@netmanagers.com.ar>
Wed, 28 Apr 2021 22:12:18 +0000 (19:12 -0300)
arvados/files/default/config.tmpl.jinja
pillar.example
test/integration/api/controls/config_spec.rb
test/salt/pillar/arvados.sls
test/salt/pillar/arvados_dev.sls

index c52186ee567bd8d4104ae2c352d99b1351426579..9c9db2fe4e6cb43d331b39b77037f1a1de5ee6ba 100644 (file)
@@ -73,7 +73,6 @@ Clusters:
         host: {{ arvados.cluster.database.host }}
         password: {{ arvados.cluster.database.password | yaml_encode }}
         user: {{ arvados.cluster.database.user }}
         host: {{ arvados.cluster.database.host }}
         password: {{ arvados.cluster.database.password | yaml_encode }}
         user: {{ arvados.cluster.database.user }}
-        client_encoding: {{ arvados.cluster.database.client_encoding }}
         {%- if arvados.cluster.database.extra_conn_params is defined %}
         {{ arvados.cluster.database.extra_conn_params | yaml(False) | indent(8) }}
         {%- endif %}
         {%- if arvados.cluster.database.extra_conn_params is defined %}
         {{ arvados.cluster.database.extra_conn_params | yaml(False) | indent(8) }}
         {%- endif %}
index 4ff35cdb15cb4d3137e8a511a835ce3cd66a9fe5..233b492cb0b52ee20d112d1ab184ef55913ab556 100644 (file)
@@ -65,13 +65,12 @@ arvados:
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
-      encoding: en_US.utf8
-      client_encoding: UTF8
       # You can pass extra database connections parameters here,
       # which will be rendered as yaml.
       # extra_conn_params:
       #  sslmode: prefer
       #  verify-ca: false
       # You can pass extra database connections parameters here,
       # which will be rendered as yaml.
       # extra_conn_params:
       #  sslmode: prefer
       #  verify-ca: false
+      #  client_encoding: UTF8
 
 
     tls:
 
 
     tls:
index 57fffc1284d65e3af8100ef9ce27982dcc4851bf..0f64cb2db41911054254551a694875bea9d053e0 100644 (file)
@@ -10,6 +10,20 @@ rails_stanza = <<-RAILS_STANZA
           http://api.internal:8004: {}
 RAILS_STANZA
 
           http://api.internal:8004: {}
 RAILS_STANZA
 
+database_stanza = <<-DATABASE_STANZA
+    ### DATABASE CONFIGURATION
+    PostgreSQL:
+      ConnectionPool: 32
+      Connection:
+        # All parameters here are passed to the PG client library in a connection string;
+        # see https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
+        dbname: arvados
+        host: 127.0.0.1
+        password: "changeme_arvados"
+        user: arvados
+        client_encoding: UTF8
+DATABASE_STANZA
+
 group = case os[:name]
         when 'centos'
           'nginx'
 group = case os[:name]
         when 'centos'
           'nginx'
@@ -32,5 +46,6 @@ control 'arvados configuration' do
     end
     its('content') { should include(api_stanza) }
     its('content') { should include(rails_stanza) }
     end
     its('content') { should include(api_stanza) }
     its('content') { should include(rails_stanza) }
+    its('content') { should include(database_stanza) }
   end
 end
   end
 end
index 73efb61efa8255ff15b12c05c5d963d80feb5f02..a063823956a4c139978e7057b7aa451706e33c4f 100644 (file)
@@ -39,14 +39,13 @@ arvados:
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
-      encoding: en_US.utf8
-      client_encoding: UTF8
+      extra_conn_params:
+        client_encoding: UTF8
       # Centos7 does not enable SSL by default, so we disable
       # it here just for testing of the formula purposes only.
       # You should not do this in production, and should
       # configure Postgres certificates correctly
       {%- if grains.os_family in ('RedHat',) %}
       # Centos7 does not enable SSL by default, so we disable
       # it here just for testing of the formula purposes only.
       # You should not do this in production, and should
       # configure Postgres certificates correctly
       {%- if grains.os_family in ('RedHat',) %}
-      extra_conn_params:
         sslmode: disable
       {%- endif %}
 
         sslmode: disable
       {%- endif %}
 
index e1c42cd868e571263c77b4fc087f2e1f81942968..35a5bffc154b169f586e67778007b38fbf03ffaa 100644 (file)
@@ -65,8 +65,8 @@ arvados:
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
       host: 127.0.0.1
       password: changeme_arvados
       user: arvados
-      encoding: en_US.utf8
-      client_encoding: UTF8
+      extra_conn_params:
+        client_encoding: UTF8
 
     tls:
       # certificate: ''
 
     tls:
       # certificate: ''