jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698732535
@janhoy I found a temporary solution. the `solr zk` command is not
respecting the ZK_HOST environment variable. I created an init container
identical to `setup-zk` but, I added --zk-host ${ZK_HOST} to all the `solr zk`
commands. It works perfect! Here's the script:
```
solr zk cp --zk-host ${ZK_HOST} zk:/security.json /tmp/current_security.json
>/dev/null 2>&1; GET_CURRENT_SECURITY_JSON_EXIT_CODE=$?; if [
${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 0 ]; then if [ ! -s
/tmp/current_security.json ] || grep -q '^{}$' /tmp/current_security.json ];
then echo $SECURITY_JSON > /tmp/security.json; solr zk cp --zk-host ${ZK_HOST}
/tmp/security.json zk:/security.json >/dev/null 2>&1; echo 'Blank security.json
found. Put new security.json in ZK'; fi; elif [
${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 1 ]; then echo $SECURITY_JSON >
/tmp/security.json; solr zk cp --zk-host ${ZK_HOST} /tmp/security.json
zk:/security.json >/dev/null 2>&1; echo 'No security.json found. Put new
security.json in ZK'; fi
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]