Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Reenable AzureFile tests for Windows on K8s 1.11.1, resolves #3439 #3496

Merged
merged 2 commits into from
Jul 25, 2018

Conversation

PatrickLang
Copy link
Contributor

Kubernetes v1.11.1 is out, including the azurefiles fixes. This fixes the skipped test case to only skip v1.11.0 and run on other versions.

@ghost ghost assigned PatrickLang Jul 17, 2018
@ghost ghost added the in progress label Jul 17, 2018
@codecov
Copy link

codecov bot commented Jul 17, 2018

Codecov Report

Merging #3496 into master will increase coverage by 0.41%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3496      +/-   ##
==========================================
+ Coverage   55.47%   55.89%   +0.41%     
==========================================
  Files         105      105              
  Lines       16004    15943      -61     
==========================================
+ Hits         8879     8911      +32     
+ Misses       6375     6282      -93     
  Partials      750      750

@PatrickLang
Copy link
Contributor Author

PatrickLang commented Jul 18, 2018

• Failure [1801.962 seconds]
Azure Container Cluster using the Kubernetes Orchestrator
/go/src/github.com/Azure/acs-engine/test/e2e/kubernetes/kubernetes_test.go:59
  with a windows agent pool
  /go/src/github.com/Azure/acs-engine/test/e2e/kubernetes/kubernetes_test.go:724
    should be able to attach azure file [It]
    /go/src/github.com/Azure/acs-engine/test/e2e/kubernetes/kubernetes_test.go:819

    Expected error:
        <*errors.fundamental | 0xc42000c7e0>: {
            msg: "Timeout exceeded (30m0s) while waiting for PersistentVolumeClaims (pvc-azurefile) to become ready",
            stack: [0x6e9414, 0x45bed1],
        }
        Timeout exceeded (30m0s) while waiting for PersistentVolumeClaims (pvc-azurefile) to become ready
    not to have occurred

The version check isn't working as expected. Will add unit tests next to figure it out. I would expect this test case to be skipped on v1.11.0

@PatrickLang PatrickLang force-pushed the plang-azurefile-1.11.1 branch 4 times, most recently from 3c62d49 to b5c5474 Compare July 19, 2018 23:51
@PatrickLang
Copy link
Contributor Author

@CecileRobertMichon thanks for helping me figure out the right way to check versions. Can you do a review?

@@ -351,6 +351,13 @@ func IsKubernetesVersionGe(actualVersion, version string) bool {
return v1.GE(v2)
}

