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

add test confirming service network functions from openshift-apiserver pod #25291

Closed
wants to merge 4 commits into from

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jul 16, 2020

This adds checks to be sure we don't experience outages on the service network. We noticed that there were "connection refused" errors from the openshift-apiserver to the kube-apiserver only through the service network. The direct access via the node IP (kube-apiserver are host-network) continued without any failures.

/hold

Need to hold until the openshift-apiserver network checks land. The choice of Fail versus Flake will be determined based on failure rates.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 16, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2020

failures := []string{}
for _, check := range connectivityChecks.Items {
if !strings.Contains(check.Name, "kube-service") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if !strings.Contains(check.Name, "kube-service") {
if !strings.Contains(check.Name, "kubernetes-service") {

}
}
if len(failures) > 0 {
g.Fail(fmt.Sprintf("the KUBERNETES_SERVICE_HOST:KUBERNETES_SERVICE_PORT was inaccessible via the service network IP (compare against kube-apiserver direct endpoint access):\n%v", strings.Join(failures, "\n")))
Copy link
Contributor

Choose a reason for hiding this comment

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

KUBERNETES_SERVICE_HOST is the service network IP. (ie, this is basically saying "172.30.0.1 was inaccessible via 172.30.0.1").

Also, a random developer looking at test failures will have no idea what "(compare against kube-apiserver direct endpoint access)" is supposed to mean. Is that an instruction to the reader? If so, where is the reader supposed to get that other information, and why can't the test case make the comparison itself?

Also, you can use g.Errorf(...) instead of g.Fail(fmt.Sprintf(...))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, a random developer looking at test failures will have no idea what "(compare against kube-apiserver direct endpoint access)" is supposed to mean. Is that an instruction to the reader? If so, where is the reader supposed to get that other information, and why can't the test case make the comparison itself?

I'll see about adding more information. Basically we are seeing cases today where direct access to a kube-apiserver via the node IP works fine. But access via 172.30.0.1 failed. So we know the kube-apiservers (all of them) are accepting connections, but 172.30.0.1 shows repeated "connection refused"

Copy link
Contributor Author

@deads2k deads2k Jul 20, 2020

Choose a reason for hiding this comment

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

so I want to be sure no one bounces these as "well the kube-apiserver is returning connection refused". In every case we've seen so far, the kube-apiserver is provably functioning and handling connections from the exact same pods, but cannot be accessed via the service network on a node that is reporting the network as ready.

}
}
if len(failures) > 0 {
g.Fail(fmt.Sprintf("the `oc -n openshift-kube-apiserver get services/apiserver` was inaccessible via the service network IP (compare against kube-apiserver direct endpoint access):\n%v", strings.Join(failures, "\n")))
Copy link
Contributor

Choose a reason for hiding this comment

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

It would not be clear to me from the output of these two tests what the difference is between them is (what does -n openshift-kube-apiserver services/apiserver point to, if not the kube apiserver?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One is maintained by the kube-apiserver directly. The kube-apiserver directly writes into the endpoints resource. This is 172.30.0.1.

The other is used by the service monitor. It is a real service maintained by the service/endpoints controller. This has a different IP.

@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2020

/test all

@openshift-ci-robot openshift-ci-robot added the vendor-update Touching vendor dir or related files label Jul 20, 2020
@deads2k deads2k force-pushed the service-network-down branch 2 times, most recently from 7384056 to d563b59 Compare July 20, 2020 17:47
@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2020

now has checks on the actual kube-apiserver endpoints to avoid false positives.

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 20, 2020
@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2020

The test ran.

/test all

@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2020

/retest

@deads2k
Copy link
Contributor Author

deads2k commented Jul 21, 2020

/test all

1 similar comment
@deads2k
Copy link
Contributor Author

deads2k commented Jul 22, 2020

/test all

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 23, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 7, 2020
@deads2k
Copy link
Contributor Author

deads2k commented Aug 10, 2020

/test all

@deads2k
Copy link
Contributor Author

deads2k commented Aug 10, 2020

/retest

@deads2k
Copy link
Contributor Author

deads2k commented Aug 11, 2020

/test all

now that Luis fixed the names

Copy link
Contributor

@sanchezl sanchezl left a comment

Choose a reason for hiding this comment

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

/lgtm

Won't run cleanly until openshift/cluster-kube-apiserver-operator#928 is merged.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, sanchezl

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2020
@deads2k
Copy link
Contributor Author

deads2k commented Aug 12, 2020

/retest

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 2, 2020

@deads2k: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-csi d228c92 link /test e2e-aws-csi
ci/prow/e2e-cmd d228c92 link /test e2e-cmd
ci/prow/e2e-gcp-upgrade d228c92 link /test e2e-gcp-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Contributor

@deads2k: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic-cmd d228c92 link /test e2e-agnostic-cmd

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2021
@openshift-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 20, 2021
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci-robot
Copy link

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants