diff options
author | Martin Polden <mpolden@mpolden.no> | 2017-10-26 12:18:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 12:18:22 +0200 |
commit | 07ba3884e18d88b8660ecfbb79f1ce7e9770b984 (patch) | |
tree | 1a2ff462c083bd4f445fe61fa2936fda3bc71596 | |
parent | 0fc6803250232aa72ec63b88c36f496373ba76dc (diff) | |
parent | d8cce5ebd540d483f749fe60306c7277006d0eae (diff) |
Merge pull request #3899 from vespa-engine/bjorncs/athenz-migration
Improve logging during tenant migration to Athenz
-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); } } |