// IsKubernetesVersionEq returns true if actualVersion is equal to version
func IsKubernetesVersionEq(actualVersion, version string) bool {
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon Jul 20, 2018

Choose a reason for hiding this comment

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

why not just compare the strings for this?

If you decide to keep it, it'd be an easy unit test to add in versions_test.go --> you already did that nevermind!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally I was hoping the semantic versioning library could handle some cases like "1.11" == "1.11.0" . It doesn't handle that case so I should probably keep it simple and remove it.

// Failure in 1.11+ - https://github.com/kubernetes/kubernetes/issues/65845
Skip("Kubernetes 1.11 has a known issue creating Azure PersistentVolumeClaims")
} else if common.IsKubernetesVersionGe(eng.ClusterDefinition.ContainerService.Properties.OrchestratorProfile.OrchestratorVersion, "1.8") {
if common.IsKubernetesVersionEq(eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion, "1.11.0") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be if eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion == "1.11.0" {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed - I wasn't sure if OrchestratorVersion could be "1.11", but it's showing up as "1.11.0". The string comparison is sufficient here so I'll keep it simple

@PatrickLang PatrickLang force-pushed the plang-azurefile-1.11.1 branch from b5c5474 to ccca36f Compare July 20, 2018 18:53
@PatrickLang PatrickLang force-pushed the plang-azurefile-1.11.1 branch from ccca36f to 50534ba Compare July 20, 2018 18:55
@PatrickLang
Copy link
Contributor Author

@CecileRobertMichon thanks. Simplified per feedback and rebased.

if eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion == "1.11.0" {
// Failure in 1.11.0 - https://github.com/kubernetes/kubernetes/issues/65845, fixed in 1.11.1
Skip("Kubernetes 1.11.0 has a known issue creating Azure PersistentVolumeClaims")
} else if common.IsKubernetesVersionGe(eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion, "1.8") {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure "1.8" is a valid version, I think you need "1.8.0"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes you're right.

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@acs-bot acs-bot added the lgtm label Jul 20, 2018
@acs-bot
Copy link

acs-bot commented Jul 20, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, PatrickLang

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

@jackfrancis jackfrancis merged commit b2d20f9 into Azure:master Jul 25, 2018
@ghost ghost removed the in progress label Jul 25, 2018
PaulCharlton added a commit to ElementAnalytics/acs-engine that referenced this pull request Jul 26, 2018
* 'master' of https://github.com/Azure/acs-engine: (59 commits)
  Docs: Update user guide list to include Windows, update description of clusters (Azure#3473)
  update to Azure CNI v1.0.10 (Azure#3551)
  Adding 'make dev' equivalent for Windows (Azure#3471)
  print out ubuntu ver in e2e (Azure#3555)
  fix an issue where networkPlugin was not defined correctly when using calico or cilium (Azure#3271)
  Bump ginkgo to a tagged release (Azure#3554)
  Reenable AzureFile tests for Windows on K8s 1.11.1, resolves Azure#3439 (Azure#3496)
  removing rbac error checking from merge fn (Azure#3530)
  Change dns healthcheck to look at external domain (Azure#3282)
  DOCUMENTATION: Fix Documented Default Value for clusterSubnet (Azure#3474)
  Document required manual calico 2.6.3 -> calico 3.1.1 upgrade when upgrading from < 0.17.0-provisioned clusters (Azure#3208)
  revert --image-pull-policy=IfNotPresent for win (Azure#3553)
  --image-pull-policy=IfNotPresent for kubectl run commands (Azure#3552)
  Kubernetes: --max-pods=30 should be Azure CNI-only (Azure#3543)
  disable Azure CNI network monitor addon default (Azure#3550)
  only do az vm list for k8s (Azure#3540)
  Retire Swarm E2E for PR test coverage (Azure#3539)
  retire Azure CDN for container image repository proxying (Azure#3535)
  removed datadisk to allow scale after upgrade (Azure#3482)
  Pump k8s-azure-kms version (Azure#3531)
  ...
PaulCharlton added a commit to ElementAnalytics/acs-engine that referenced this pull request Jul 26, 2018
* master: (59 commits)
  Docs: Update user guide list to include Windows, update description of clusters (Azure#3473)
  update to Azure CNI v1.0.10 (Azure#3551)
  Adding 'make dev' equivalent for Windows (Azure#3471)
  print out ubuntu ver in e2e (Azure#3555)
  fix an issue where networkPlugin was not defined correctly when using calico or cilium (Azure#3271)
  Bump ginkgo to a tagged release (Azure#3554)
  Reenable AzureFile tests for Windows on K8s 1.11.1, resolves Azure#3439 (Azure#3496)
  removing rbac error checking from merge fn (Azure#3530)
  Change dns healthcheck to look at external domain (Azure#3282)
  DOCUMENTATION: Fix Documented Default Value for clusterSubnet (Azure#3474)
  Document required manual calico 2.6.3 -> calico 3.1.1 upgrade when upgrading from < 0.17.0-provisioned clusters (Azure#3208)
  revert --image-pull-policy=IfNotPresent for win (Azure#3553)
  --image-pull-policy=IfNotPresent for kubectl run commands (Azure#3552)
  Kubernetes: --max-pods=30 should be Azure CNI-only (Azure#3543)
  disable Azure CNI network monitor addon default (Azure#3550)
  only do az vm list for k8s (Azure#3540)
  Retire Swarm E2E for PR test coverage (Azure#3539)
  retire Azure CDN for container image repository proxying (Azure#3535)
  removed datadisk to allow scale after upgrade (Azure#3482)
  Pump k8s-azure-kms version (Azure#3531)
  ...
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.

4 participants