Skip to content

Test flake: kubernetes/e2e_test/test_client.py::TestClient::test_portforward_raw #1300

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

Closed
roycaihw opened this issue Oct 28, 2020 · 20 comments · Fixed by #1329 or #1785
Closed

Test flake: kubernetes/e2e_test/test_client.py::TestClient::test_portforward_raw #1300

roycaihw opened this issue Oct 28, 2020 · 20 comments · Fixed by #1329 or #1785
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/flake Categorizes issue or PR as related to a flaky test. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@roycaihw
Copy link
Member

The presubmit test_portforward_raw is flaky. Example: https://travis-ci.org/github/kubernetes-client/python/jobs/735898772

=================================== FAILURES ===================================
_______________________ TestClient.test_portforward_raw ________________________
self = <kubernetes.e2e_test.test_client.TestClient testMethod=test_portforward_raw>
def test_portforward_raw(self):
client = api_client.ApiClient(configuration=self.config)
api = core_v1_api.CoreV1Api(client)

    name = 'portforward-raw-' + short_uuid()
    pod_manifest = manifest_with_command(
        name,
        ' '.join((
            '((while true;do nc -l -p 1234 -e /bin/cat; done)&);',
            '((while true;do nc -l -p 1235 -e /bin/cat; done)&);',
            'sleep 60',
        ))
    )
    resp = api.create_namespaced_pod(body=pod_manifest,
                                     namespace='default')
    self.assertEqual(name, resp.metadata.name)
    self.assertTrue(resp.status.phase)

    while True:
        resp = api.read_namespaced_pod(name=name,
                                       namespace='default')
        self.assertEqual(name, resp.metadata.name)
        self.assertTrue(resp.status.phase)
        if resp.status.phase != 'Pending':
            break
        time.sleep(1)

    pf = portforward(api.connect_get_namespaced_pod_portforward,
                     name, 'default',
                     ports='1234,1235,1236')
    self.assertTrue(pf.connected)
    sock1234 = pf.socket(1234)
    sock1235 = pf.socket(1235)
    sock1234.setblocking(True)
    sock1235.setblocking(True)
    sent1234 = b'Test port 1234 forwarding...'
    sent1235 = b'Test port 1235 forwarding...'
    sock1234.sendall(sent1234)
    sock1235.sendall(sent1235)
    reply1234 = b''
    reply1235 = b''
    while True:
        rlist = []
        if sock1234.fileno() != -1:
            rlist.append(sock1234)
        if sock1235.fileno() != -1:
            rlist.append(sock1235)
        if not rlist:
            break
        r, _w, _x = select.select(rlist, [], [], 1)
        if not r:
            break
        if sock1234 in r:
            data = sock1234.recv(1024)
            self.assertNotEqual(data, b'', "Unexpected socket close")
            reply1234 += data
        if sock1235 in r:
            data = sock1235.recv(1024)
            self.assertNotEqual(data, b'', "Unexpected socket close")
            reply1235 += data
  self.assertEqual(reply1234, sent1234)

E AssertionError: b'' != b'Test port 1234 forwarding...'
kubernetes/e2e_test/test_client.py:226: AssertionError

@roycaihw roycaihw added the kind/flake Categorizes issue or PR as related to a flaky test. label Oct 28, 2020
@roycaihw
Copy link
Member Author

cc @iciclespider

@roycaihw
Copy link
Member Author

roycaihw commented Nov 9, 2020

/help

@k8s-ci-robot
Copy link
Contributor

@roycaihw:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

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.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 9, 2020
@roycaihw
Copy link
Member Author

roycaihw commented Nov 9, 2020

/assign @iciclespider

@k8s-ci-robot
Copy link
Contributor

@roycaihw: GitHub didn't allow me to assign the following users: iciclespider.

Note that only kubernetes-client members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @iciclespider

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.

@yliaog
Copy link
Contributor

yliaog commented Feb 26, 2021

/reopen

@k8s-ci-robot
Copy link
Contributor

@yliaog: Reopened this issue.

In response to this:

/reopen

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.

@k8s-ci-robot k8s-ci-robot reopened this Feb 26, 2021
@yliaog
Copy link
Contributor

yliaog commented Feb 26, 2021

/assign @iciclespider

@k8s-ci-robot
Copy link
Contributor

@yliaog: GitHub didn't allow me to assign the following users: iciclespider.

Note that only kubernetes-client members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @iciclespider

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.

@yliaog
Copy link
Contributor

yliaog commented Feb 26, 2021

https://travis-ci.org/github/kubernetes-client/python/jobs/760520249

the test is still failing after pr #1329

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

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

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 27, 2021
@palnabarun
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 28, 2021
@palnabarun
Copy link
Member

The test is still flaking a lot. This needs to be looked at.

I feel that it's mostly related to the use of Threads in the implementation and the test. However, I am not very sure.

@palnabarun
Copy link
Member

/assign @Priyankasaggu11929

@k8s-ci-robot
Copy link
Contributor

@palnabarun: GitHub didn't allow me to assign the following users: Priyankasaggu11929.

Note that only kubernetes-client members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @Priyankasaggu11929

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.

palnabarun added a commit to palnabarun/python that referenced this issue May 28, 2021
The test is flaking a lot resulting in dev work to be slowed down.
This needs to be investigated and resolved. Only then, the test
should be reenabled.

See: kubernetes-client#1300

Signed-off-by: Nabarun Pal <[email protected]>
@Priyankasaggu11929
Copy link
Contributor

/assign @Priyankasaggu11929

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 27, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 26, 2021
@k8s-ci-robot k8s-ci-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Sep 26, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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.

bh717 pushed a commit to bh717/python-dapp that referenced this issue Apr 1, 2024
The test is flaking a lot resulting in dev work to be slowed down.
This needs to be investigated and resolved. Only then, the test
should be reenabled.

See: kubernetes-client/python#1300

Signed-off-by: Nabarun Pal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/flake Categorizes issue or PR as related to a flaky test. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
7 participants