Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cloud specific DNS check to make e2e Conformance eligible #80682

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 20 additions & 17 deletions test/e2e/network/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,27 @@ var _ = SIGDescribe("DNS", func() {
namesToResolve := []string{
fmt.Sprintf("kubernetes.default.svc.%s", framework.TestContext.ClusterDNSDomain),
}
// Added due to #8512. This is critical for GCE and GKE deployments.
if framework.ProviderIs("gce", "gke") {
namesToResolve = append(namesToResolve, "google.com")
// Windows containers do not have a route to the GCE
// metadata server by default.
if !framework.NodeOSDistroIs("windows") {
namesToResolve = append(namesToResolve, "metadata")
}
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")

// Run a pod which probes DNS and exposes the results by HTTP.
ginkgo.By("creating a pod to probe DNS")
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...))
})

// Added due to #8512. This is critical for GCE and GKE deployments.
ginkgo.It("should provide DNS for the cluster [Provider:GCE]", func() {
Copy link
Member

Choose a reason for hiding this comment

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

@spiffxp is [Provider:GCE] equivalent to framework.ProviderIs("gce", "gke") in the e2e framework?

Copy link
Member

Choose a reason for hiding this comment

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

I completely made the tag up out of whole cloth but I feel like we're going to want some way to signify that we want these provider-specific tests to run. I could do something like [Feature:GCEProvider] as well, but this would exclude it from all of the release-master-blocking tests, almost all of which run in GCE and need this tested anyway. Open to feedback on a more appropriate way to do things here

Copy link
Member

Choose a reason for hiding this comment

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

I don't see how this can go up for approval right now, this new test will fail on other providers. I think we need to add a skip in the new test if it's not GCE or GKE. I don't know that we need to decide on a label for it right now.

Copy link
Member

Choose a reason for hiding this comment

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

This test isn't intended to be a Conformance test though, the Conformance part of it will still pass just fine. This was in service of allowing other tests to be promoted to Conformance (see #74977)

Copy link
Member

Choose a reason for hiding this comment

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

But why are we adding a failing e2e test (regardless of any conformance question)?

Copy link
Member

Choose a reason for hiding this comment

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

Once we decide on the best way to do this, please update the documentation
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md#kinds-of-tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

framework.SkipUnlessProviderIs("gce", "gke")

namesToResolve := []string{"google.com"}
// Windows containers do not have a route to the GCE metadata server by default.
if !framework.NodeOSDistroIs("windows") {
namesToResolve = append(namesToResolve, "metadata")
}

wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
Expand All @@ -77,15 +89,6 @@ var _ = SIGDescribe("DNS", func() {
"kubernetes.default",
"kubernetes.default.svc",
}
// Added due to #8512. This is critical for GCE and GKE deployments.
if framework.ProviderIs("gce", "gke") {
namesToResolve = append(namesToResolve, "google.com")
Copy link
Member

Choose a reason for hiding this comment

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

I would rather see this block broken out into its own testcase, same for the conformance test above

these names are important to verify, they're just not intended to be exercised as part of a conformance test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

// Windows containers do not have a route to the GCE
// metadata server by default.
if !framework.NodeOSDistroIs("windows") {
namesToResolve = append(namesToResolve, "metadata")
}
}
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
hostEntries := []string{hostFQDN, dnsTestPodHostName}
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
Expand Down