Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16686

When using bin/solr zk cp, a non-zk destination requires a path, won't work with bare filename

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.1
    • 9.2
    • SolrCloud

    Description

      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:

      /opt/solr/bin/solr zk cp security.json zk:/security.json -z localhost:9983
      

      This is the command I tried that didn't work:

      /opt/solr/bin/solr zk cp zk:/security.json security.json -z localhost:9983
      

      If I change it to this, it works:

      /opt/solr/bin/solr zk cp zk:/security.json ./security.json -z localhost:9983
      

      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.

      Attachments

        1. SOLR_16686.patch
          0.8 kB
          Shawn Heisey

        Activity

          People

            elyograg Shawn Heisey
            elyograg Shawn Heisey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: