[COMMON] Fix Portal MariaDB deploy error 11/130711/4
authorVladislav Sheshalevich <onlyselain@gmail.com>
Sun, 4 Sep 2022 08:43:51 +0000 (11:43 +0300)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 5 Sep 2022 07:38:12 +0000 (09:38 +0200)
Make fix to install Portal using OOM from scratch using user guide

Issue-ID: OOM-3032

Signed-off-by: Vladislav Sheshalevich <onlyselain@gmail.com>
Change-Id: I07f444d49c76b63abf889cc69b875795f84655d0

kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh

index 63d266b..7098779 100644 (file)
@@ -110,7 +110,7 @@ docker_temp_server_start() {
         # only use the root password if the database has already been initializaed
         # so that it won't try to fill in a password file when it hasn't been set yet
         extraArgs=""
-        if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
+        if [ "$DATABASE_ALREADY_EXISTS" = "false" ]; then
             extraArgs=${extraArgs}" --dont-use-mysql-root-password"
         fi
         if echo 'SELECT 1' |docker_process_sql ${extraArgs} --database=mysql >/dev/null 2>&1; then
@@ -344,7 +344,7 @@ _main() {
         fi
 
         # there's no database, so it needs to be initialized
-        if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
+        if [ "$DATABASE_ALREADY_EXISTS" = "false" ]; then
             docker_verify_minimum_env
 
             # check dir permissions to reduce likelihood of half-initialized database