private void closeTenant(TenantName name) {
        try (Lock lock = tenantLocks.lock(name)) {
            Tenant tenant = tenants.remove(name);
            if (tenant == null)
                throw new IllegalArgumentException("Closing '" + name + "' failed, tenant does not exist");

            log.log(Level.INFO, "Closing tenant '" + name + "'");
            notifyRemovedTenant(name);
            tenant.close();
        }
    }
Removes the given tenant from ZooKeeper and filesystem. Assumes that tenant exists.

@param name name of the tenant
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java