Solr 10 support#826
Open
tomaszpolachowski wants to merge 1 commit intoapache:mainfrom
Open
Conversation
Contributor
HoustonPutman
left a comment
There was a problem hiding this comment.
Looks good, we will have to ensure the integration tests look good.
| @@ -377,6 +377,10 @@ func GenerateStatefulSet(solrCloud *solr.SolrCloud, solrCloudStatus *solr.SolrCl | |||
| Name: "SOLR_HOST", | |||
Contributor
There was a problem hiding this comment.
Can we get rid of this now? Since we have SOLR_HOST_ADVERTISE? Or will it be used by the CLI when we interact with it via other commands?
Author
There was a problem hiding this comment.
It's for backward compatibility only. Depends if support for versions before introducing solr.host.advertise is necessary. If not then along with removal some tests and probeCommand in solr_security_util.go would require update.
Contributor
|
I tagged this with the 1.0.0 milestone. Will try to add a few other issues that are needed/wanted for next major.. |
14 tasks
danielmeint
added a commit
to danielmeint/solr-operator
that referenced
this pull request
Apr 27, 2026
Solr 10 introduced several breaking changes that prevent the operator from successfully starting and managing SolrClouds. This change adds version-conditional behavior for Solr 10 while preserving full backwards compatibility with Solr 9.x. Major changes covered: * solr.xml — Solr 10 removed several `<solrcloud>` parameters (genericCoreNodeNames, hostContext, allowPaths, metricsEnabled). A new `DefaultSolrXMLForSolr10` template, mirroring the stock Solr 10 template, is selected when the image tag indicates Solr 10+. * Host advertise — the `host` system property was renamed to `solr.host.advertise`. A `SOLR_HOST_ADVERTISE` env var is now set on Solr 10 pods. * Modules — Solr 10 removed `/opt/solr/contrib/<module>/lib` and `/opt/solr/dist`. Modules are now loaded via the `SOLR_MODULES` env var, and the operator no longer emits contrib paths in `sharedLib` for Solr 10. * hostPort sysprop — `-DhostPort` is no longer needed in Solr 10 and is skipped. * zkcli.sh removed — `setUrlSchemeClusterPropCmd` (TLS setup) now uses `solr cluster --property` and `solr zk cp` for Solr 10 instead of the removed `cloud-scripts/zkcli.sh`. * `solr api` CLI — `-get URL` was replaced with `--solr-url URL`. Secure probes (`useSecureProbe`) and the e2e helper (`callSolrApiInPod`) emit the new flag for Solr 10. * Basic auth — Solr 10 no longer honors the deprecated `-Dbasicauth=user:pass` JAVA_TOOL_OPTIONS path. The e2e helper now uses the native `--credentials user:pass` flag for Solr 10. Version detection lives on the `SolrCloud` type as `(*SolrCloud).IsSolr10OrLater()`, which parses the major version from the image tag and treats unparseable tags (e.g. "latest", "nightly") and a nil `SolrImage` as pre-10 for backwards compatibility. A package-level `IsSolr10OrLater(imageTag string)` is also exported for callers that only have a raw image string. Unit tests cover the version parser, both `solr.xml` templates, `setUrlSchemeClusterPropCmd` for both branches, the env vars emitted by `GenerateStatefulSet` for Solr 9 vs Solr 10, and both branches of `useSecureProbe`. End-to-end tests have been verified against Solr 10.0.0 across Basic, Scaling (with replica migration), Security JSON (provided + bootstrapped), TLS (Secrets and Mounted Dir, including ClientAuth Need/Want, CheckPeerName, VerifyClientHostname), Local-directory backups (recurring + single), Ingress, and Managed Rolling Upgrades. Solr 9.8.0 Basic was verified as a regression baseline. The Prometheus exporter is not covered: `solr-exporter` was removed from the Solr distribution in 10, and metrics are now expected to be scraped from Solr's built-in endpoint. That work is tracked separately in apache#820. Refs apache#821, apache#826. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It refers to issue #821
There 2 issue around running Solr Operator againt Solr 10:
hostparameter deprecated completely - must be solr.host.advertise instead