openshift / kuryr-kubernetes

kuryr-kubernetes - CNI plugin using OpenStack Neutron and Octavia to provide networking for pods and services.
Apache License 2.0
21 stars 23 forks source link

OCPBUGS-12780: KuryrPort cleanup: Fix issue of subport not found #724

Closed shiftstack-merge-bot[bot] closed 1 year ago

shiftstack-merge-bot[bot] commented 1 year ago

It can happen that during the cleanup of KuryrPort when Pod is already gone we'll fail trying to find the parent port ID. We have a bug that in this case finalizing of KuryrPort fails.

This commit changes the way we look for the hostIP of the pod to actually look up a node using the info from KuryrPort CRD. If this fails (node removed?) we try querying OpenStack API to get this information. If this fails too, we just don't pass hostIP to mocked Pod.

openshift-ci[bot] commented 1 year ago

Hi @shiftstack-merge-bot[bot]. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
MaysaMacedo commented 1 year ago

/ok-to-test

MaysaMacedo commented 1 year ago

/retest no pods created? retrying...

openshift-ci[bot] commented 1 year ago

@shiftstack-merge-bot[bot]: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 1 year ago

@shiftstack-merge-bot[bot]: This pull request references Jira Issue OCPBUGS-12780, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.14.0) matches configured target version for branch (4.14.0) * bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (itbrown@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/724): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openshift-ci-robot commented 1 year ago

@shiftstack-merge-bot[bot]: This pull request references Jira Issue OCPBUGS-12780, which is valid.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.14.0) matches configured target version for branch (4.14.0) * bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (itbrown@redhat.com), skipping review request.

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/724): >It can happen that during the cleanup of KuryrPort when Pod is already >gone we'll fail trying to find the parent port ID. We have a bug that in >this case finalizing of KuryrPort fails. > >This commit changes the way we look for the hostIP of the pod to >actually look up a node using the info from KuryrPort CRD. If this fails >(node removed?) we try querying OpenStack API to get this information. >If this fails too, we just don't pass hostIP to mocked Pod. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dulek commented 1 year ago

/approve /lgtm

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek, shiftstack-merge-bot[bot]

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: - ~~[OWNERS](https://github.com/openshift/kuryr-kubernetes/blob/master/OWNERS)~~ [dulek] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci-robot commented 1 year ago

@shiftstack-merge-bot[bot]: Jira Issue OCPBUGS-12780: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-12780 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/724): >It can happen that during the cleanup of KuryrPort when Pod is already >gone we'll fail trying to find the parent port ID. We have a bug that in >this case finalizing of KuryrPort fails. > >This commit changes the way we look for the hostIP of the pod to >actually look up a node using the info from KuryrPort CRD. If this fails >(node removed?) we try querying OpenStack API to get this information. >If this fails too, we just don't pass hostIP to mocked Pod. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dulek commented 1 year ago

/cherry-pick release-4.13

openshift-cherrypick-robot commented 1 year ago

@dulek: new pull request created: #726

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/724#issuecomment-1543518870): >/cherry-pick release-4.13 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.