8.3 Adding a Module After Data Volume Creation

Hello all,

I am currently trying to add additional modules to my existing volume mounts in docker.

Following this guide, I created the docker container with no issue. What I found is that after the volume was created, any additional modules that are added to the folder are not loaded into the gateway. The only way I could automatically load the modules was to delete modules.json and restart the gateway. I got the idea to delete modules.json from this guide. Is this expected behavior or am I missing something?

Previously in 8.1, I could just add the modl file, rebuild the image, restart the gateway and it would work.

Reproducible Example:

Dockerfile

ARG IGNITION_VERSION
FROM inductiveautomation/ignition:${IGNITION_VERSION}
 
COPY *.modl /usr/local/bin/ignition/user-lib/modules/

compose.yaml

services:
  gateway:
    build:
      context: gw-build
      ## Specify the upstream version to derive from for the build argument in the Docker file.
      args:
        IGNITION_VERSION: 8.3.7
    pull_policy: build
    ports:
      - 8088:8088
    volumes:
      - gateway-data:/usr/local/bin/ignition/data
    environment:
      ACCEPT_IGNITION_EULA: "Y"
      GATEWAY_ADMIN_PASSWORD: password
      GATEWAY_MODULES_ENABLED: dev.bwdesigngroup.prometheus.PrometheusExporter,project-scan-endpoint
      ACCEPT_MODULE_LICENSES: dev.bwdesigngroup.prometheus.PrometheusExporter,project-scan-endpoint
      ACCEPT_MODULE_CERTS: dev.bwdesigngroup.prometheus.PrometheusExporter,project-scan-endpoint
      IGNITION_EDITION: standard
    command: >
      -n Ignition-supp-66195

volumes:
  gateway-data:

Steps taken

  1. docker compose -f 'compose.yaml' up -d --build 'gateway'
  2. docker compose down
  3. Add modl files to gw-build/ after gateway-data is created
  4. docker compose -f 'compose.yaml' up -d --build 'gateway'

The expected outcome for me at least is that the gateway will have the newly added modules but this is not the case. Below is how I resolved it:

docker exec -it <docker-id> /bin/bash
rm data/modules.json
docker compose down && docker compose -f 'compose.yaml' up -d --build 'gateway'

Thanks in advance!

This is expected behavior; some other changes (in addition to generally dropping module hot-loading) necessitated the modules.json file as the gateway's source of truth about which modules to load. You can either remove it and allow the gateway to create it on startup (possibly requiring user acceptance of EULA bits in a commissioning phase), create it once and then encode the file into your derived image, or, in theory, generate the hashes used dynamically; I don't know the exact details offhand but I believe it's essentially a hash of the license of the particular module file.

There is actually a bug ticket with module ids having capitals (IGN-16647) I had submitted through support when using ACCEPT_MODULE_LICENSES and ACCEPT_MODULE_CERTS to auto approve the EULA and certs on compose up. I wouldn't be surprised if project-scan-endpoint also exhibited the same behavior with the -.

I would be… I ended up being the one to triage that issue and write up the ticket… it was very clearly because there’s a toLowerCase() transformation being done in one place, and case-sensitive lookups elsewhere. A - shouldn’t be affected by this.

There is actually a bug ticket with module ids having capitals (IGN-16647)

Did they give an estimate on the fix? In the meantime, I have an issue raised with the module developers. So changing the module identifiers to lower case will fix it based on Kevin's response

I wouldn't be surprised if project-scan-endpoint also exhibited the same behavior with the -.

project-scan-endpoint works great with no issues.

Thanks all for the responses!

It only got logged yesterday, the team it is destined for hasn't even had a chance to review/scrub it yet.