From 083fab949175e41585e110a755e0ac9bd4b3e397 Mon Sep 17 00:00:00 2001 From: Jorrit Salverda Date: Fri, 2 Apr 2021 14:53:47 +0200 Subject: [PATCH] log subnetworks and routes if no subnet can't be suggested --- services/planner/service.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/planner/service.go b/services/planner/service.go index 312573f..a8562e3 100644 --- a/services/planner/service.go +++ b/services/planner/service.go @@ -218,6 +218,18 @@ func (s *service) SuggestSingleNetworkRange(ctx context.Context, rangeConfigs [] } } + log.Debug().Msg("Showing subnetworks and routes to find conflicts") + + log.Debug().Msg("Subnetworks:") + for _, sn := range subnetworks { + log.Debug().Interface("subnetwork", sn).Msg("") + } + + log.Debug().Msg("Routes:") + for _, r := range routes { + log.Debug().Interface("route", r).Msg("") + } + return subnetworkRange, fmt.Errorf("All of the possible %v subnets of range %v are already in use", len(availableSubnetworkRanges), rangeConfig.NetworkCIDR) }