autokctrl-team opened a new issue, #917: URL: https://github.com/apache/solr-operator/issues/917
## Description When a `SolrCloud` uses a ConfigMap to provide `log4j2.xml`, changing the logging configuration may not update the running Solr pods if the file contains `monitorInterval="0"` or mentions `monitorInterval` only in an XML comment. The operator currently checks for the text `monitorInterval=` anywhere in the file. If it finds that text, it assumes Log4j will reload the configuration automatically and does not add a content hash to the pod template ([`controllers/solrcloud_controller.go:256-260`](https://github.com/apache/solr-operator/blob/ed5c5c7d28a4c1189d19f581259e05385c0d4b20/controllers/solrcloud_controller.go#L256-L260)). But a zero interval disables Log4j's file monitoring, and text inside a comment does not enable it. As a result, the ConfigMap may be updated without either an automatic reload or a pod restart, leaving Solr on the old logging configuration. ## Steps to reproduce 1. Create a ConfigMap containing a valid `log4j2.xml` with the root logger set to `INFO`. Use either: - a root `<Configuration monitorInterval="0">`, or - a comment such as `<!-- monitorInterval="30" -->` and no active root monitoring interval. 2. Create a `SolrCloud` that references this ConfigMap and wait for its pods to start. 3. Update the ConfigMap to set the root logger to `DEBUG`, leaving the zero interval or comment in place. 4. Wait for the ConfigMap update and operator reconciliation to complete, then check whether the running Solr pods use the new logging level. ## Expected behavior The new logging configuration should be applied. If Log4j does not have active file monitoring configured, the operator should update the pod template so Kubernetes rolls the pods. ## Observed behavior The ConfigMap is updated, but the pod template does not change and Log4j does not reload the file. The running Solr process continues to use `INFO` even though the mounted configuration requests `DEBUG`. The new setting takes effect after a pod restart. With a positive `monitorInterval` on the root element, Log4j reloads the updated configuration as expected. ## Additional information - The affected detection is in [`controllers/solrcloud_controller.go:256-260`](https://github.com/apache/solr-operator/blob/ed5c5c7d28a4c1189d19f581259e05385c0d4b20/controllers/solrcloud_controller.go#L256-L260). -- 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]
