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

CFE-888: Enable DNSNameResolver feature-gate #2131

Merged
merged 1 commit into from
May 16, 2024

Conversation

chiragkyal
Copy link
Member

@chiragkyal chiragkyal commented Nov 27, 2023

Enable DNSNameResolver feature-gate for ovn-kubernetes

Related to EP : openshift/enhancements#1335

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 27, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 27, 2023

@chiragkyal: This pull request references CFE-888 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Related to EP : openshift/enhancements#1335

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-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 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 Nov 27, 2023
Copy link
Contributor

openshift-ci bot commented Nov 27, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2023
@chiragkyal
Copy link
Member Author

/retest

1 similar comment
@chiragkyal
Copy link
Member Author

/retest

@chiragkyal
Copy link
Member Author

/retest

@chiragkyal chiragkyal marked this pull request as ready for review November 29, 2023 09:04
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 29, 2023
@chiragkyal chiragkyal changed the title CFE-888: [WIP] Enable DNSNameResolver feature-gate CFE-888: Enable DNSNameResolver feature-gate Nov 29, 2023
@openshift-ci openshift-ci bot requested review from dcbw and tssurya November 29, 2023 09:05
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 29, 2023

@chiragkyal: This pull request references CFE-888 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Enable DNSNameResolver feature-gate for ovn-kubernetes

Related to EP : openshift/enhancements#1335

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-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 30, 2023
@chiragkyal
Copy link
Member Author

/hold until CRD is available

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2023
@arkadeepsen
Copy link
Member

/hold until ovn-org/ovn-kubernetes#4045 is meged downstream.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 20, 2023
@chiragkyal
Copy link
Member Author

/assign @npinaeva

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2024
Copy link
Member

@npinaeva npinaeva left a comment

Choose a reason for hiding this comment

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

generally looks good, we just need to wait for ovn-k PR to be merged to finalize it

Comment on lines 157 to 162
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
Copy link
Member

Choose a reason for hiding this comment

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

we'll need to split these rights between node and control pane once we finalize the ovn-k implementation. It is likely to be node can only read, and control-plane can create/update/delete

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, for now, I've dropped create, delete, patch and update permissions from node. Let me know if it needs further refinement.

