From ea07008b7a2a7257b7810040b700006b56a11ce1 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 4 Oct 2018 12:25:53 -0700 Subject: [PATCH] openshift and agentpool fix --- pkg/acsengine/defaults.go | 6 +++--- pkg/acsengine/defaults_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/acsengine/defaults.go b/pkg/acsengine/defaults.go index 192caa98ae..dfc6dd921f 100644 --- a/pkg/acsengine/defaults.go +++ b/pkg/acsengine/defaults.go @@ -494,7 +494,7 @@ func setMasterProfileDefaults(a *api.Properties, isUpgrade bool) { if a.MasterProfile.Distro == "" { if a.OrchestratorProfile.IsKubernetes() { a.MasterProfile.Distro = api.AKS - } else { + } else if !a.OrchestratorProfile.IsOpenShift() { a.MasterProfile.Distro = api.Ubuntu } } @@ -647,14 +647,14 @@ func setAgentProfileDefaults(a *api.Properties, isUpgrade, isScale bool) { profile.AcceleratedNetworkingEnabled = helpers.PointerToBool(!isUpgrade && !isScale && helpers.AcceleratedNetworkingSupported(profile.VMSize)) } - if a.MasterProfile.Distro == "" { + if profile.Distro == "" { if a.OrchestratorProfile.IsKubernetes() { if profile.OSDiskSizeGB != 0 && profile.OSDiskSizeGB < api.VHDDiskSizeAKS { profile.Distro = api.Ubuntu } else { profile.Distro = api.AKS } - } else { + } else if !a.OrchestratorProfile.IsOpenShift() { profile.Distro = api.Ubuntu } } diff --git a/pkg/acsengine/defaults_test.go b/pkg/acsengine/defaults_test.go index 05e687ae8f..8d74653056 100644 --- a/pkg/acsengine/defaults_test.go +++ b/pkg/acsengine/defaults_test.go @@ -652,14 +652,14 @@ func TestSetComponentsNetworkDefaults(t *testing.T) { expectedDistro api.Distro // expected result default disto to be used }{ { - "ubuntu_kubernetes", + "default_kubernetes", api.OrchestratorProfile{ OrchestratorType: api.Kubernetes, }, api.AKS, }, { - "rhel_openshift", + "default_openshift", api.OrchestratorProfile{ OrchestratorType: api.OpenShift, },