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.8] Bug 2058789: Prepend to search domains instead of replacing #2970

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #2966

/assign creydr

cybertron and others added 3 commits February 25, 2022 21:35
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

@openshift-cherrypick-robot: Bugzilla bug 2058511 has been cloned as Bugzilla bug 2058789. Retitling PR to link against new bug.
/retitle [release-4.8] [release-4.9] Bug 2058789: Prepend to search domains instead of replacing

In response to this:

[release-4.8] [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 changed the title [release-4.8] [release-4.9] Bug 2058511: Prepend to search domains instead of replacing [release-4.8] [release-4.9] Bug 2058789: 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/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

@openshift-cherrypick-robot: This pull request references Bugzilla bug 2058789, which is invalid:

  • expected dependent Bugzilla bug 2058511 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is MODIFIED 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.

In response to this:

[release-4.8] [release-4.9] Bug 2058789: 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.

@kikisdeliveryservice kikisdeliveryservice changed the title [release-4.8] [release-4.9] Bug 2058789: Prepend to search domains instead of replacing [release-4.8] Bug 2058789: Prepend to search domains instead of replacing Feb 25, 2022
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.

/retest
/lgtm

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

creydr commented Feb 26, 2022

/assign @kikisdeliveryservice @cybertron
/retest
/cherry-pick release-4.7

@openshift-cherrypick-robot
Copy link
Author

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

In response to this:

/assign @kikisdeliveryservice @cybertron
/retest
/cherry-pick release-4.7

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-bot
Copy link
Contributor

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 27, 2022

@openshift-bot: This pull request references Bugzilla bug 2058789, which is invalid:

  • expected dependent Bugzilla bug 2058511 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA 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.

In response to this:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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

creydr commented Feb 27, 2022

/retest

@openshift-bot
Copy link
Contributor

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 28, 2022

@openshift-bot: This pull request references Bugzilla bug 2058789, which is invalid:

  • expected dependent Bugzilla bug 2058511 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA 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.

In response to this:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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

openshift-ci bot commented Feb 28, 2022

@openshift-cherrypick-robot: 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-upgrade 9ee66bc link false /test okd-e2e-upgrade
ci/prow/okd-e2e-aws 9ee66bc link false /test okd-e2e-aws

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.

@cybertron
Copy link
Member

/lgtm
/label backport-risk-assessed

@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 28, 2022
@creydr
Copy link
Member

creydr commented Feb 28, 2022

/assign @kikisdeliveryservice

@openshift-bot
Copy link
Contributor

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@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 Mar 1, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 1, 2022

@openshift-bot: This pull request references Bugzilla bug 2058789, which is valid.

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

Requesting review from QA contact:
/cc @amalykhi

In response to this:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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 March 1, 2022 01:01
@kikisdeliveryservice
Copy link
Contributor

/skip
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cybertron, kikisdeliveryservice, mandre, openshift-cherrypick-robot

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 Mar 1, 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 Mar 1, 2022
@openshift-merge-robot openshift-merge-robot merged commit e41aea6 into openshift:release-4.8 Mar 1, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 1, 2022

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

Bugzilla bug 2058789 has been moved to the MODIFIED state.

In response to this:

[release-4.8] Bug 2058789: 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
Copy link
Author

@creydr: new pull request created: #2977

In response to this:

/assign @kikisdeliveryservice @cybertron
/retest
/cherry-pick release-4.7

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

8 participants