erwanval opened a new issue, #720:
URL: https://github.com/apache/solr-operator/issues/720

   This is a regression caused by 
[#660](https://github.com/apache/solr-operator/pull/660).
   
   During the first initialization of SolrCloud, the security.json doesn't 
exists in Zookeeper, which cause an exception during the ```setup-zk``` 
initContainer  [zkcli.sh 
command](https://github.com/apache/solr-operator/blob/main/controllers/util/solr_security_util.go#L241)
   With the change introduced in above PR, when there is an error, it now 
completely skip the upload. Then the SolR just starts with no security.json at 
all.
   It seems an empty one is created during the main container initialization, 
so upon manual restart, ```setup-zk``` run as expected and the real 
security.json is uploaded.
   
   I'm not sure how to solve this while retaining the reason why this change 
has been introduced in the first place. Maybe the ```zkcli.sh``` could return a 
different error code depending on the kind of exception it encounters (missing 
security.json, or everything else)?
   
   ```setup-zk``` logs during first init:
   <details>
   
   ERROR: KeeperErrorCode = NoNode for /solr/solr
   
   Creating ZooKeeper path /solr/solr on ZooKeeper at zookeeper.solr.svc:2181
   INFO  - 2024-08-23 08:25:26.748; 
org.apache.solr.common.cloud.ConnectionManager; Waiting for client to connect 
to ZooKeeper
   INFO  - 2024-08-23 08:25:26.786; 
org.apache.solr.common.cloud.ConnectionManager; zkClient has connected
   INFO  - 2024-08-23 08:25:26.786; 
org.apache.solr.common.cloud.ConnectionManager; Client is connected to ZooKeeper
   Exception in thread "main" 
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode 
for /security.json
       at org.apache.zookeeper.KeeperException.create(KeeperException.java:118)
       at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
       at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:2358)
       at 
org.apache.solr.common.cloud.SolrZkClient.lambda$getData$6(SolrZkClient.java:349)
       at 
org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:79)
       at 
org.apache.solr.common.cloud.SolrZkClient.getData(SolrZkClient.java:349)
       at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:328)
   </details>


-- 
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]

Reply via email to