diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-03-17 15:37:49 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-03-17 15:37:49 +0100 |
commit | 6e32f78e8b27e4300007cd7d96fe52a6dc74a317 (patch) | |
tree | 53e1b735963b7abd46e0b8c573a3db9aabbbeb41 /routing-generator/src | |
parent | 791812f39d990fb75c11cccb72334b21bf220630 (diff) |
Remove cleanup of old layer 7 files
Diffstat (limited to 'routing-generator/src')
-rw-r--r-- | routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java | 4 | ||||
-rw-r--r-- | routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java index e75717d8ac1..1f5324223be 100644 --- a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java +++ b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java @@ -117,9 +117,7 @@ public class Nginx implements Router { String configBasename = NginxPath.config.in(fileSystem).getFileName().toString(); Files.list(NginxPath.root.in(fileSystem)) .filter(Files::isRegularFile) - .filter(path -> path.getFileName().toString().startsWith(configBasename) || - // TODO(mpolden): This cleans up old layer 7 files. Remove after 2022-03-15 - path.getFileName().toString().startsWith("nginx.conf-")) + .filter(path -> path.getFileName().toString().startsWith(configBasename)) .filter(path -> rotatedAt(path).map(instant -> instant.isBefore(oneWeekAgo)) .orElse(false)) .forEach(path -> Exceptions.uncheck(() -> Files.deleteIfExists(path))); diff --git a/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java b/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java index e79b3e8787e..0b17daa3e3c 100644 --- a/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java +++ b/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java @@ -99,8 +99,6 @@ public class NginxTest { // Some time passes and new tables are loaded. Old rotated files are removed tester.clock.advance(Duration.ofDays(3)); - // Simulate old rotated layer 7 config file, which should be removed - Exceptions.uncheck(() -> Files.createFile(NginxPath.root.in(tester.fileSystem).resolve("nginx.conf-2021-12-15-15:00:00.000"))); tester.load(table0); tester.clock.advance(Duration.ofDays(4).plusSeconds(1)); tester.load(table1) |