@@ -189,7 +199,7 @@ func TestRenderedOVNKubernetesConfig(t *testing.T) {
disableGRO bool
disableMultiNet bool
enableMultiNetPolicies bool
enableAdminNetPolicies bool
featureGates configv1.CustomFeatureGates
Copy link
Member

Choose a reason for hiding this comment

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

I am thinking, maybe to make less changes in the future, we could replace this parameter with enableFeatureGates []FeatureGateName and then build a real config by iterating over all known feature gates and adding the ones that are listed to Enabled and others to Disabled. In that case you don't need to change tests that don't enable any feature gates, and only make changes when a new feature gate should be enabled. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, and that's a good suggestion. I've updated the structure, hope it looks cleaner now.

resources:
- dnsnameresolvers
verbs:
- create
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the control-plane really require all of these verbs?

Copy link
Member

Choose a reason for hiding this comment

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

I think so, because cluster manager creates and deletes these objects (similar to cloudprivateipconfigs I suppose)

@@ -565,6 +565,11 @@ data:
admin_network_policy_enabled_flag="--enable-admin-network-policy"
fi

dns_name_resolver_enabled_flag=
Copy link
Contributor

Choose a reason for hiding this comment

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

start-ovnkube-node is only used by ovnkube-node, this means that the ovnkube-cluster-manager won't rollout if DNS_NAME_RESOLVER_ENABLE changes.

Copy link
Member

Choose a reason for hiding this comment

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

I think it will, as it uses 004-config.yaml file for features setup

Copy link
Contributor

Choose a reason for hiding this comment

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

Lest consider a scenario in which the featuregate is enabled during cluster runtime(e.g cluster is moved to techpreview):

  1. FeatureGate gets enabled
  2. CNO restarts
  3. CNO renders the new 008-script-lib.yaml and 004-config.yaml confimaps
  4. ovnkube-node daemonset is rolled out because it is annotated with the has of the script:
    // Many ovnkube config options are stored in ConfigMaps; the ovnkube
    // daemonsets need to know when those ConfigMaps change so they can
    // restart with the new options. Render those ConfigMaps first and
    // embed a hash of their data into the ovnkube-node daemonsets.
    h := sha1.New()
    for _, path := range cmPaths {
    manifests, err := render.RenderTemplate(path, &data)
    if err != nil {
    return nil, progressing, errors.Wrapf(err, "failed to render ConfigMap template %q", path)
    }
    // Hash each rendered ConfigMap object's data
    for _, m := range manifests {
    bytes, err := json.Marshal(m)
    if err != nil {
    return nil, progressing, errors.Wrapf(err, "failed to marshal ConfigMap %q manifest", path)
    }
    if _, err := h.Write(bytes); err != nil {
    return nil, progressing, errors.Wrapf(err, "failed to hash ConfigMap %q data", path)
    }
    }
    }
    data.Data["OVNKubeConfigHash"] = hex.EncodeToString(h.Sum(nil))
  5. ovnkube-controller is not rolled out and it doesn't reload the configmap dynamically on its own.

does this make sense?

Copy link
Member

Choose a reason for hiding this comment

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

we agreed it is a bigger problem and created a card for it https://issues.redhat.com/browse/SDN-4832

{{- if .DNS_NAME_RESOLVER_ENABLE }}
- apiGroups: ["network.openshift.io"]
resources:
- dnsnameresolvers
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is the dnsnameresolvers CRD applied?

Copy link
Member

Choose a reason for hiding this comment

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

@@ -819,7 +826,50 @@ logfile-maxage=0`,
controlPlaneReplicaCount: 2,
disableMultiNet: true,
enableMultiNetPolicies: true,
enableAdminNetPolicies: true,
enabledFeatureGates: []configv1.FeatureGateName{configv1.FeatureGateAdminNetworkPolicy},
Copy link
Contributor

Choose a reason for hiding this comment

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

configv1.FeatureGateDNSNameResolver is not set in the featuregates here

Copy link
Member

Choose a reason for hiding this comment

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

I think this test is specific to ANP. The enableAdminNetPolicies field is changed to enabledFeatureGates for using the same field for different feature gates in different test cases. The test case for DNSNameResolver is added below.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2024
@chiragkyal
Copy link
Member Author

/retest-required

when DNSNameResolver feature-gate is enabled

Signed-off-by: chiragkyal <ckyal@redhat.com>
@lihongan
Copy link

/retest-required

@arkadeepsen
Copy link
Member

All other dev PRs are merged

/hold cancel

@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 15, 2024
@melvinjoseph86
Copy link

/retest-required

@npinaeva
Copy link
Member

manual CI-bot report

passed: (37.3s) 2024-05-16T08:39:04 "[sig-network][OCPFeatureGate:DNSNameResolver][Feature:EgressFirewall] when using openshift ovn-kubernetes should ensure egressfirewall with wildcard dns rules is created [Suite:openshift/conformance/parallel]"

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 16, 2024
@kyrtapz
Copy link
Contributor

kyrtapz commented May 16, 2024

/approve

Copy link
Contributor

openshift-ci bot commented May 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chiragkyal, kyrtapz, npinaeva

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 /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 May 16, 2024
@npinaeva
Copy link
Member

/acknowledge-critical-fixes-only

@npinaeva
Copy link
Member

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label May 16, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0a03896 and 2 for PR HEAD 71ddff7 in total

@npinaeva
Copy link
Member

/retest-required

Copy link
Contributor

openshift-ci bot commented May 16, 2024

@chiragkyal: 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-sdn b2d2e55 link true /test e2e-gcp-sdn
ci/prow/e2e-azure-ovn-dualstack b2d2e55 link false /test e2e-azure-ovn-dualstack
ci/prow/e2e-vsphere-ovn-windows b2d2e55 link true /test e2e-vsphere-ovn-windows
ci/prow/e2e-openstack-sdn b2d2e55 link false /test e2e-openstack-sdn
ci/prow/e2e-network-mtu-migration-sdn-ipv4 b2d2e55 link false /test e2e-network-mtu-migration-sdn-ipv4
ci/prow/e2e-aws-ovn-shared-to-local-gateway-mode-migration-periodic b2d2e55 link false /test e2e-aws-ovn-shared-to-local-gateway-mode-migration-periodic
ci/prow/e2e-vsphere-ovn-dualstack-primaryv6 71ddff7 link false /test e2e-vsphere-ovn-dualstack-primaryv6
ci/prow/security 71ddff7 link false /test security
ci/prow/e2e-aws-hypershift-ovn-kubevirt 71ddff7 link false /test e2e-aws-hypershift-ovn-kubevirt
ci/prow/e2e-ovn-ipsec-step-registry 71ddff7 link false /test e2e-ovn-ipsec-step-registry
ci/prow/e2e-azure-ovn 71ddff7 link false /test e2e-azure-ovn
ci/prow/e2e-vsphere-ovn-dualstack 71ddff7 link false /test e2e-vsphere-ovn-dualstack

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-sigs/prow repository. I understand the commands that are listed here.

@npinaeva
Copy link
Member

build failed :(
/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit 019fa77 into openshift:master May 16, 2024
32 of 38 checks passed
@chiragkyal chiragkyal deleted the cfe-888 branch May 16, 2024 18:15
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-network-operator-container-v4.16.0-202405161711.p0.g019fa77.assembly.stream.el9 for distgit cluster-network-operator.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants