aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java
diff options
context:
space:
mode:
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java
index 8b8801d5b53..285365a9c6d 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/ArchiveUris.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.hosted.provision.provisioning;
import com.yahoo.config.provision.TenantName;
+import com.yahoo.config.provision.Zone;
import com.yahoo.lang.CachedSupplier;
import com.yahoo.vespa.curator.Lock;
import com.yahoo.vespa.hosted.provision.Node;
@@ -30,10 +31,12 @@ public class ArchiveUris {
private final CuratorDb db;
private final CachedSupplier<Map<TenantName, String>> archiveUris;
+ private final Zone zone;
- public ArchiveUris(CuratorDb db) {
+ public ArchiveUris(CuratorDb db, Zone zone) {
this.db = db;
this.archiveUris = new CachedSupplier<>(db::readArchiveUris, cacheTtl);
+ this.zone = zone;
}
/** Returns the current archive URI for each tenant */
@@ -42,12 +45,14 @@ public class ArchiveUris {
}
/** Returns the archive URI to use for given tenant */
- public Optional<String> archiveUriFor(TenantName tenant) {
+ private Optional<String> archiveUriFor(TenantName tenant) {
return Optional.ofNullable(archiveUris.get().get(tenant));
}
/** Returns the archive URI to use for given node */
public Optional<String> archiveUriFor(Node node) {
+ if (node.cloudAccount().isEnclave(zone)) return Optional.empty(); // TODO (freva): Implement for exclave
+
return node.allocation().map(Allocation::owner)
.flatMap(app -> archiveUriFor(app.tenant())
.map(uri -> {