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
Bug 1882485: Prevent dig errors from corrupting host's /etc/hosts #223
Conversation
It's possible for `dig` to print error messages and still succeed, such as if retries are attempted. If that happens, each word of the error message is treated as a separate IP for the service that's being resolved, causing /etc/hosts to be updated with garbage data. This PR does 2 things: - filters out error messages from `dig`, which always begin the line with ';' (usually with ';;', but some messages only have one semicolon) - sets maximum retries to 0 when using tcp for dns, so that the behavior matches that of udp
@rfredette: This pull request references Bugzilla bug 1882485, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, rfredette 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 |
Looks like we're seeing BZ#1886922. |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@rfredette: All pull requests linked via external trackers have merged: Bugzilla bug 1882485 has been moved to the MODIFIED state. In response to this:
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. |
/cherry-pick release-4.6 |
@rfredette: #223 failed to apply on top of branch "release-4.6":
In response to this:
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. |
It's possible for
dig
to print error messages and still succeed, such asif retries are attempted. If that happens, each word of the error
message is treated as a separate IP for the service that's being
resolved, causing /etc/hosts to be updated with garbage data.
This PR does 2 things:
dig
, which always begin the linewith ';' (usually with ';;', but some messages only have one
semicolon)
matches that of udp