You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Shawn Heisey (Jira)" <ji...@apache.org> on 2023/03/06 20:40:00 UTC
[jira] [Commented] (SOLR-16686) When using bin/solr zk cp, a non-zk destination requires a path, won't work with bare filename
[ https://issues.apache.org/jira/browse/SOLR-16686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17697135#comment-17697135 ]
Shawn Heisey commented on SOLR-16686:
-------------------------------------
Haven't looked at the code yet. I ran into this on 9.2.0-SNAPSHOT, freshly built from branch_9x. I expect it will also be a problem in earlier versions.
> When using bin/solr zk cp, a non-zk destination requires a path, won't work with bare filename
> ----------------------------------------------------------------------------------------------
>
> Key: SOLR-16686
> URL: https://issues.apache.org/jira/browse/SOLR-16686
> Project: Solr
> Issue Type: Bug
> Components: SolrCloud
> Affects Versions: 9.2
> Reporter: Shawn Heisey
> Priority: Minor
>
> I uploaded a security.json file from a bare filename, manipulated the security config in the UI, then tried to download the modified file. The download failed.
> This is the command used to upload:
> {code:none}
> /opt/solr/bin/solr zk cp security.json zk:/security.json -z localhost:9983
> {code}
> This is the command I tried that didn't work:
> {code:none}
> /opt/solr/bin/solr zk cp zk:/security.json security.json -z localhost:9983
> {code}
> If I change it to this, it works:
> {code:none}
> /opt/solr/bin/solr zk cp zk:/security.json ./security.json -z localhost:9983
> {code}
> The problem here is that it parses the local filename to extract the path component and then uses that to get a FileSystem object. With the bare filename, there IS no path info to be extracted, so it gets null and the code fails.
> Instead, if the extracted path is null, it should use the current working directory as the path.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org