autokctrl-team opened a new issue, #918: URL: https://github.com/apache/solr-operator/issues/918
## Description For a new `SolrCloud` using operator-generated Basic Auth credentials, the operator creates the credentials Secret and bootstrap Secret in separate API requests. If the first request succeeds and the second fails, the credentials Secret remains. On retry, the operator sees that credentials Secret and allows the missing bootstrap Secret, so the generated StatefulSet has no `SECURITY_JSON` environment variable or `setup-zk` upload command. The two-Secret creation and retry handling are in [`solr_security_util.go`](https://github.com/apache/solr-operator/blob/ed5c5c7d28a4c1189d19f581259e05385c0d4b20/controllers/util/solr_security_util.go#L104-L187); the initializer is added only when security JSON is available in [`solr_util.go`](https://github.com/apache/solr-operator/blob/ed5c5c7d28a4c1189d19f581259e05385c0d4b20/controllers/util/solr_util.go#L1304-L1307). This can happen during initial deployment if the operator is interrupted or the Kubernetes API temporarily fails between the two Secret writes. ## Steps to reproduce 1. Create a new `SolrCloud` with Basic Auth enabled and let the operator generate the credentials and bootstrap configuration. 2. During initial setup, a temporary Kubernetes API failure or operator restart occurs after the credentials Secret is created but before the bootstrap Secret is created. 3. After the API and operator recover, wait for the normal reconciliation retry. 4. Check whether the Solr pods receive the security bootstrap configuration and whether `/security.json` exists in ZooKeeper. ## Expected behavior On retry, the operator should create the missing bootstrap Secret and initialize `/security.json` before starting Solr. If it cannot do that, it should keep retrying instead of creating pods without the security configuration. ## Observed behavior The Solr pods start, but `/security.json` remains absent from ZooKeeper and later reconciliations do not initialize it. -- 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]
