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

fix: reinforce MCR migration during upgrade for older clusters #3625

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

jackfrancis
Copy link
Member

@jackfrancis jackfrancis commented Jul 21, 2020

Reason for Change:

This PR adds additional defaults enforcement for landing on MCR during upgrade, especially for old clusters that don't have newer api model data properties.

Issue Fixed:

Fixes #3618

Requirements:

Notes:

@acs-bot
Copy link

acs-bot commented Jul 21, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

if o.KubernetesConfig.KubernetesImageBase == cloudSpecConfig.KubernetesSpecConfig.KubernetesImageBase &&
o.KubernetesConfig.KubernetesImageBaseType == common.KubernetesImageBaseTypeGCR {
if (o.KubernetesConfig.KubernetesImageBase == "" || o.KubernetesConfig.KubernetesImageBase == cloudSpecConfig.KubernetesSpecConfig.KubernetesImageBase) &&
(o.KubernetesConfig.KubernetesImageBaseType == "" || o.KubernetesConfig.KubernetesImageBaseType == common.KubernetesImageBaseTypeGCR) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chreichert this additional tolerance for empty ("") KubernetesImageBaseType will fix your issue.

t.Fatalf("defaults flow did assign the expected KubernetesImageBaseType value, got %s, expected %s", properties.OrchestratorProfile.KubernetesConfig.KubernetesImageBaseType, common.KubernetesImageBaseTypeMCR)
}

// Upgrade scenario forces GCR to MCR - empty KubernetesImageBaseType
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chreichert this unit test proves that during upgrade older clusters w/ an empty KubernetesImageBaseType will be marked for conversion to an MCR configuration.

@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #3625 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3625   +/-   ##
=======================================
  Coverage   73.14%   73.14%           
=======================================
  Files         147      147           
  Lines       25165    25165           
=======================================
  Hits        18408    18408           
  Misses       5623     5623           
  Partials     1134     1134           
Impacted Files Coverage Δ
pkg/api/defaults.go 92.83% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b06a18b...5bec824. Read the comment docs.

@jackfrancis jackfrancis merged commit 2776170 into Azure:master Jul 21, 2020
@jackfrancis jackfrancis deleted the fix-gcr-mcr-old-acs-engine branch July 21, 2020 20:36
penggu pushed a commit to penggu/aks-engine that referenced this pull request Oct 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade older cluster from 1.16.4 to 1.16.11 fails with CSE exit code 35
2 participants