Skip to content
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

Installation failed when directories are on different file systems #9011

Merged
merged 1 commit into from Jan 6, 2015

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Dec 19, 2014

Plugin installation failed when bin/, conf/ and plugins/ directories are on different file systems. The method File.move() can't be used to move a non-empty directory between different file systems.

I didn't find a simple way to unittest that, even with in-memory filesystems like jimfs or with the Lucene test framework.

Closes #8999

@tlrx
Copy link
Member Author

tlrx commented Dec 19, 2014

@s1monw you may be interested in this pr since you made recent change here

@uboness
Copy link
Contributor

uboness commented Dec 19, 2014

We actually need to check that everywhere we're using file move in the code base

* @param source source dir
* @param destination destination dir
*/
public static void moveDirectory(Path source, Path destination) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call this move and maybe just delegate to Files.move without throwing the exception? no need for the caller to know that the source is a directory?

@s1monw
Copy link
Contributor

s1monw commented Dec 22, 2014

We actually need to check that everywhere we're using file move in the code base

I think we only need to check inside the plugings installer etc. I with we could make it a sep project....

I left a minor comment otherwise LGTM

@tlrx tlrx force-pushed the fix/8999 branch 2 times, most recently from a270aee to a5127d2 Compare January 6, 2015 07:45
…n different filesystems

Plugin installation failed when bin/, conf/ and plugins/ directories are on different file systems. The method File.move() can't be used to move a non-empty directory between different filesystems.

I didn't find a simple way to unittest that, even with in-memory filesystems like jimfs or the Lucene test framework.

Closes elastic#8999
@tlrx tlrx merged commit a5127d2 into elastic:master Jan 6, 2015
@clintongormley clintongormley added :Core/Infra/Plugins Plugin API and infrastructure and removed review labels Mar 19, 2015
@clintongormley clintongormley changed the title Plugins: Installation failed when directories are on different file systems Installation failed when directories are on different file systems Jun 8, 2015
@tlrx tlrx deleted the fix/8999 branch January 27, 2017 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin installation failed when bin/ and plugins/ directories are on different filessystems
4 participants