Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: old VMSS AKS cluster cannot be upgraded after April 2 #1561

Merged
merged 3 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/engine/virtualmachinescalesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,10 @@ func CreateAgentVMSS(cs *api.ContainerService, profile *api.AgentPoolProfile) Vi

if cs.Properties.IsHostedMasterProfile() {
if profile.IsWindows() {
aksBillingExtension.Name = to.StringPtr(fmt.Sprintf("[concat(variables('%sVMNamePrefix'), '-AKSWindowsBilling')]", profile.Name))
aksBillingExtension.Type = to.StringPtr("Compute.AKS.Windows.Billing")
} else {
aksBillingExtension.Name = to.StringPtr(fmt.Sprintf("[concat(variables('%sVMNamePrefix'), '-AKSLinuxBilling')]", profile.Name))
aksBillingExtension.Type = to.StringPtr("Compute.AKS.Linux.Billing")
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/engine/virtualmachinescalesets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func TestCreateAgentVMSSHostedMasterProfile(t *testing.T) {
Settings: map[string]interface{}{},
ProtectedSettings: map[string]interface{}{
"commandToExecute": `[concat('retrycmd_if_failure() { r=$1; w=$2; t=$3; shift && shift && shift; for i in $(seq 1 $r); do timeout $t ${@}; [ $? -eq 0 ] && break || if [ $i -eq $r ]; then return 1; else sleep $w; fi; done }; ERR_OUTBOUND_CONN_FAIL=50; retrycmd_if_failure 50 1 3 nc -vz k8s.gcr.io 443 && retrycmd_if_failure 50 1 3 nc -vz gcr.io 443 && retrycmd_if_failure 50 1 3 nc -vz docker.io 443 || exit $ERR_OUTBOUND_CONN_FAIL; for i in $(seq 1 1200); do if [ -f /opt/azure/containers/provision.sh ]; then break; fi; if [ $i -eq 1200 ]; then exit 100; else sleep 1; fi; done; ', variables('provisionScriptParametersCommon'),` + generateUserAssignedIdentityClientIDParameter(userAssignedIDEnabled) + `,' GPU_NODE=false SGX_NODE=false AUDITD_ENABLED=false /usr/bin/nohup /bin/bash -c "/bin/bash /opt/azure/containers/provision.sh >> /var/log/azure/cluster-provision.log 2>&1"')]`}}}, {
Name: to.StringPtr("[concat(variables('agentpool1VMNamePrefix'), '-computeAksLinuxBilling')]"),
Name: to.StringPtr("[concat(variables('agentpool1VMNamePrefix'), '-AKSLinuxBilling')]"),
VirtualMachineScaleSetExtensionProperties: &compute.VirtualMachineScaleSetExtensionProperties{
Publisher: to.StringPtr("Microsoft.AKS"),
Type: to.StringPtr("Compute.AKS.Linux.Billing"),
Expand Down Expand Up @@ -609,7 +609,7 @@ func TestCreateAgentVMSSHostedMasterProfile(t *testing.T) {
},
},
{
Name: to.StringPtr("[concat(variables('agentpool1VMNamePrefix'), '-computeAksLinuxBilling')]"),
Name: to.StringPtr("[concat(variables('agentpool1VMNamePrefix'), '-AKSWindowsBilling')]"),
VirtualMachineScaleSetExtensionProperties: &compute.VirtualMachineScaleSetExtensionProperties{
Publisher: to.StringPtr("Microsoft.AKS"),
Type: to.StringPtr("Compute.AKS.Windows.Billing"),
Expand Down