diff options
author | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-10-18 15:52:20 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-10-18 15:54:34 +0200 |
commit | ae81fa78b7bf66f4dda599b6cf8d5e07f7a05d19 (patch) | |
tree | 9edca7a868b99c63b19720b3c84f085e6c7585c6 /node-admin | |
parent | 14b70f45733b706f7db581593d98f8e0cd0d21c7 (diff) |
Do not fix owner after copy or move within Container FS
Diffstat (limited to 'node-admin')
2 files changed, 2 insertions, 4 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemProvider.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemProvider.java index a44f90b164b..909c6c9cbc1 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemProvider.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemProvider.java @@ -114,7 +114,6 @@ class ContainerFileSystemProvider extends FileSystemProvider { // Only called when both 'source' and 'target' have 'this' as the FS provider Path targetPathOnHost = pathOnHost(target); provider(targetPathOnHost).copy(pathOnHost(source), targetPathOnHost, options); - fixOwnerToContainerRoot(toContainerPath(target)); } @Override @@ -122,7 +121,6 @@ class ContainerFileSystemProvider extends FileSystemProvider { // Only called when both 'source' and 'target' have 'this' as the FS provider Path targetPathOnHost = pathOnHost(target); provider(targetPathOnHost).move(pathOnHost(source), targetPathOnHost, options); - fixOwnerToContainerRoot(toContainerPath(target)); } @Override diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemTest.java index a5fc6a1373f..4e85052a176 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystemTest.java @@ -85,7 +85,7 @@ class ContainerFileSystemTest { new UnixPath(destination).setOwnerId(500).setGroupId(200); ContainerPath destination2 = ContainerPath.fromPathInContainer(containerFs, Path.of("/dest2")); Files.copy(destination, destination2, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING); - assertOwnership(destination2, 0, 0, 10000, 11000); + assertOwnership(destination2, 500, 200, 10500, 11200); } @Test @@ -116,7 +116,7 @@ class ContainerFileSystemTest { new UnixPath(destination).setOwnerId(500).setGroupId(200); ContainerPath destination2 = ContainerPath.fromPathInContainer(containerFs, Path.of("/dest2")); Files.move(destination, destination2, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING); - assertOwnership(destination2, 0, 0, 10000, 11000); + assertOwnership(destination2, 500, 200, 10500, 11200); } @Test |