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

[release-4.9] Bug 2058511: Prepend to search domains instead of replacing #2966

Conversation

cybertron and others added 3 commits February 25, 2022 09:08
Previously the resolv-prepender script overwrote the search domains
with a specific set of domains, notably including the cluster domain
so cluster addresses will resolve. However, this is not desirable as
it may miss some configured search domains if they don't happen to
come in via DHCP (for example, search domains configured on an
interface via nmcli/nmstate).

This change modifies the prepender logic to also prepend the cluster
domain to the search domain list rather than overwrite it completely.
This means that we don't have to manage the full list of search
domains like we did before. We just add on to the default ones
NetworkManager writes, which should result in less confusing DNS
behavior from the script.

One caveat is that I don't know if the same method can be used for
the resolved case and I don't have any way to test that locally, so
I've left the logic there alone for now. If this turns out to be a
problem for OKD as well then someone will have to work with us to
get that behavior changed too.

(cherry picked from commit e1fbf07)
Commit e1fbf07 introduced a regression where the local nameserver was
only prepended to the list of nameservers when the NM generated
`resolv.conf` had a default search domain.

This commit fix the regex to look for nameservers rather than search
domain, and makes the script a little more robust by using start of
line anchor in regexes.

(cherry picked from commit 09fab1e)
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
(cherry picked from commit 88713b7)
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

@creydr: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.9] Backport BZ2017564, BZ2024826 and BZ2039541

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.

@mandre
Copy link
Member

mandre commented Feb 25, 2022

Thanks! We still need to reference a 4.9 bz in the PR title to make the bot happy:

/retitle [release-4.9] Bug 2058511: Prepend to search domains instead of replacing

I kept the title for the original issue that was fixed with the PR, the other commits are fixups to the fixes.

@openshift-ci openshift-ci bot changed the title [release-4.9] Backport BZ2017564, BZ2024826 and BZ2039541 [release-4.9] Bug 2058511: Prepend to search domains instead of replacing Feb 25, 2022
@openshift-ci openshift-ci bot added bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent 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. labels Feb 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

@creydr: This pull request references Bugzilla bug 2058511, 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.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.z) matches configured target release for branch (4.9.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 2017564 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 2017564 targets the "4.10.0" release, which is one of the valid target releases: 4.10.0
  • bug has dependents

Requesting review from QA contact:
/cc @amalykhi

In response to this:

[release-4.9] Bug 2058511: Prepend to search domains instead of replacing

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 requested a review from amalykhi February 25, 2022 08:37
@creydr
Copy link
Member Author

creydr commented Feb 25, 2022

/cherry-pick release-4.8

@openshift-cherrypick-robot

@creydr: once the present PR merges, I will cherry-pick it on top of release-4.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.8

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
Member Author

creydr commented Feb 25, 2022

/retest

Copy link
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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2022
@creydr
Copy link
Member Author

creydr commented Feb 25, 2022

/assign @kikisdeliveryservice @cybertron

@cybertron
Copy link
Member

/retest-required
/test e2e-metal-ipi
/lgtm
/label backport-risk-assessed
/pony

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Feb 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

@cybertron: pony image

In response to this:

/retest-required
/test e2e-metal-ipi
/lgtm
/label backport-risk-assessed
/pony

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.

@cybertron
Copy link
Member

What have I done?! O.O

:-)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

@creydr: 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/okd-e2e-gcp-op c81fa40 link false /test okd-e2e-gcp-op
ci/prow/e2e-aws-upgrade-single-node c81fa40 link false /test e2e-aws-upgrade-single-node
ci/prow/okd-e2e-aws c81fa40 link false /test okd-e2e-aws
ci/prow/okd-e2e-upgrade c81fa40 link false /test okd-e2e-upgrade
ci/prow/e2e-aws-disruptive c81fa40 link false /test e2e-aws-disruptive

Full PR test history. Your PR dashboard.

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.

@kikisdeliveryservice
Copy link
Contributor

/approve
/skip

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

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

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 [kikisdeliveryservice]

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 Feb 25, 2022
@vvoronkov
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Feb 25, 2022
@openshift-merge-robot openshift-merge-robot merged commit 7601e05 into openshift:release-4.9 Feb 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

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

Bugzilla bug 2058511 has been moved to the MODIFIED state.

In response to this:

[release-4.9] Bug 2058511: Prepend to search domains instead of replacing

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-cherrypick-robot

@creydr: new pull request created: #2970

In response to this:

/cherry-pick release-4.8

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent 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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants