You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Jens Deppe <je...@apache.org> on 2018/02/28 23:41:36 UTC

Re: gfsh deploy --dir fails on Windows

Hi George,

Thanks for reporting that. I've opened
https://issues.apache.org/jira/browse/GEODE-4755 to track the issue.

Unfortunately I can't think of a workaround at this time.

--Jens

On Wed, Feb 28, 2018 at 3:13 PM, George Wilder <Ge...@sas.com>
wrote:

> Attempting to run gfsh with command “deploy –dir build/libs” on Windows 10.
>
>
>
> With version 1.3.0 and earlier, it functions as expected, remote deploying
> all jars in the directory.
>
> With version 1.4.0, I’m seeing:
>
>
>
> Executing - deploy --*dir* build/*libs*
>
>
>
> java.lang.UnsupportedOperationException: 'posix:permissions' not
> supported as initial attribute
>
>        at sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(
> WindowsSecurityDescriptor.java:358)
>
>        at sun.nio.fs.WindowsFileSystemProvider.createDirectory(
> WindowsFileSystemProvider.java:492)
>
>        at java.nio.file.Files.createDirectory(Files.java:674)
>
>        at java.nio.file.TempFileHelper.create(TempFileHelper.java:136)
>
>        at java.nio.file.TempFileHelper.createTempDirectory(
> TempFileHelper.java:173)
>
>        at java.nio.file.Files.createTempDirectory(Files.java:991)
>
>        at org.apache.geode.management.internal.beans.FileUploader.
> uploadFile(FileUploader.java:77)
>
>
>
> 1.4.0 has several new commits that make use of PosixFilePermissions (which
> doesn’t appear to be supported on Windows) :
>
>
>
> org.apache.geode.distributed.internal.ClusterConfigurationService
>
> org.apache.geode.internal.cache.ClusterConfigurationLoader
>
> org.apache.geode.management.internal.beans.FileUploader
>
> org.apache.geode.management.internal.cli.functions.DeployFunction
>
> org.apache.geode.management.internal.web.controllers.
> AbstractCommandsController
>
>
>
> Any chance those settings can be conditional on the createTempDirectory()
> calls ?
>
>
>
> To get the deploy command to work on Windows, I patched DeployFunction and
> Fileuploader with :
>
>             private static final Boolean isPosix =
> FileSystems.getDefault().supportedFileAttributeViews().contains(“posix”);
>
> *if* (*isPosix*) {
>
>     tempDir = Files.*createTempDirectory*(*STAGED_DIR_PREFIX*,
> PosixFilePermissions.*asFileAttribute*(perms));
>
> } *else* {
>
>     tempDir = Files.*createTempDirectory*(*STAGED_DIR_PREFIX*);
>
> }
>
>
>
> thanks,
>
> George.
>
>
>
>
>