diff options
author | HÃ¥kon Hallingstad <hakon.hallingstad@gmail.com> | 2022-04-26 13:57:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 13:57:49 +0200 |
commit | 6c92ae423638e616474c86310875ec71a3cb1e8f (patch) | |
tree | 832428c74ecf4b059b7b4baa6547079ade5f5322 | |
parent | 68ff4c44eeac163141029ccd327399af692fcae5 (diff) | |
parent | ae887142ba7125020df5658a183baac75124bf23 (diff) |
Merge pull request #22249 from vespa-engine/freva/fix-todo
Remove temporary chmod/chowning
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java index 75977da369c..61e777a9576 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java @@ -27,9 +27,6 @@ import com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer; import com.yahoo.vespa.hosted.node.admin.maintenance.identity.CredentialsMaintainer; import com.yahoo.vespa.hosted.node.admin.maintenance.servicedump.VespaServiceDumper; import com.yahoo.vespa.hosted.node.admin.nodeadmin.ConvergenceException; -import com.yahoo.vespa.hosted.node.admin.task.util.file.FileFinder; -import com.yahoo.vespa.hosted.node.admin.task.util.file.UnixPath; -import com.yahoo.vespa.hosted.node.admin.task.util.fs.ContainerPath; import java.time.Clock; import java.time.Duration; @@ -140,31 +137,6 @@ public class NodeAgentImpl implements NodeAgent { if (loopThread != null) throw new IllegalStateException("Can not re-start a node agent."); - // TODO: Remove after this has rolled out everywhere - int[] stats = new int[]{0, 0, 0}; - ContainerPath vespaHome = initialContext.paths().underVespaHome(""); - FileFinder.files(initialContext.paths().of("/")).forEachPath(path -> { - UnixPath unixPath = new UnixPath(path); - - String permissions = unixPath.getPermissions(); - if (!permissions.endsWith("---")) { - unixPath.setPermissions(permissions.substring(0, 6) + "---"); - stats[0]++; - } - - if (path.startsWith(vespaHome) && unixPath.getOwnerId() != initialContext.users().vespa().uid()) { - unixPath.setOwnerId(initialContext.users().vespa().uid()); - stats[1]++; - } - - if (path.startsWith(vespaHome) && unixPath.getGroupId() != initialContext.users().vespa().gid()) { - unixPath.setGroupId(initialContext.users().vespa().gid()); - stats[2]++; - } - }); - if (stats[0] + stats[1] + stats[2] > 0) - initialContext.log(logger, "chmod %d, chown UID %d, chown GID %d files", stats[0], stats[1], stats[2]); - loopThread = new Thread(() -> { while (!terminated.get()) { try { |