Skip to content

Reloading solr core does not load mounted managed-schema #16

Description

@KatiRG

I followed the steps for binding using your own configuration files: https://github.com/ckan/ckan-solr?tab=readme-ov-file#use-your-own-configuration-files, but cannot get solr to see the custom managed-schema file.

After running the container with a bind mount (step 4), I inspected the container with docker inspect <container id> and confirmed that the mount had been made:

"Mounts": [
                {
                    "Type": "bind",
                    "Source": "/usr/lib/ckan/default/src/my_conf",
                    "Target": "/opt/solr/server/solr/configsets/ckan/conf"
                }
            ],

I then edited two files in /usr/lib/ckan/default/src/my_conf: the managed-schema file and the solrconfg.xml file (step 5). However, I noticed in the output of the inspection, that the managed-schema still points to the original container path and not to the mounted path:

"Env": [
                "PATH=/opt/solr/bin:/opt/solr/docker/scripts:/opt/solr/prometheus-exporter/bin:/opt/solr/cross-dc-manager/bin:/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "JAVA_HOME=/opt/java/openjdk",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "LC_ALL=en_US.UTF-8",
                "JAVA_VERSION=jdk-17.0.14+7",
                "SOLR_USER=solr",
                "SOLR_UID=8983",
                "SOLR_GROUP=solr",
                "SOLR_GID=8983",
                "SOLR_INCLUDE=/etc/default/solr.in.sh",
                "SOLR_HOME=/var/solr/data",
                "SOLR_PID_DIR=/var/solr",
                "SOLR_LOGS_DIR=/var/solr/logs",
                "LOG4J_PROPS=/var/solr/log4j2.xml",
                "SOLR_JETTY_HOST=0.0.0.0",
                "SOLR_ZK_EMBEDDED_HOST=0.0.0.0",
                "SOLR_CONFIG_DIR=/opt/solr/server/solr/configsets",
                "SOLR_SCHEMA_FILE=/opt/solr/server/solr/configsets/ckan/conf/managed-schema"
            ],

I reloaded the core using the Solr admin page (step 6) anyway then tried to update a dataset, but this failed because the application is looking at the original managed-schema fields and not the customized ones in the source directory /usr/lib/ckan/default/src/my_conf.

Any advice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions