docker-library/elasticsearch

Problem uninstalling x-pack

wasadigi opened this issue · 1 comments

I was making some tests and wanted to remove x-pack. I am not able to do so, and here is the error I get:

root@4aa235c1a2b7:/usr/share/elasticsearch# ./bin/elasticsearch-plugin remove x-pack
-> Removing x-pack...
Exception in thread "main" java.nio.file.AtomicMoveNotSupportedException: /usr/share/elasticsearch/plugins/x-pack -> /usr/share/elasticsearch/plugins/.removing-x-pack: Invalid cross-device link
	at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:394)
	at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
	at java.nio.file.Files.move(Files.java:1395)
	at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:87)
	at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:58)
	at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
	at org.elasticsearch.cli.Command.main(Command.java:62)
	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:42)

When I am connected on a running container, if I do:

# mv /usr/share/elasticsearch/plugins/x-pack /usr/share/elasticsearch/plugins/.removing-x-pack
# mv /usr/share/elasticsearch/plugins/.removing-x-pack /usr/share/elasticsearch/plugins/x-pack

Then I am able to uninstall x-pack afterwards.

Also, I tried to do these 2 mv operations in my Dockerfile, but when they are executed, the directories do not exist (which really puzzles me... at which point is this directory created???).

Not completely sure what happened, but I cannot reproduce. Sorry for the noise.