Uploaded image for project: 'FOLIO'
  1. FOLIO
  2. FOLIO-3171

folio-ansible: environment variables dont make it to docker

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Done
    • Component/s: None
    • Labels:
      None
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      DevOps Sprint 115, DevOps Sprint 116, DevOps Sprint 117, DevOps Sprint 118
    • Development Team:
      FOLIO DevOps
    • Release:
      R1 2021

      Description

      Overview:
      Steps to Reproduce:

      1. Try to install folio using folio-ansible

      Expected Results:
      Actual Results:

      Ansible Playbook error:

      TASK [okapi-tenant-deploy : Post install list for deployment and enabling] ********************************************************************************************************************************************************************
      fatal: [XXX.XXX.XXX.XXX]: FAILED! => {"changed": false, "connection": "close", "content": "Deployment failed for service mod-search-1.3.0. Could not connect to 192.168.128.89:9194: finishConnect(..) failed: Connection refused: /192.168.128.89:9194", "content_length": "156", "content_type": "text/plain", "elapsed": 822, "msg": "Status code was 400 and not [200]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "url": "http://192.168.128.89:9130/_/proxy/tenant
      s/bvb/install?deploy=true&tenantParameters=loadReference%3Dtrue%2CloadSample%3Dtrue", "vary": "origin"}

       

      Looking at the okapi log, i see:

      2021-05-21T20:27:08,505 INFO  DockerModuleHandle   mod-search-1.3.0 20:27:08.500 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
      2021-05-21T20:27:08,505 INFO  DockerModuleHandle   mod-search-1.3.0 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'folioEnvironment' defined in file [/opt/folio/BOOT-INF/classes/org/folio/search/con
      figuration/properties/FolioEnvironment.class]: Unexpected exception during bean creation; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'okapi.url' in value "${okapi.url}"

       

      So mod-search cannot run. With docker inspect i can see the environment:

                 "Env": [
                     "DB_MAXPOOLSIZE=5",
                     "DB_CHARSET=UTF-8",
                     "DB_PORT=5432",
                     "ELASTICSEARCH_USERNAME=elastic",
                     "SYSTEM_USER_PASSWORD=Mod-search-1-0-0",
                     "DB_HOST=192.168.128.89",
                     "DB_QUERYTIMEOUT=60000",
                     "KAFKA_PORT=9092",
                     "ELASTICSEARCH_PASSWORD=s3cret",
                     "INITIAL_LANGUAGES=eng",
                     "KAFKA_HOST=192.168.128.89",
                     "ELASTICSEARCH_HOST=192.168.128.89",
                     "DB_USERNAME=folio_admin",
                     "ELASTICSEARCH_URL=http://elasticsearch:9200",
                     "JAVA_OPTIONS=-XX:MaxRAMPercentage=66.0",
                     "ELASTICSEARCH_PORT=9301",
                     "DB_DATABASE=okapi_modules",
                     "DB_PASSWORD=folio_admin",
                     "PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                     "LANG=en_US.UTF-8",
                     "LANGUAGE=en_US:en",
                     "LC_ALL=en_US.UTF-8",
                     "JAVA_VERSION=jdk-11.0.10+9",
                     "JAVA_HOME=/opt/java/openjdk",
                     "JAVA_APP_DIR=/opt/folio"

       

      which is missing the OKAPI_URL Environment.

      Meanwhile checking the Ansible Output, i see:

      TASK [okapi-tenant-deploy : Build install list for modules with deployment] *******************************************************************************************************************************************************************

      ....

      ok: [138.246.234.10] => (item={'name': 'mod-search', 'version': '1.3.0', 'deploy': True, 'docker_env': [{'name': 'ELASTICSEARCH_URL', 'value': 'http://192.168.128.89:9301'}, {'name': 'OKAPI_URL', 'value': 'http://192.168.128.89:9130'}, {'n
      ame': 'JAVA_OPTIONS', 'value': '-XX:MaxRAMPercentage=66.0'}]})  

       

      Where OKAPI_URL and ELASTICSEARCH_URL are correctly set. The same happens to other modules with special environment like mod-pubsub.

      I did not yet find the point where the environment gets lost.

      Happens on folio-ansible main and r1-2021-release, does not happen on q3-2020-release
       i think.

      Additional Information:
      URL:
      Interested parties:

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              wayne Wayne Schneider
              Reporter:
              floriangleixner Florian Gleixner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  TestRail: Runs

                    TestRail: Cases