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.