Issue
When running the lucidworks/fm-upgrade-apps-to-solr-9 Docker image to upgrade Fusion apps to Solr 9, the following error may occur:
/usr/bin/entrypoint.sh: line 26: cd: /upgrade-work: Permission denied.Additionally, warnings related to ZK_HOST may be present, such as pointing to an HTTP endpoint instead of a Zookeeper address.
Diagnosis
To confirm whether this article applies:
The Docker command references a volume mount (e.g.,
-v $(pwd):/upgrade-work) that may not be writable by the container.The
ZK_HOSTenvironment variable is incorrectly set to an HTTP port (e.g.,:8080) rather than pointing to the actual Zookeeper service.Warning messages such as
OPEN_ACL_UNSAFEare present, but these are non-fatal and can be safely ignored.
Environment
Fusion 5.9.14
AWS EKS (Amazon Elastic Kubernetes Service)
Docker image:
lucidworks/fm-upgrade-apps-to-solr-9:5.9.12Blue/green deployment architecture
Cause
This issue typically occurs due to:
Insufficient write permissions on the local directory being mounted into the container.
Incorrect value set for the
ZK_HOSTenvironment variable, such as a host:port intended for HTTP instead of Zookeeper.
Resolution
Step 1: Create a writable working directory
Create a directory to use as the mount point:
WORKDIR="$HOME/fusion-solr9-upgrade"
mkdir -p "$WORKDIR"If you plan to run the container without root privileges, update the permissions:
chmod -R a+rwx "$WORKDIR"Step 2: Retrieve the correct Zookeeper host
Run the following command to extract the ZK_HOST value from a running Solr pod:
ZK=$(kubectl get pods --all-namespaces -l app.kubernetes.io/name=solr -o jsonpath='{.items[0].metadata.namespace} {.items[0].metadata.name}' | \
awk '{print "kubectl -n "$1" exec -it "$2" -- printenv ZK_HOST"}' | sh | tr -d '\r')Step 3: Run the upgrade Docker image
Perform a dry run:
docker run --rm -u 0:0 \
-v "$WORKDIR":/upgrade-work:rw \
-e ZK_HOST="$ZK" \
-e DRY_RUN=1 \
lucidworks/fm-upgrade-apps-to-solr-9:5.9.12Execute the actual upgrade:
docker run --rm -u 0:0 \
-v "$WORKDIR":/upgrade-work:rw \
-e ZK_HOST="$ZK" \
lucidworks/fm-upgrade-apps-to-solr-9:5.9.12Once complete, confirm that the apps have been upgraded successfully in Solr 9.