diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2017-10-26 12:13:39 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2017-10-26 12:15:29 +0200 |
commit | d8cce5ebd540d483f749fe60306c7277006d0eae (patch) | |
tree | 4f8fab79ad72747b21766a3b045cfa3b1e425302 /controller-server | |
parent | 106567609a5b0efc3285187582acf45a0899b5ef (diff) |
Improve logging during tenant migration to Athenz
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/TenantController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/TenantController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/TenantController.java index a4bddf86cbb..9530e9a982c 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/TenantController.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/TenantController.java @@ -200,6 +200,8 @@ public class TenantController { try (Lock lock = lock(tenantId)) { Tenant existing = tenant(tenantId).orElseThrow(() -> new NotExistsException(tenantId)); if (existing.isAthensTenant()) return existing; // nothing to do + log.info("Starting migration of " + existing + " to Athenz domain " + tenantDomain.id() + + " using " + nToken.getPrincipal()); if (tenantHaving(tenantDomain).isPresent()) throw new IllegalArgumentException("Could not migrate " + existing + " to " + tenantDomain + ": " + "This domain is already used by " + tenantHaving(tenantDomain).get()); @@ -221,11 +223,11 @@ public class TenantController { db.deleteTenant(tenantId); Tenant tenant = Tenant.createAthensTenant(tenantId, tenantDomain, property, Optional.of(propertyId)); db.createTenant(tenant); - log.info("Migrated " + existing + " to Athens using " + tenantDomain); + log.info("Migration of " + existing + " to Athenz completed."); return tenant; } catch (PersistenceException e) { - throw new RuntimeException("Failed migrating " + tenantId + " to Athens", e); + throw new RuntimeException("Failed migrating " + tenantId + " to Athenz", e); } } |