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

Fix failing service e2e due to execPod unavailability #80805

Merged
merged 1 commit into from Aug 2, 2019

Conversation

mgdevstack
Copy link
Contributor

@mgdevstack mgdevstack commented Jul 31, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation

/kind failing-test

/kind feature
/kind flake

What this PR does / why we need it:
Fixes following failing E2E (Release-master blocking)

1. [sig-network] ESIPP [Slow] [DisabledForLargeClusters] should work from pods
2. [sig-network] Services should only allow access from service loadbalancer source ranges [Slow]

https://testgrid.k8s.io/sig-release-master-blocking#gce-cos-master-slow&width=20

Issue Source: #80760 (comment)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

2. [sig-network] Services should only allow access from service loadbalancer source ranges [Slow]
  • For this E2E, ginkgo.Expect checks are added to make sure Pods are in desired state. Incase, execPods are find to be terminated or not running with no PodIP, we will be introducing deployment to make sure execPods are in desired running state.

  • E2E failing reasons are added into network service e2e tests failing  #80760 (comment)

Does this PR introduce a user-facing change?:

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 31, 2019
@mgdevstack
Copy link
Contributor Author

/area conformance
/sig testing

@k8s-ci-robot k8s-ci-robot added the area/conformance Issues or PRs related to kubernetes conformance tests label Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. area/test and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 31, 2019
@mgdevstack
Copy link
Contributor Author

/cc @johnbelamaric @spiffxp

@mgdevstack
Copy link
Contributor Author

/remove-area conformance

@k8s-ci-robot k8s-ci-robot removed the area/conformance Issues or PRs related to kubernetes conformance tests label Jul 31, 2019
// Make sure acceptPod is running. There are certain chances that pod might be teminated due to unexpected reasons.
acceptPod, err = cs.CoreV1().Pods(namespace).Get(acceptPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", acceptPod.Name)
gomega.Expect(acceptPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
Copy link
Member

Choose a reason for hiding this comment

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

We can replace here with framework.ExpectEqual(acceptPod.Status.Phase, v1.PodRunning).
After merging #80785 this line will be blocked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing.
Done.

acceptPod, err = cs.CoreV1().Pods(namespace).Get(acceptPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", acceptPod.Name)
gomega.Expect(acceptPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
gomega.Expect(acceptPod.Status.PodIP).ToNot(gomega.Equal(""))
Copy link
Member

Choose a reason for hiding this comment

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

ditto: can replace here with framework.ExpectNotEqual(acceptPod.Status.PodIP, "")

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.

// Make sure dropPod is running. There are certain chances that the pod might be teminated due to unexpected reasons. dropPod, err = cs.CoreV1().Pods(namespace).Get(dropPod.Name, metav1.GetOptions{})
dropPod, err = cs.CoreV1().Pods(namespace).Get(dropPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", dropPod.Name)
gomega.Expect(dropPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
Copy link
Member

Choose a reason for hiding this comment

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

ditto

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.

dropPod, err = cs.CoreV1().Pods(namespace).Get(dropPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", dropPod.Name)
gomega.Expect(dropPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
gomega.Expect(dropPod.Status.PodIP).ToNot(gomega.Equal(""))
Copy link
Member

Choose a reason for hiding this comment

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

ditto

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.


deployment, err = cs.AppsV1().Deployments(namespace).Get(deployment.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Error in retriving pause pod deployment")
labelSelector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector)
Copy link
Member

Choose a reason for hiding this comment

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

We might want to put framework.ExpectNoError(err) for the previous call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not clear with this suggestion but added framework.ExpectNoError(err) for metab1.LabelSelector statement along with other effective change in error checking statements.

@oomichi
Copy link
Member

oomichi commented Jul 31, 2019

/cc @oomichi

@spiffxp
Copy link
Member

spiffxp commented Aug 1, 2019

/priority important-soon
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mgdevstack, spiffxp

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2019
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@mgdevstack
Copy link
Contributor Author

/test pull-kubernetes-integration

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@saschagrunert
Copy link
Member

Hey @mgdevstack, may I ask you to modify the PR to rename the release notes entry from No to NONE? It will pop-up in our tooling and I think this not the intention 😇

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants