diff --git a/pkg/acsengine/defaults.go b/pkg/acsengine/defaults.go index 7bcca7e153..74aab21bc3 100644 --- a/pkg/acsengine/defaults.go +++ b/pkg/acsengine/defaults.go @@ -371,7 +371,7 @@ func setPropertiesDefaults(cs *api.ContainerService, isUpgrade bool) (bool, erro setHostedMasterNetworkDefaults(properties) - setAgentNetworkDefaults(properties) + setAgentNetworkDefaults(properties, isUpgrade) setStorageDefaults(properties) setExtensionDefaults(properties) @@ -792,7 +792,7 @@ func setMasterNetworkDefaults(a *api.Properties, isUpgrade bool) { } // SetAgentNetworkDefaults for agents -func setAgentNetworkDefaults(a *api.Properties) { +func setAgentNetworkDefaults(a *api.Properties, isUpgrade bool) { // configure the subnets if not in custom VNET if a.MasterProfile != nil && !a.MasterProfile.IsCustomVNET() { subnetCounter := 0 @@ -819,7 +819,7 @@ func setAgentNetworkDefaults(a *api.Properties) { // On instances that support hyperthreading, Accelerated Networking is supported on VM instances with 4 or more vCPUs. // Supported series are: D/DSv3, E/ESv3, Fsv2, and Ms/Mms. if profile.AcceleratedNetworkingEnabled == nil { - profile.AcceleratedNetworkingEnabled = helpers.PointerToBool(helpers.AcceleratedNetworkingSupported(profile.VMSize)) + profile.AcceleratedNetworkingEnabled = helpers.PointerToBool(!isUpgrade && helpers.AcceleratedNetworkingSupported(profile.VMSize)) } // don't default Distro for OpenShift diff --git a/pkg/acsengine/defaults_test.go b/pkg/acsengine/defaults_test.go index 250c042f0a..81e1f4536b 100644 --- a/pkg/acsengine/defaults_test.go +++ b/pkg/acsengine/defaults_test.go @@ -548,7 +548,7 @@ func TestSetComponentsNetworkDefaults(t *testing.T) { mockAPI := getMockAPIProperties("1.0.0") mockAPI.OrchestratorProfile = &test.orchestratorProfile setMasterNetworkDefaults(&mockAPI, false) - setAgentNetworkDefaults(&mockAPI) + setAgentNetworkDefaults(&mockAPI, false) if mockAPI.MasterProfile.Distro != test.expectedDistro { t.Fatalf("setMasterNetworkDefaults() test case %v did not return right Distro configurations %v != %v", test.name, mockAPI.MasterProfile.Distro, test.expectedDistro) }