summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@yahooinc.com>2022-02-03 23:36:53 +0100
committerValerij Fredriksen <valerijf@yahooinc.com>2022-02-03 23:36:53 +0100
commit719556f91b94c8657c4124047f23052b11ab6c97 (patch)
tree685acee78b0e48717c2beb5a9000a348d5c8dd64 /node-admin
parent4d75505805c188366e3771446af4a99514433295 (diff)
Recreate container FS root after archive for non-tenant nodes
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
index dd0b8a2acdc..ac4d58374c1 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
@@ -214,6 +214,12 @@ public class StorageMaintainer {
containerLogsOnHost.moveIfExists(containerLogsInArchiveDir);
}
new UnixPath(context.paths().of("/")).deleteRecursively();
+
+ // Container FS root cannot be created from ContainerPath, it is therefore important that it exists as long as
+ // NodeAgent is running. Normally the root is only created when NodeAgent is first started. Because non-tenant
+ // nodes are never removed from node-repo, we immediately re-create the new root after archiving the previous
+ if (context.nodeType() != NodeType.tenant)
+ context.paths().of("/").getFileSystem().createRoot();
}
private String getMicrocodeVersion() {