From 99cac86a07dec95785834f60a14fef5631f5f1d3 Mon Sep 17 00:00:00 2001 From: Matthew B <106352182+artntek@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:33:31 -0700 Subject: [PATCH 1/2] fix incorrect relpath --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 023192d1..3e012d47 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,7 +23,7 @@ RUN groupadd -g 1000 d1indexer && useradd -u 1000 -g 1000 d1indexer \ # The most recently built jar file is copied from the maven build directory to this dir by maven, so that # it can be copied to the image. -COPY ../target/dataone-index-worker-${TAG}-shaded.jar . +COPY ./target/dataone-index-worker-${TAG}-shaded.jar . COPY ./docker/entrypoint.sh . # Change the ownership of the jar and sh files From 812df9a5fcb73088d91aa37d54357334ede05b59 Mon Sep 17 00:00:00 2001 From: Matthew B <106352182+artntek@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:48:06 -0700 Subject: [PATCH 2/2] trying to fix indexer crash in k8s with 3.1.0 code --- helm/config/dataone-indexer.properties | 2 +- helm/values.yaml | 28 +++++++++++++++++++++++--- src/main/resources/log4j2.properties | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/helm/config/dataone-indexer.properties b/helm/config/dataone-indexer.properties index 003cca15..5c72e7c3 100644 --- a/helm/config/dataone-indexer.properties +++ b/helm/config/dataone-indexer.properties @@ -43,7 +43,7 @@ index.solr.versionConflict.max.attempts={{ default 50 .Values.idxworker.solrVerC # Storage properties storage.className={{ default "org.dataone.hashstore.filehashstore.FileHashStore" .Values.idxworker.storage.hashStoreClassName }} -storage.hashstore.rootDirectory={{ default "./target/hashstore" .Values.idxworker.storage.hashStoreRootDir }} +storage.hashstore.rootDirectory={{ default "/var/metacat/hashstore" .Values.idxworker.storage.hashStoreRootDir }} storage.hashstore.defaultNamespace={{ default "https://ns.dataone.org/service/types/v2.0#SystemMetadata" .Values.idxworker.storage.hashStoreDefaultNamespace }} # The following three properties must NOT be modified after the hash store is initialized storage.hashstore.fileNameAlgorithm={{ default "SHA-256" .Values.idxworker.storage.hashStoreAlgorithm }} diff --git a/helm/values.yaml b/helm/values.yaml index fe5f099b..983dff71 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -32,10 +32,23 @@ global: ## @section Dataone-Indexer Application-Specific Properties image: + ## @param image.repository repository that the image will be pulled from + ## repository: ghcr.io/dataoneorg/dataone-index-worker + + ## @param image.pullPolicy image pull policy - Always, Never, or IfNotPresent + ## pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - #tag: "" + + ## @param image.tag Overrides the image tag. Will default to the chart appVersion if set to "" + ## + tag: "" + + ## @param image.debug Specify if container debugging should be enabled (sets log level to "DEBUG") + ## Set to true if you would like to see extra information in metacat/tomcat logs. + ## * * WARNING - FOR TESTING ONLY! * * May result in secrets being printed to logs in plain text. + ## + debug: false imagePullSecrets: [] @@ -181,6 +194,15 @@ idxworker: ## tripleDbDirectory: /etc/dataone/tdb-cache + storage: + hashStoreClassName: "org.dataone.hashstore.filehashstore.FileHashStore" + hashStoreRootDir: "/var/metacat/hashstore" + hashStoreDefaultNamespace: "https://ns.dataone.org/service/types/v2.0#SystemMetadata" + # The following three properties must NOT be modified after the hashstore is initialized + hashStoreAlgorithm: "SHA-256" + hashStoreDirWidth: 2 + hashStoreDirDepth: 3 + ## @section RabbitMQ Bitnami Sub-Chart Configuration ## rabbitmq: @@ -200,7 +222,7 @@ rabbitmq: ## @param rabbitmq.existingPasswordSecret the k8s secret holding the rabbitmq password ## (must be associated with key: 'rabbitmq-password') ## - existingPasswordSecret: "" + existingPasswordSecret: "ssss" ## @section Solr Bitnami Sub-Chart Configuration diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties index 75a89bc2..67b1596f 100644 --- a/src/main/resources/log4j2.properties +++ b/src/main/resources/log4j2.properties @@ -34,7 +34,7 @@ appender.consoleAppender.layout.pattern=dataone-indexer %d{yyyyMMdd-HH:mm:ss}: [ ################################## # the root logger configuration # ################################## -rootLogger.level=INFO +rootLogger.level={{ ternary "DEBUG" "ERROR" .Values.image.debug }} rootLogger.appenderRef.console.ref=consoleAppender ################################################################################