Skip to content

Bug 2039541: Fix duplicate prepender entries in resolv.conf#2908

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
cybertron:fix-dupe-prepend
Jan 13, 2022
Merged

Bug 2039541: Fix duplicate prepender entries in resolv.conf#2908
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
cybertron:fix-dupe-prepend

Conversation

@cybertron
Copy link
Copy Markdown
Member

In #2835, we changed how the prepender finds the location to insert
the prepended nameserver. Unfortunately, this caused it to prepend
the nameserver before each existing nameserver line, which results
in duplicate entries for the local nameserver. For example:

search ostest.test.metalkube.org
nameserver 192.168.111.23
nameserver 8.8.8.8
nameserver 192.168.111.23

nameserver 192.168.111.1

This is mildly problematic since it pushes the second nameserver out
of the list of 3 that are allowed. In general this probably won't
cause problems because only the local nameserver is actually used,
but it looks weird and will almost certainly result in a bug report
from customers at some point.

The replacement sed line is stolen from [0] and is specific to GNU
sed, but that shouldn't be a problem for us since we only use that
version of sed.

0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only

- What I did

- How to verify it

- Description for the changelog
Fix resolv-prepender logic to avoid duplicate entries.

In openshift#2835, we changed how the prepender finds the location to insert
the prepended nameserver. Unfortunately, this caused it to prepend
the nameserver before each existing nameserver line, which results
in duplicate entries for the local nameserver. For example:

search ostest.test.metalkube.org
nameserver 192.168.111.23
nameserver 8.8.8.8
nameserver 192.168.111.23

This is mildly problematic since it pushes the second nameserver out
of the list of 3 that are allowed. In general this probably won't
cause problems because only the local nameserver is actually used,
but it looks weird and will almost certainly result in a bug report
from customers at some point.

The replacement sed line is stolen from [0] and is specific to GNU
sed, but that shouldn't be a problem for us since we only use that
version of sed.

0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only
@cybertron
Copy link
Copy Markdown
Member Author

/cc @mandre

@openshift-ci openshift-ci Bot requested review from mandre and mdbooth January 11, 2022 22:23
@cybertron
Copy link
Copy Markdown
Member Author

The formatting of the description is a bit weird. The last nameserver that shows up as a title is actually commented out.

Copy link
Copy Markdown
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

Tried it locally, does what it's supposed to do :)
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2022
@mandre
Copy link
Copy Markdown
Member

mandre commented Jan 12, 2022

@cybertron do you have a BZ you can reference?

@cgwalters
Copy link
Copy Markdown
Member

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, cybertron, mandre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2022
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

1 similar comment
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@cybertron cybertron changed the title Fix duplicate prepender entries in resolv.conf Bug 2039541: Fix duplicate prepender entries in resolv.conf Jan 12, 2022
@openshift-ci openshift-ci Bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jan 12, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 12, 2022

@cybertron: This pull request references Bugzilla bug 2039541, which is invalid:

  • expected the bug to target the "4.10.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Bug 2039541: Fix duplicate prepender entries in resolv.conf

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.

@openshift-ci openshift-ci Bot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jan 12, 2022
@cybertron
Copy link
Copy Markdown
Member Author

/bugzilla refresh

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 12, 2022

@cybertron: This pull request references Bugzilla bug 2039541, 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
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

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

Details

In response to this:

/bugzilla refresh

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.

@openshift-ci openshift-ci Bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 12, 2022
@cybertron
Copy link
Copy Markdown
Member Author

@cybertron do you have a BZ you can reference?

Oops, thanks for the reminder. I opened one but forgot to add it here.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 12, 2022

@cybertron: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-op-single-node 88713b7 link false /test e2e-gcp-op-single-node
ci/prow/e2e-aws-workers-rhel7 88713b7 link false /test e2e-aws-workers-rhel7
ci/prow/e2e-aws-workers-rhel8 88713b7 link false /test e2e-aws-workers-rhel8
ci/prow/e2e-aws-upgrade-single-node 88713b7 link false /test e2e-aws-upgrade-single-node
ci/prow/e2e-aws-disruptive 88713b7 link false /test e2e-aws-disruptive

Full PR test history. Your PR dashboard.

Details

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
Copy Markdown
Contributor

/retest-required

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

4 similar comments
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

1 similar comment
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit 61f53a6 into openshift:master Jan 13, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 13, 2022

@cybertron: All pull requests linked via external trackers have merged:

Bugzilla bug 2039541 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2039541: Fix duplicate prepender entries in resolv.conf

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.

@creydr
Copy link
Copy Markdown
Member

creydr commented Feb 25, 2022

/cherry-pick release-4.9

@openshift-cherrypick-robot
Copy link
Copy Markdown

@creydr: #2908 failed to apply on top of branch "release-4.9":

Applying: Fix duplicate prepender entries in resolv.conf
Using index info to reconstruct a base tree...
M	templates/common/on-prem/files/NetworkManager-resolv-prepender.yaml
Falling back to patching base and 3-way merge...
Auto-merging templates/common/on-prem/files/NetworkManager-resolv-prepender.yaml
CONFLICT (content): Merge conflict in templates/common/on-prem/files/NetworkManager-resolv-prepender.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix duplicate prepender entries in resolv.conf
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-4.9

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants