Skip to content

OCPBUGS-6829: Add protocolStrategy for upstreams in dnses.operator.openshift.io#1429

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
gcs278:dns-force_tcp
May 16, 2023
Merged

OCPBUGS-6829: Add protocolStrategy for upstreams in dnses.operator.openshift.io#1429
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
gcs278:dns-force_tcp

Conversation

@gcs278
Copy link
Copy Markdown
Contributor

@gcs278 gcs278 commented Mar 22, 2023

OCPBUGS-6829: Add protocolStrategy for upstreams in dnses.operator.openshift.io

protocolStrategy adds the ability to configure the force_tcp CoreDNS Corefile configuration for upstreams, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

Adds the following fields:

  • spec.upstreamResolvers.protocolStrategy
    • For default (".") usptream server
  • spec.servers[].forwardPlugin.protocolStrategy
    • For custom list of DNS resolvers

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Mar 22, 2023
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 22, 2023
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 22, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

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

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

OCPBUGS-6829: Add forceTCP API for dnses.operator.openshift.io

forceTCP turns on the force_tcp CoreDNS Corefile configuration, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

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

openshift-ci Bot commented Mar 22, 2023

Hello @gcs278! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

Comment thread operator/v1/0000_70_dns-operator_00.crd.yaml Outdated
Comment thread operator/v1/0000_70_dns-operator_00.crd.yaml Outdated
@gcs278 gcs278 force-pushed the dns-force_tcp branch 3 times, most recently from fa7abf7 to bdc74da Compare March 24, 2023 16:32
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

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

Details

In response to this:

OCPBUGS-6829: Add upstreamProtocolPolicy for dnses.operator.openshift.io

forceTCP turns on the force_tcp CoreDNS Corefile configuration, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

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.

@gcs278 gcs278 changed the title [WIP] OCPBUGS-6829: Add forceTCP API for dnses.operator.openshift.io [WIP] OCPBUGS-6829: Add upstreamProtocolPolicy for dnses.operator.openshift.io Mar 24, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

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

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

OCPBUGS-6829: Add upstreamProtocolPolicy for dnses.operator.openshift.io

upstreamProtocolPolicy adds the ability to configure the force_tcp CoreDNS Corefile configuration, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

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.

@gcs278
Copy link
Copy Markdown
Contributor Author

gcs278 commented Mar 24, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid 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. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 24, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira 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.

@gcs278 gcs278 force-pushed the dns-force_tcp branch 3 times, most recently from a66cde7 to 1226985 Compare March 24, 2023 18:17
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

OCPBUGS-6829: Add protocolPolicy for upstreams in dnses.operator.openshift.io

protocolPolicy adds the ability to configure the force_tcp CoreDNS Corefile configuration for upstreams, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

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.

@gcs278 gcs278 changed the title [WIP] OCPBUGS-6829: Add upstreamProtocolPolicy for dnses.operator.openshift.io [WIP] OCPBUGS-6829: Add protocolPolicy for upstreams in dnses.operator.openshift.io Mar 24, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

OCPBUGS-6829: Add protocolPolicy for upstreams in dnses.operator.openshift.io

protocolPolicy adds the ability to configure the force_tcp CoreDNS Corefile configuration for upstreams, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

Adds the following fields:
spec.upstreamResolvers.protocolPolicy

  • For default (".") usptream server
    spec.servers[].forwardPlugin.protocolPolicy
  • For custom list of DNS resolvers

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-robot
Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-6829, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

OCPBUGS-6829: Add protocolPolicy for upstreams in dnses.operator.openshift.io

protocolPolicy adds the ability to configure the force_tcp CoreDNS Corefile configuration for upstreams, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

Adds the following fields:

  • spec.upstreamResolvers.protocolPolicy
  • For default (".") usptream server
  • spec.servers[].forwardPlugin.protocolPolicy
  • For custom list of DNS resolvers

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.

Comment thread operator/v1/types_dns.go Outdated

var (
// ProtocolStrategyDefault specifies no opinion for DNS protocol.
// If empty, the default behavior of CoreDNS is used. Currently, this means that CoreDNS uses the protocol of the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit can we be consistent with indentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry - I actually turned off auto format in GoLand because it kept changing one of the // * formats to remove the bullet points and missed this.

Done.

Comment thread operator/v1/types_dns.go
NetworkResolverType UpstreamType = "Network"
)

// ProtocolStrategy is a preference for the protocol to use for DNS queries.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What should a consumer of this do if there's a value that they do not recognise? Think about what you'd expect the operator to do if a new value was added to this enum?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hm. I figured the consumer (cluster-dns-operator) would just do nothing if it received a value it doesn't recognize. That's how I have it coded right now (it's out-of-date with API, but openshift/cluster-dns-operator#359). By nothing, meaning, it will use the default mode of operation (same as "").

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's fine, I would just add a comment for developers, this is our get out of jail free card for adding a future strategy, as we've already told the consumers what they should be doing if they see a value they don't recognise (which would happen for some consumers on upgrade for example)

Suggested change
// ProtocolStrategy is a preference for the protocol to use for DNS queries.
// ProtocolStrategy is a preference for the protocol to use for DNS queries.
// ---
// + When consumers observe an unknown value, they should use the default strategy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, done. Not sure if you literally wanted --- and a +, but let me know if you did.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah I did 😅 Sorry, should have explained, the format I put there means that the doc comment will only be visible here, it prevents the doc being picked up in any swagger or openapi copies of the docs. --- prevents swagger taking anything after it, + stops openapi picking it up

I was wrong though, the --- line needs to be // + ---

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting okay. I pushed up again, let me know if I interpreted you correctly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, perfect, thanks

@gcs278 gcs278 force-pushed the dns-force_tcp branch 3 times, most recently from 9247495 to 962ca3e Compare May 4, 2023 14:55
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this file should be checked in, it should have been removed during the verify stage 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, not sure how this got here, but removed.

Comment thread verify_openapi/openapi.json Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As well, I don't think this should have been checked in

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed

…enshift.io

protocolStrategy adds the ability to configure the force_tcp CoreDNS
Corefile configuration for upstreams, which forces TCP for all upstream
DNS requests. This is to resolve issues regarding problematic DNS
upstreams as well as a potential UDP reliability problems.
@openshift-ci openshift-ci Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 4, 2023
@JoelSpeed
Copy link
Copy Markdown
Contributor

/approve

/hold

Have you considered getting QE to validate the API changes in tandem with an implementation PR before we merge? Can be useful sometimes to have QE validate the API change via implementation, would not be the first time QE feedback has caused changes to APIs.

If you're confident, feel free to remove the hold

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 5, 2023
@gcs278
Copy link
Copy Markdown
Contributor Author

gcs278 commented May 5, 2023

Have you considered getting QE to validate the API changes in tandem with an implementation PR before we merge? Can be useful sometimes to have QE validate the API change via implementation, would not be the first time QE feedback has caused changes to APIs.

I'm asking QE right now to validate these changes to be safe.

Thanks for the approval

@Miciah
Copy link
Copy Markdown
Contributor

Miciah commented May 8, 2023

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita, gcs278, JoelSpeed, Miciah

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

@melvinjoseph86
Copy link
Copy Markdown

Hi Team,
I tried with the cluster bot and initial test on functionality are all working fine.

  1. We can see the default version as none in the edit section
    oc edit dns.operator default
    <----snip--->
    operatorLogLevel: Normal
    upstreamResolvers:
    policy: Sequential
    protocolStrategy: ""
    transportConfig: {}
    <----snip--->

melvinjoseph@mjoseph-mac Downloads % oc get dns.operator default -oyaml
<----snip--->
upstreamResolvers:
policy: Sequential
protocolStrategy: ""
transportConfig: {}
<----snip--->

sh-4.4# cat /etc/coredns/Corefile
<----snip--->
forward . /etc/resolv.conf {
policy sequential
}
<----snip--->

  1. Changing the protocolStrategy to `TCP
    oc edit dns.operator default
    <----snip--->
    upstreamResolvers:
    policy: Sequential
    protocolStrategy: TCP
    transportConfig: {}
    <----snip--->

melvinjoseph@mjoseph-mac Downloads % oc get dns.operator default -oyaml
<----snip--->
upstreamResolvers:
policy: Sequential
protocolStrategy: TCP
<----snip--->

sh-4.4# cat /etc/coredns/Corefile
<----snip--->
forward . /etc/resolv.conf {
policy sequential
force_tcp
}
<----snip--->

So initial functionality looks good, need to test further on advance end

@JoelSpeed
Copy link
Copy Markdown
Contributor

@Miciah @gcs278 if you're happy with that response from QE, feel free to remove the hold

@gcs278
Copy link
Copy Markdown
Contributor Author

gcs278 commented May 16, 2023

@JoelSpeed yes we are, removing the hold, thanks for the reviews.
/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 16, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 16, 2023

@gcs278: all tests passed!

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-merge-robot openshift-merge-robot merged commit 333bc19 into openshift:master May 16, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@gcs278: Jira Issue OCPBUGS-6829: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-6829 has not been moved to the MODIFIED state.

Details

In response to this:

OCPBUGS-6829: Add protocolStrategy for upstreams in dnses.operator.openshift.io

protocolStrategy adds the ability to configure the force_tcp CoreDNS Corefile configuration for upstreams, which forces TCP for all upstream DNS requests. This is to resolve issues regarding problematic DNS upstreams as well as a potential UDP reliability problems.

Adds the following fields:

  • spec.upstreamResolvers.protocolStrategy
  • For default (".") usptream server
  • spec.servers[].forwardPlugin.protocolStrategy
  • For custom list of DNS resolvers

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.

@gcs278
Copy link
Copy Markdown
Contributor Author

gcs278 commented Jun 20, 2023

/cherry-pick release-4.13

@openshift-cherrypick-robot
Copy link
Copy Markdown

@gcs278: new pull request created: #1500

Details

In response to this:

/cherry-pick release-4.13

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.

@gcs278
Copy link
Copy Markdown
Contributor Author

gcs278 commented Jun 21, 2023

/cherry-pick release-4.12

@openshift-cherrypick-robot
Copy link
Copy Markdown

@gcs278: new pull request created: #1502

Details

In response to this:

/cherry-pick release-4.12

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants