aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@yahooinc.com>2021-10-20 12:59:56 +0200
committerValerij Fredriksen <valerijf@yahooinc.com>2021-10-20 12:59:56 +0200
commitad2a20be119f92870262a4447947400d42d8f05a (patch)
treebb02cd846a657db0ac43a63be09fa9e60d70e945 /node-admin
parent256b796cec421a1403f913ee18dddcc4add7696d (diff)
Create container FS for tests in node agent context
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentContextImpl.java1
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystem.java4
2 files changed, 2 insertions, 3 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentContextImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentContextImpl.java
index 053e3c301cf..0b1f7f24ced 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentContextImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentContextImpl.java
@@ -268,6 +268,7 @@ public class NodeAgentContextImpl implements NodeAgentContext {
.orElseGet(() -> new VespaUser("vespa", "vespa", 1000, 100));
ContainerFileSystem containerFs = ContainerFileSystem.create(containerStorage
.resolve(nodeSpecBuilder.hostname().split("\\.")[0]), userNamespace, vespaUser);
+ containerFs.createRoot();
return new NodeAgentContextImpl(
nodeSpecBuilder.build(),
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystem.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystem.java
index 0f2ff3147b6..6f0ab5576b7 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystem.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/fs/ContainerFileSystem.java
@@ -94,8 +94,6 @@ public class ContainerFileSystem extends FileSystem {
}
public static ContainerFileSystem create(Path containerStorageRoot, UserNamespace userNamespace, VespaUser vespaUser) {
- ContainerFileSystem containerFs = new ContainerFileSystemProvider(containerStorageRoot, userNamespace, vespaUser).getFileSystem(null);
- containerFs.createRoot();
- return containerFs;
+ return new ContainerFileSystemProvider(containerStorageRoot, userNamespace, vespaUser).getFileSystem(null);
}
}