[
https://issues.apache.org/jira/browse/SOLR-18317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098555#comment-18098555
]
Chris M. Hostetter commented on SOLR-18317:
-------------------------------------------
IMO: remote callers (like the admin UI, or utility scripts) should not have to
know/care if the solr they are talking to use user-managed or not – they should
be able to send the exact same request params in eithercase
Strawman suggestions:
* Make the proxy APIs smart enough to recognize that {{nodes=all}} should just
be the local node if we are in user-managed mode (long before triggering an NPE)
** if {{nodes=a,b,c,...}} (ie: a literal list of nodes) in user-managed mode,
throw a clear 400 error explaining the problem (long before an NPE is triggered
for not having a zkStatereader)
...OR....
* Add a new {{nodes=any}} variant to these "proxiable" APIs
** in zk mode treat {{{}any==all{}}}, in user-managed mode treat {{any}} as
just the local node
** change Solr UI to send {{nodes=any}} anyplace it currently sends
{{nodes=all}}
** if any value other then {{any}} (ie: {{all}} or a literal list of nodes)
is received in user-managed mode, throw a very clear 400 error explaining the
problem (long before an NPE is triggered for not having a zkStatereader)
> standalone solr 10 logging UI tries to access zookeeper: NullPointerException
> -----------------------------------------------------------------------------
>
> Key: SOLR-18317
> URL: https://issues.apache.org/jira/browse/SOLR-18317
> Project: Solr
> Issue Type: Test
> Affects Versions: 10.0
> Reporter: Chris M. Hostetter
> Priority: Major
>
> The following problem affects solr-10 and the current 10x branch (but with
> slightly different stack traces)
> When using solr in "user managed" (aka: standalone) mode, attempts to use the
> admin UI logging screen to change the log level succeed in changing the log
> level on the node, but also cause a NullPointerException as the underlying
> java code tries to use zookeeper to lookup a list of nodes to proxy the
> request to.
> Making an explicit request to {{/admin/info/logging?set=...}} does not cause
> a NullPointerException.
> The underlying problem seems to be a disconnect in the
> assumptions/preconditions in various pieces of code:
> * the UI assumes it can _*always*_ include the {{nodes=all}} param when
> sending {{set=...}} to {{/admin/info/logging}}
> * {{AdminHandlersProxy.resolveNodes()}} and/or
> {{RemoteRequestProxy.validateNodeNames()}} seem to assume they will only be
> invoked in a "cloud" deployment
> * callers to {{AdminHandlersProxy.resolveNodes()}} and/or
> {{RemoteRequestProxy.validateNodeNames()}} seem to assume requests should be
> proxied anytime a {{node(s)}} param is specified.
> {panel}I believe this bug affects any Solr APIs that may delegate to
> {{AdminHandlersProxy}} and/or {{RemoteRequestProxy}} -- so at a minimum that
> would be {{LoggingHandler}}, {{MetricsHandler}}, and {{SystemInfoHandler}}
> {panel}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]