-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sysprop driven XML tags to default solr.xml #636
Add sysprop driven XML tags to default solr.xml #636
Conversation
The default solr.xml now has the necessary plumbing to obey the commonly used `solr.sharedLib`, `solr.allowPaths`, and `enableMetrics` system properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I'm very excited to use the SOLR_MODULES option in 9.0. But until then this is great!
One question. If the user doesn't provide solr.sharedLib
, the xml section will start with ,
. Is that ok?
Oh, might as well include the |
Hmm, not quite sure what you mean. Are you talking about the GenerateAdditionalLibXMLPart change here? If so, AFAICT, 'libList' will never be empty because it at least always has
But, maybe I'm missing something @HoustonPutman ?
Makes sense to add that in while we're here, sure. Will add shortly |
So my thought was if |
Ah, yes - sorry, I was being dense. Had an epiphany about what you meant while I was afk getting dinner. I tested it as well - looks good on 8.11 and 9.3 both. So I think we're safe 😅 |
I've added the necessary changes to work The generated solr.xml was already set up to reference a different system property called Still doing a bit of testing on this and thinking through the upgrade ramifications (little worried about what this change means for administrators with custom solr.xml files that want to upgrade their operator), but this should all be ready for review. |
controllers/util/solr_util.go
Outdated
@@ -134,7 +135,7 @@ func GenerateStatefulSet(solrCloud *solr.SolrCloud, solrCloudStatus *solr.SolrCl | |||
|
|||
// Keep track of the SolrOpts that the Solr Operator needs to set | |||
// These will be added to the SolrOpts given by the user. | |||
allSolrOpts := []string{"-DhostPort=$(SOLR_NODE_PORT)"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can actually just use an envVar, SOLR_PORT_ADVERTISE
, instead of relying on SOLR_OPTS. Makes the code a small bit cleaner 🙂
But we can keep the hostPort
in place and deprecate it (So we would be using -DhostPort
and SOLR_PORT_ADVERTISE
at the same time), to give people with a custom solr.xml
a release to change their Solr.xml to use solr.port.advertise
, like is used in the official solr.xml
. As long as we document it in the upgrade notes, we should be good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right! I forgot bin/solr
was set up to convert SOLR_PORT_ADVERTISE
to a sysprop that solr.xml can take advantage of, cool. 👍
We need to support both simultaneously to give users with custom solr.xml files the opportunity to switch to the new sysprop.
Alright, should be ready for review again. We're now setting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One little suggestion for the upgrade notes, but otherwise it looks good to me!
Co-authored-by: Houston Putman <houstonputman@gmail.com>
The default solr.xml now has the necessary plumbing to obey the commonly used
solr.sharedLib
,solr.allowPaths
, andenableMetrics
system properties.Resolves #635