From 3c63d2bd64f6dc3cb8bf1f9ace77a2572b093887 Mon Sep 17 00:00:00 2001 From: Felix Moehler Date: Thu, 19 Dec 2024 10:54:34 +0100 Subject: [PATCH] do not raise error in case more networks than network interface cards are applied --- platform/net/interface_configuration_creator.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/platform/net/interface_configuration_creator.go b/platform/net/interface_configuration_creator.go index f25ea125a..bbac289a4 100644 --- a/platform/net/interface_configuration_creator.go +++ b/platform/net/interface_configuration_creator.go @@ -126,10 +126,6 @@ func NewInterfaceConfigurationCreator(logger boshlog.Logger) InterfaceConfigurat } func (creator interfaceConfigurationCreator) CreateInterfaceConfigurations(networks boshsettings.Networks, interfacesByMAC map[string]string) ([]StaticInterfaceConfiguration, []DHCPInterfaceConfiguration, error) { - if !networks.HasInterfaceAlias() && len(interfacesByMAC) < len(networks) { - return nil, nil, bosherr.Errorf("Number of network settings '%d' is greater than the number of network devices '%d'", len(networks), len(interfacesByMAC)) - } - // In cases where we only have one network and it has no MAC address (either because the IAAS doesn't give us one or // it's an old CPI), if we only have one interface, we should map them if len(networks) == 1 && len(interfacesByMAC) == 1 {