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

handling IPv6 within square brackets #32989

Merged

Conversation

gsantoro
Copy link
Contributor

@gsantoro gsantoro commented Sep 6, 2022

What does this PR do?

Handle [] around IPv6 in upstream servers addresses

Why is it important?

If upstream server field has an IPv6 it will not be correctly handled.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • all pipeline tests are passing. You can run the pipeline tests with
cd filebeat
GENERATE=true TESTING_FILEBEAT_MODULES=nginx TESTING_FILEBEAT_FILESETS=ingress_controller mage -v pythonIntegTest

How to test this PR locally

Related issues

@gsantoro gsantoro added bug Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team labels Sep 6, 2022
@gsantoro gsantoro requested a review from a team September 6, 2022 12:01
@gsantoro gsantoro self-assigned this Sep 6, 2022
@gsantoro gsantoro requested a review from a team as a code owner September 6, 2022 12:01
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 6, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 6, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @gsantoro? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 6, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-07T10:05:50.946+0000

  • Duration: 68 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 6381
Skipped 737
Total 7118

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@andrewkroh
Copy link
Member

Relates: elastic/integrations#3117 (comment)

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

Please add test data for the use case that this fixes. Add the samples to https://github.com/elastic/beats/blob/980972ea9a58bf6bb78fb190b499fbf9c17f1cc4/filebeat/module/nginx/ingress_controller/test/test.log then regenerate the expected.json file.

@gsantoro
Copy link
Contributor Author

gsantoro commented Sep 6, 2022

Please add test data for the use case that this fixes. Add the samples to https://github.com/elastic/beats/blob/980972ea9a58bf6bb78fb190b499fbf9c17f1cc4/filebeat/module/nginx/ingress_controller/test/test.log then regenerate the expected.json file.

I was looking into adding some tests but currently I can't find how to run those ingest pipeilne tests in the nginx_ingress_controller fileset. Is there something like what we use in the integrations repo (eg. elastic-package test pipeline -v).

Copy link
Contributor

@tetianakravchenko tetianakravchenko left a comment

Choose a reason for hiding this comment

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

LGTM!

@gsantoro gsantoro added the backport-v8.3.0 Automated backport with mergify label Sep 7, 2022
@gsantoro gsantoro merged commit 05b4a42 into elastic:main Sep 7, 2022
@gsantoro gsantoro deleted the feature/nginx_ingress_controller_ipv6 branch September 7, 2022 12:58
@gsantoro
Copy link
Contributor Author

gsantoro commented Sep 7, 2022

@Mergifyio backport 8.3

@mergify
Copy link
Contributor

mergify bot commented Sep 7, 2022

backport 8.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 7, 2022
* handling IPv6 within square brackets

(cherry picked from commit 05b4a42)
gsantoro pushed a commit that referenced this pull request Sep 7, 2022
@Strangerxxx
Copy link

@Mergifyio backport 7.17

@mergify
Copy link
Contributor

mergify bot commented Apr 21, 2023

backport 7.17

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission>=write

@Strangerxxx
Copy link

@gsantoro is it possible to backport this into 7.17 branch?

chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* handling IPv6 within square brackets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.3.0 Automated backport with mergify bug Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPv6 address is not correctly parsed by filebeat with the nginx_ingress_controller module
6 participants