janhoy opened a new pull request, #891: URL: https://github.com/apache/solr-operator/pull/891
🤖 AI assisted 🤖 Closes #871 The `preStop` hook ran `solr stop -p <port>` and emitted a `FailedPreStopHook` warning event on every pod deletion and every rolling update. On Solr 9.x the hook works, and that is why it fails: it stops Solr, so the hook process is killed with the container before it can exit 0. On Solr 10.x it is a no-op, because `solr stop` cannot find a Solr started in the foreground ([SOLR-18607](https://issues.apache.org/jira/browse/SOLR-18607)). Shutdown is unaffected. The kubelet's `SIGTERM` reaches Solr through tini and the `exec` in `bin/solr`, and that is what actually shut Solr down before this change too. This also drops the `SOLR_STOP_WAIT` envVar, which existed only to serve the hook. In foreground mode `bin/solr` never reads it, and `SOLR_START_WAIT` only derives from it on the background start path. `customSolrKubeOptions.podOptions.lifecycle` is untouched, so users can still set their own hooks. Tests that asserted the hook now assert that the container has no default lifecycle; four of them were dereferencing `Lifecycle.PostStart` to check for a hook removed back in #774, so those move to the same assertion. -- 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]
