[ 
https://issues.apache.org/jira/browse/SOLR-12429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shawn Heisey updated SOLR-12429:
--------------------------------
    Description: 
If a configset being uploaded to ZK contains a symlink pointing at a directory, 
an error is thrown, but it doesn't explain the real problem.  The upconfig 
should detect symlinks and throw an error indicating that they aren't 
supported.  If we can detect any other type of file that upconfig can't use 
(sockets, device files, etc), the error message should be relevant.

{noformat}
Exception in thread "main" java.io.IOException: File 
'/var/solr/mbsssss/artist/conf/common' exists but is a directory
        at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:286)
        at 
org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1815)
        at 
org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:391)
        at 
org.apache.solr.common.cloud.ZkMaintenanceUtils$1.visitFile(ZkMaintenanceUtils.java:305)
        at 
org.apache.solr.common.cloud.ZkMaintenanceUtils$1.visitFile(ZkMaintenanceUtils.java:291)
        at java.nio.file.Files.walkFileTree(Files.java:2670)
        at java.nio.file.Files.walkFileTree(Files.java:2742)
        at 
org.apache.solr.common.cloud.ZkMaintenanceUtils.uploadToZK(ZkMaintenanceUtils.java:291)
        at 
org.apache.solr.common.cloud.SolrZkClient.uploadToZK(SolrZkClient.java:793)
        at 
org.apache.solr.common.cloud.ZkConfigManager.uploadConfigDir(ZkConfigManager.java:78)
        at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:236)
{noformat}

I have not tested whether a symlink pointing at a file works, but I think that 
an error should be thrown for ANY symlink.


> ZK upconfig throws confusing error when it encounters a symlink
> ---------------------------------------------------------------
>
>                 Key: SOLR-12429
>                 URL: https://issues.apache.org/jira/browse/SOLR-12429
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCLI
>    Affects Versions: 7.3.1
>            Reporter: Shawn Heisey
>            Priority: Major
>
> If a configset being uploaded to ZK contains a symlink pointing at a 
> directory, an error is thrown, but it doesn't explain the real problem.  The 
> upconfig should detect symlinks and throw an error indicating that they 
> aren't supported.  If we can detect any other type of file that upconfig 
> can't use (sockets, device files, etc), the error message should be relevant.
> {noformat}
> Exception in thread "main" java.io.IOException: File 
> '/var/solr/mbsssss/artist/conf/common' exists but is a directory
>       at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:286)
>       at 
> org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1815)
>       at 
> org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:391)
>       at 
> org.apache.solr.common.cloud.ZkMaintenanceUtils$1.visitFile(ZkMaintenanceUtils.java:305)
>       at 
> org.apache.solr.common.cloud.ZkMaintenanceUtils$1.visitFile(ZkMaintenanceUtils.java:291)
>       at java.nio.file.Files.walkFileTree(Files.java:2670)
>       at java.nio.file.Files.walkFileTree(Files.java:2742)
>       at 
> org.apache.solr.common.cloud.ZkMaintenanceUtils.uploadToZK(ZkMaintenanceUtils.java:291)
>       at 
> org.apache.solr.common.cloud.SolrZkClient.uploadToZK(SolrZkClient.java:793)
>       at 
> org.apache.solr.common.cloud.ZkConfigManager.uploadConfigDir(ZkConfigManager.java:78)
>       at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:236)
> {noformat}
> I have not tested whether a symlink pointing at a file works, but I think 
> that an error should be thrown for ANY symlink.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to