georgekaz opened a new issue, #505:
URL: https://github.com/apache/solr-operator/issues/505
security.json isn't exported to Zookeeper because the logic `if [
${#ZK_SECURITY_JSON} -lt 3 ]`
[here](https://github.com/apache/solr-operator/blob/1a8661bab03656f55a3352835b8496d5e6757f9d/controllers/util/solr_security_util.go#L211)
is always false because of the log4j entries. In my example below, it's 345
even when it's empty.
```
solr@dev-solrcloud-0:/tmp$
ZK_SECURITY_JSON=$(/opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost
dev-solrcloud-zookeeper-0.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181,dev-solrcloud-zookeeper-1.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181,dev-solrcloud-zookeeper-2.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181/
-cmd get /security.json); echo "${ZK_SECURITY_JSON}"
2022-12-13 17:02:20.232 INFO (main) [ ] o.a.s.c.c.ConnectionManager
Waiting for client to connect to ZooKeeper
2022-12-13 17:02:20.331 INFO (zkConnectionManagerCallback-2-thread-1) [ ]
o.a.s.c.c.ConnectionManager zkClient has connected
2022-12-13 17:02:20.331 INFO (main) [ ] o.a.s.c.c.ConnectionManager
Client is connected to ZooKeeper
{}
solr@dev-solrcloud-0:/tmp$
ZK_SECURITY_JSON=$(/opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost
dev-solrcloud-zookeeper-0.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181,dev-solrcloud-zookeeper-1.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181,dev-solrcloud-zookeeper-2.dev-solrcloud-zookeeper-headless.solr.svc.cluster.local:2181/
-cmd get /security.json); echo "${#ZK_SECURITY_JSON}"
345
```
Setting [custom log
configuration](https://github.com/apache/solr-operator/blob/8381105fa129cd0e42b383a899900a07387a0e65/docs/solr-cloud/solr-cloud-crd.md#custom-log-configuration)
doesn't help either because the env var and configmap volume don't get
included in the init container.
```
configMapOptions:
providedConfigMap: custom-solr-xml
```
Currently using the v0.6.0 of solr and solr-operator helm charts.
--
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]