Skip to content

Conversation

tsorya
Copy link
Contributor

@tsorya tsorya commented Aug 17, 2025

MGMT-21485: Enable dpu-host mode that matches DPF requirements
This commit introduces OVN_NODE_MODE environment variable to enable per-node
feature enforcement, particularly for DPU host mode where certain features
must be disabled regardless of cluster-wide configuration.

  • Move feature toggles from ConfigMap (004-config.yaml) to startup script (008-script-lib.yaml)

  • ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional

  • Implement OVN_NODE_MODE-based conditional feature enablement in startup script

  • Add 'dpu-host' mode that automatically disables incompatible features:

    • Egress IP and related features (egress firewall, egress QoS, egress service)
    • Multicast support
    • Multi-external gateway support
    • Multi-network policies and admin network policies
    • Network segmentation features
  • Set gateway_interface='derive-from-mgmt-port' for DPU host nodes

  • Add ovnkube_node_mode='--ovnkube-node-mode dpu-host' flag

From bindata/network/ovn-kubernetes/*/004-config.yaml:

  • enable-egress-ip=true
  • enable-egress-firewall=true
  • enable-egress-qos=true
  • enable-egress-service=true
  • enable-multicast=true
  • enable-multi-external-gateway=true
  • enable-multi-network=true (conditionally)
  • enable-admin-network-policy=true (conditionally)
  • enable-network-segmentation=true (conditionally)

Note: HyperShift hosted cluster ConfigMap (managed/004-config.yaml) retains
egress feature flags as DPU host mode is not supported in hosted cluster
configurations.

  • Add conditional blocks in 008-script-lib.yaml based on OVN_NODE_MODE

  • Full mode (default): All features enabled as configured

  • DPU host mode: Incompatible features force-disabled

  • Maintain backward compatibility for existing deployments

  • Rename egress_ip_enable_flag to egress_features_enable_flag for clarity

  • Add comprehensive TestOVNKubernetesScriptLibCombined test covering:

    • DPU host mode feature gating and disabling
    • Full mode with multi-network features enabled/disabled
    • Non-mode-gated features (route advertisements, DNS resolver, etc.)
    • Gateway interface variable usage validation
    • Multi-external gateway and egress features flag behavior across modes
  • Remove redundant individual test functions after consolidation

  • Update existing config rendering tests for new ConfigMap content

  • Update test assertions to use correct flag names (egress_features_enable_flag)

  • Create docs/ovn_node_mode.md with detailed technical explanation

  • Update docs/operands.md with OVN-Kubernetes node modes section

  • Update docs/architecture.md with per-node configuration explanation

  • Update README.md with DPU host mode support information

  • Add implementation details, feature mapping tables, and migration notes

  • Document multi-external gateway as disabled feature in DPU host mode

  • Update all references to use correct flag names

ConfigMap-based feature control cannot be overridden per-node, making it
impossible to disable features on specific node types (like DPU hosts) while
keeping them enabled cluster-wide. Moving the logic to startup scripts allows
the same cluster configuration to work across heterogeneous node types.

This change ensures that DPU host nodes automatically have incompatible
features disabled, preventing runtime failures and enabling mixed-mode
cluster deployments.

  • Existing clusters continue to work without changes

  • Default behavior (full mode) remains unchanged

  • Migration is automatic during upgrade process

  • No manual intervention required

  • HyperShift hosted clusters unaffected (DPU host mode not supported)

    MGMT-21314: CNO enable advanced gateway detection in ovnkube in dpu host mode
    Adding required gateway value for ovnk in dpu-host mode
    This commit enables usage of ovnkube in dpu host mode: advanced gateway detection ovn-kubernetes/ovn-kubernetes#5327

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 17, 2025
@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 Aug 17, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 17, 2025

@tsorya: This pull request references MGMT-21485 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 task to target the "4.20.0" version, but no target version was set.

In response to this:

MGMT-21485: Implement per-node feature enforcement via OVN_NODE_MODE

This commit introduces OVN_NODE_MODE environment variable to enable per-node
feature enforcement, particularly for DPU host mode where certain features
must be disabled regardless of cluster-wide configuration.

  • Move feature toggles from ConfigMap (004-config.yaml) to startup script (008-script-lib.yaml)

  • ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional

  • Implement OVN_NODE_MODE-based conditional feature enablement in startup script

  • Add 'dpu-host' mode that automatically disables incompatible features:

    • Egress IP and related features (egress firewall, egress QoS, egress service)
    • Multicast support
    • Multi-network policies and admin network policies
    • Network segmentation features
  • Set gateway_interface='derive-from-mgmt-port' for DPU host nodes

  • Add ovnkube_node_mode='--ovnkube-node-mode dpu-host' flag

From bindata/network/ovn-kubernetes/*/004-config.yaml:

  • enable-egress-ip=true

  • enable-egress-firewall=true

  • enable-egress-qos=true

  • enable-egress-service=true

  • enable-multicast=true

  • enable-multi-network=true (conditionally)

  • enable-admin-network-policy=true (conditionally)

  • enable-network-segmentation=true (conditionally)

  • Add conditional blocks in 008-script-lib.yaml based on OVN_NODE_MODE

  • Full mode (default): All features enabled as configured

  • DPU host mode: Incompatible features force-disabled

  • Maintain backward compatibility for existing deployments

  • Add comprehensive TestOVNKubernetesScriptLibCombined test covering:

    • DPU host mode feature gating and disabling
    • Full mode with multi-network features enabled/disabled
    • Non-mode-gated features (route advertisements, DNS resolver, etc.)
    • Gateway interface variable usage validation
  • Remove redundant individual test functions after consolidation

  • Update existing config rendering tests for new ConfigMap content

  • Create docs/ovn_node_mode.md with detailed technical explanation

  • Update docs/operands.md with OVN-Kubernetes node modes section

  • Update docs/architecture.md with per-node configuration explanation

  • Update README.md with DPU host mode support information

  • Add implementation details, feature mapping tables, and migration notes

ConfigMap-based feature control cannot be overridden per-node, making it
impossible to disable features on specific node types (like DPU hosts) while
keeping them enabled cluster-wide. Moving the logic to startup scripts allows
the same cluster configuration to work across heterogeneous node types.

This change ensures that DPU host nodes automatically have incompatible
features disabled, preventing runtime failures and enabling mixed-mode
cluster deployments.

  • Existing clusters continue to work without changes
  • Default behavior (full mode) remains unchanged
  • Migration is automatic during upgrade process
  • No manual intervention required

MGMT-21314: CNO enable advanced gateway detection in ovnkube in dpu host mode
Adding required gateway value for ovnk in dpu-host mode
This commit enables usage of ovn-kubernetes/ovn-kubernetes#5327

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Aug 17, 2025

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

@tsorya tsorya marked this pull request as ready for review August 17, 2025 06:13
@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 Aug 17, 2025
Copy link
Contributor

@ricky-rav ricky-rav left a comment

Choose a reason for hiding this comment

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

Requesting just to modify a variable name and to discuss the changes for managed clusters. All the rest looks good.

@ricky-rav
Copy link
Contributor

/retest

@tsorya tsorya force-pushed the igal/cno-dpf-integration branch 2 times, most recently from f862560 to bac1bb9 Compare August 18, 2025 18:44
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 18, 2025

@tsorya: This pull request references MGMT-21485 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 task to target the "4.20.0" version, but no target version was set.

In response to this:

MGMT-21485: Enable dpu-host mode that matches DPF requirements
This commit introduces OVN_NODE_MODE environment variable to enable per-node
feature enforcement, particularly for DPU host mode where certain features
must be disabled regardless of cluster-wide configuration.

  • Move feature toggles from ConfigMap (004-config.yaml) to startup script (008-script-lib.yaml)

  • ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional

  • Implement OVN_NODE_MODE-based conditional feature enablement in startup script

  • Add 'dpu-host' mode that automatically disables incompatible features:

  • Egress IP and related features (egress firewall, egress QoS, egress service)

  • Multicast support

  • Multi-external gateway support

  • Multi-network policies and admin network policies

  • Network segmentation features

  • Set gateway_interface='derive-from-mgmt-port' for DPU host nodes

  • Add ovnkube_node_mode='--ovnkube-node-mode dpu-host' flag

From bindata/network/ovn-kubernetes/*/004-config.yaml:

  • enable-egress-ip=true
  • enable-egress-firewall=true
  • enable-egress-qos=true
  • enable-egress-service=true
  • enable-multicast=true
  • enable-multi-external-gateway=true
  • enable-multi-network=true (conditionally)
  • enable-admin-network-policy=true (conditionally)
  • enable-network-segmentation=true (conditionally)

Note: HyperShift hosted cluster ConfigMap (managed/004-config.yaml) retains
egress feature flags as DPU host mode is not supported in hosted cluster
configurations.

  • Add conditional blocks in 008-script-lib.yaml based on OVN_NODE_MODE

  • Full mode (default): All features enabled as configured

  • DPU host mode: Incompatible features force-disabled

  • Maintain backward compatibility for existing deployments

  • Rename egress_ip_enable_flag to egress_features_enable_flag for clarity

  • Add comprehensive TestOVNKubernetesScriptLibCombined test covering:

  • DPU host mode feature gating and disabling

  • Full mode with multi-network features enabled/disabled

  • Non-mode-gated features (route advertisements, DNS resolver, etc.)

  • Gateway interface variable usage validation

  • Multi-external gateway and egress features flag behavior across modes

  • Remove redundant individual test functions after consolidation

  • Update existing config rendering tests for new ConfigMap content

  • Update test assertions to use correct flag names (egress_features_enable_flag)

  • Create docs/ovn_node_mode.md with detailed technical explanation

  • Update docs/operands.md with OVN-Kubernetes node modes section

  • Update docs/architecture.md with per-node configuration explanation

  • Update README.md with DPU host mode support information

  • Add implementation details, feature mapping tables, and migration notes

  • Document multi-external gateway as disabled feature in DPU host mode

  • Update all references to use correct flag names

ConfigMap-based feature control cannot be overridden per-node, making it
impossible to disable features on specific node types (like DPU hosts) while
keeping them enabled cluster-wide. Moving the logic to startup scripts allows
the same cluster configuration to work across heterogeneous node types.

This change ensures that DPU host nodes automatically have incompatible
features disabled, preventing runtime failures and enabling mixed-mode
cluster deployments.

  • Existing clusters continue to work without changes

  • Default behavior (full mode) remains unchanged

  • Migration is automatic during upgrade process

  • No manual intervention required

  • HyperShift hosted clusters unaffected (DPU host mode not supported)

    MGMT-21314: CNO enable advanced gateway detection in ovnkube in dpu host mode
    Adding required gateway value for ovnk in dpu-host mode
    This commit enables usage of ovnkube in dpu host mode: advanced gateway detection ovn-kubernetes/ovn-kubernetes#5327

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 openshift-eng/jira-lifecycle-plugin repository.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 18, 2025

@tsorya: This pull request references MGMT-21485 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 task to target the "4.20.0" version, but no target version was set.

In response to this:

MGMT-21485: Enable dpu-host mode that matches DPF requirements
This commit introduces OVN_NODE_MODE environment variable to enable per-node
feature enforcement, particularly for DPU host mode where certain features
must be disabled regardless of cluster-wide configuration.

  • Move feature toggles from ConfigMap (004-config.yaml) to startup script (008-script-lib.yaml)

  • ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional

  • Implement OVN_NODE_MODE-based conditional feature enablement in startup script

  • Add 'dpu-host' mode that automatically disables incompatible features:

  • Egress IP and related features (egress firewall, egress QoS, egress service)

  • Multicast support

  • Multi-external gateway support

  • Multi-network policies and admin network policies

  • Network segmentation features

  • Set gateway_interface='derive-from-mgmt-port' for DPU host nodes

  • Add ovnkube_node_mode='--ovnkube-node-mode dpu-host' flag

From bindata/network/ovn-kubernetes/*/004-config.yaml:

  • enable-egress-ip=true
  • enable-egress-firewall=true
  • enable-egress-qos=true
  • enable-egress-service=true
  • enable-multicast=true
  • enable-multi-external-gateway=true
  • enable-multi-network=true (conditionally)
  • enable-admin-network-policy=true (conditionally)
  • enable-network-segmentation=true (conditionally)

Note: HyperShift hosted cluster ConfigMap (managed/004-config.yaml) retains
egress feature flags as DPU host mode is not supported in hosted cluster
configurations.

  • Add conditional blocks in 008-script-lib.yaml based on OVN_NODE_MODE

  • Full mode (default): All features enabled as configured

  • DPU host mode: Incompatible features force-disabled

  • Maintain backward compatibility for existing deployments

  • Rename egress_ip_enable_flag to egress_features_enable_flag for clarity

  • Add comprehensive TestOVNKubernetesScriptLibCombined test covering:

  • DPU host mode feature gating and disabling

  • Full mode with multi-network features enabled/disabled

  • Non-mode-gated features (route advertisements, DNS resolver, etc.)

  • Gateway interface variable usage validation

  • Multi-external gateway and egress features flag behavior across modes

  • Remove redundant individual test functions after consolidation

  • Update existing config rendering tests for new ConfigMap content

  • Update test assertions to use correct flag names (egress_features_enable_flag)

  • Create docs/ovn_node_mode.md with detailed technical explanation

  • Update docs/operands.md with OVN-Kubernetes node modes section

  • Update docs/architecture.md with per-node configuration explanation

  • Update README.md with DPU host mode support information

  • Add implementation details, feature mapping tables, and migration notes

  • Document multi-external gateway as disabled feature in DPU host mode

  • Update all references to use correct flag names

ConfigMap-based feature control cannot be overridden per-node, making it
impossible to disable features on specific node types (like DPU hosts) while
keeping them enabled cluster-wide. Moving the logic to startup scripts allows
the same cluster configuration to work across heterogeneous node types.

This change ensures that DPU host nodes automatically have incompatible
features disabled, preventing runtime failures and enabling mixed-mode
cluster deployments.

  • Existing clusters continue to work without changes

  • Default behavior (full mode) remains unchanged

  • Migration is automatic during upgrade process

  • No manual intervention required

  • HyperShift hosted clusters unaffected (DPU host mode not supported)

    MGMT-21314: CNO enable advanced gateway detection in ovnkube in dpu host mode
    Adding required gateway value for ovnk in dpu-host mode
    This commit enables usage of ovnkube in dpu host mode: advanced gateway detection ovn-kubernetes/ovn-kubernetes#5327

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 openshift-eng/jira-lifecycle-plugin repository.

@tsorya
Copy link
Contributor Author

tsorya commented Aug 19, 2025

/retest-required

@ricky-rav
Copy link
Contributor

@tsorya could you have a look at the failures in pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp and pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp-local-gw? I'm focusing on these two because these jobs have been reporting a problem with CNO in particular:

operator conditions network
{Operator degraded (RolloutHung): Deployment "/openshift-ovn-kubernetes/ovnkube-control-plane" rollout is not making progress - pod ovnkube-control-plane-5df7cbb79c-gb2jf is in CrashLoopBackOff State Operator degraded (RolloutHung): Deployment "/openshift-ovn-kubernetes/ovnkube-control-plane" rollout is not making progress - pod ovnkube-control-plane-5df7cbb79c-gb2jf is in CrashLoopBackOff State}

A quick look at what's going on with openshift-ovn-kubernetes/ovnkube-control-plane should tell you whether we missed anything in the input parameters.

@tsorya
Copy link
Contributor Author

tsorya commented Aug 19, 2025

@tsorya could you have a look at the failures in pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp and pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp-local-gw? I'm focusing on these two because these jobs have been reporting a problem with CNO in particular:

operator conditions network
{Operator degraded (RolloutHung): Deployment "/openshift-ovn-kubernetes/ovnkube-control-plane" rollout is not making progress - pod ovnkube-control-plane-5df7cbb79c-gb2jf is in CrashLoopBackOff State Operator degraded (RolloutHung): Deployment "/openshift-ovn-kubernetes/ovnkube-control-plane" rollout is not making progress - pod ovnkube-control-plane-5df7cbb79c-gb2jf is in CrashLoopBackOff State}

A quick look at what's going on with openshift-ovn-kubernetes/ovnkube-control-plane should tell you whether we missed anything in the input parameters.

Looking

@tsorya tsorya force-pushed the igal/cno-dpf-integration branch from bac1bb9 to 180e442 Compare August 19, 2025 13:46
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 19, 2025
tsorya added 2 commits August 19, 2025 16:13
…ost mode

Adding required gateway value for ovnk in dpu-host mode
This commit enables usage of ovn-kubernetes/ovn-kubernetes#5327
This commit introduces OVN_NODE_MODE environment variable to enable per-node
feature enforcement, particularly for DPU host mode where certain features
must be disabled regardless of cluster-wide configuration.

- Move feature toggles from ConfigMap (004-config.yaml) to startup scripts
- ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional
- Implement OVN_NODE_MODE-based conditional feature enablement in node startup script
- Update control-plane scripts to handle moved parameters

- Add 'dpu-host' mode that automatically disables incompatible features:
  - Egress IP and related features (egress firewall, egress QoS, egress service)
  - Multicast support
  - Multi-external gateway support
  - Multi-network policies and admin network policies
  - Network segmentation features
- Set gateway_interface='derive-from-mgmt-port' for DPU host nodes
- Add ovnkube_node_mode='--ovnkube-node-mode dpu-host' flag

From bindata/network/ovn-kubernetes/*/004-config.yaml:
- enable-egress-ip=true
- enable-egress-firewall=true
- enable-egress-qos=true
- enable-egress-service=true
- enable-multicast=true
- enable-multi-external-gateway=true

Note: HyperShift hosted cluster ConfigMap (managed/004-config.yaml) retains
egress feature flags as DPU host mode is not supported in hosted cluster
configurations.

- Add conditional blocks based on OVN_NODE_MODE
- Full mode (default): All features enabled as configured
- DPU host mode: Incompatible features force-disabled
- Rename egress_ip_enable_flag to egress_features_enable_flag for clarity

- Always-enabled features: Direct CLI flags (cleaner implementation)
  - --enable-egress-ip=true, --enable-egress-firewall=true, etc.
  - --enable-multicast, --enable-multi-external-gateway=true
- Conditional features: Script variables (matching original ConfigMap logic)
  - multi_network_enabled_flag, network_segmentation_enabled_flag
  - multi_network_policy_enabled_flag, admin_network_policy_enabled_flag
- Maintain backward compatibility for existing deployments

- Add comprehensive TestOVNKubernetesScriptLibCombined test covering:
  - DPU host mode feature gating and disabling
  - Full mode with multi-network features enabled/disabled
  - Non-mode-gated features (route advertisements, DNS resolver, etc.)
  - Gateway interface variable usage validation
  - Multi-external gateway and egress features flag behavior across modes
- Add TestOVNKubernetesControlPlaneFlags test covering:
  - Always-enabled features validation (direct CLI flags)
  - Conditional features validation (script variables)
  - Multi-network enablement logic (OVN_MULTI_NETWORK_ENABLE or OVN_NETWORK_SEGMENTATION_ENABLE)
  - Network segmentation logic validation
- Remove redundant individual test functions after consolidation
- Update existing config rendering tests for new ConfigMap content
- Update test assertions to use correct flag names (egress_features_enable_flag)

- Create docs/ovn_node_mode.md with detailed technical explanation
- Update docs/operands.md with OVN-Kubernetes node modes section
- Update docs/architecture.md with per-node configuration explanation
- Update README.md with DPU host mode support information
- Add implementation details, feature mapping tables, and migration notes
- Document multi-external gateway as disabled feature in DPU host mode
- Update all references to use correct flag names

ConfigMap-based feature control cannot be overridden per-node, making it
impossible to disable features on specific node types (like DPU hosts) while
keeping them enabled cluster-wide. Moving the logic to startup scripts allows
the same cluster configuration to work across heterogeneous node types.

This change ensures that DPU host nodes automatically have incompatible
features disabled, preventing runtime failures and enabling mixed-mode
cluster deployments.

- Existing clusters continue to work without changes
- Default behavior (full mode) remains unchanged
- Control-plane components maintain identical functionality
- Migration is automatic during upgrade process
- No manual intervention required
- HyperShift hosted clusters unaffected (DPU host mode not supported)
@tsorya tsorya force-pushed the igal/cno-dpf-integration branch from 180e442 to c17dba5 Compare August 20, 2025 00:47
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 20, 2025
@ricky-rav
Copy link
Contributor

/retest

Copy link
Contributor

@ricky-rav ricky-rav left a comment

Choose a reason for hiding this comment

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

/LGTM
@kyrtapz PTAL

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

kyrtapz commented Aug 21, 2025

/retest

value: "{{.OVN_CONTROLLER_INACTIVITY_PROBE}}"
- name: OVN_KUBE_LOG_LEVEL
value: "4"
- name: OVN_NODE_MODE
Copy link
Contributor

Choose a reason for hiding this comment

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

Your commit message states that ConfigMap values cannot be reliably overridden per-node, but script logic can be conditional
How is that solved with setting the env vars for the whole daemonset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one provides OVN_NODE_MODE per daemonset.
In case of DPU-HOST mode CNO will create new daemonset with DPU HOST mode value.
So each different OVN_NODE_MODE will have it's own daemonset

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In general it allows to provide the mode we running with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if [[ "{{.OVN_MULTI_NETWORK_ENABLE}}" == "true" ]]; then
multi_network_enabled_flag="--enable-multi-network"
fi
if [[ "{{.OVN_NETWORK_SEGMENTATION_ENABLE}}" == "true" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a logic change. Was there a reason behind it?
@ricky-rav you are good with that right? I vaguely remember you were working on some bug around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In general i leaved as is OVN_NETWORK_SEGMENTATION_ENABLE logic

Copy link
Contributor

Choose a reason for hiding this comment

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

@kyrtapz the bug you probably have in mind in the end was for DPU GA (4.21), so the PR is still open and we can get to it once we're done with 4.20: #2739

@tsorya so the difference between the original code and your code is that when OVN_MULTI_NETWORK_ENABLE=true and OVN_NETWORK_SEGMENTATION_ENABLE=false, we don't set any corresponding flags in the old code, while you set the multi network flag.
Let's keep the original behaviour for the sake of not introducing any new behaviour that hasn't been tested :)

Sorry for not realizing before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, not really. Look on configmap part i remove
{{- if .OVN_MULTI_NETWORK_ENABLE }} enable-multi-network=true {{- end }}
So in case OVN_MULTI_NETWORK_ENABLE was set control-plane was getting this flag through CM in anycase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the running setup
multi_network_enabled_flag=
if [[ "true" == "true" ]]; then
multi_network_enabled_flag="--enable-multi-network"
fi
if [[ "true" == "true" ]]; then
if [[ "true" != "true" ]]; then
multi_network_enabled_flag="--enable-multi-network"
fi
network_segmentation_enabled_flag="--enable-network-segmentation"
fi

So in case --enable-network-segmentation we will always have enable-multi-network.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for confirming!

Copy link
Contributor

Choose a reason for hiding this comment

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

@kyrtapz so I've just discussed this with @tsorya. The way that configuration parameters are handled in ovnk is not as intuitive as I thought.

The key point is that non-default values that are present in the configmap take precedence over everything else (https://github.com/ovn-kubernetes/ovn-kubernetes/blame/7c047281d46a6e5f154a0f5d3feb8866af3619f4/go-controller/pkg/config/config.go#L750), also over input arguments that we pass here in the yaml.

So that's why Igal is removing a set of parameters from the configmap and adding them as input args in the yaml. These parameters are disabled by default in upstream ovn-k and simply enabling/disabling them through input arguments while keeping them enabled in the configmap wouldn't have worked.

In the particular case above, the logic that sets the multi network and network segmentation flags is being moved from the configmap to the yaml. The fact that the logic from the original yaml is more restrictive than the one from the original configmap didn't really matter in the end, because it was the non-default values in the configmap (multi network enabled, udn network segmentation enabled) that were taking precedence over everything else.

@kyrtapz
Copy link
Contributor

kyrtapz commented Aug 21, 2025

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

Copy link
Contributor

openshift-ci bot commented Aug 21, 2025

@kyrtapz: Overrode contexts on behalf of kyrtapz: ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

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.

@kyrtapz
Copy link
Contributor

kyrtapz commented Aug 21, 2025

/approve

Copy link
Contributor

openshift-ci bot commented Aug 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyrtapz, ricky-rav, tsorya

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 Aug 21, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD f41e188 and 2 for PR HEAD c17dba5 in total

@kyrtapz
Copy link
Contributor

kyrtapz commented Aug 21, 2025

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

Copy link
Contributor

openshift-ci bot commented Aug 21, 2025

@kyrtapz: Overrode contexts on behalf of kyrtapz: ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

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.

@tsorya
Copy link
Contributor Author

tsorya commented Aug 21, 2025

/retest-required

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c765f72 and 1 for PR HEAD c17dba5 in total

@jluhrsen
Copy link
Contributor

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c765f72 and 2 for PR HEAD c17dba5 in total

@tsorya
Copy link
Contributor Author

tsorya commented Aug 21, 2025

/retest-required

@tsorya
Copy link
Contributor Author

tsorya commented Aug 22, 2025

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

Copy link
Contributor

openshift-ci bot commented Aug 22, 2025

@tsorya: tsorya unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight openshift-staff-engineers openshift-sustaining-engineers.

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

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.

@kyrtapz
Copy link
Contributor

kyrtapz commented Aug 22, 2025

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

Copy link
Contributor

openshift-ci bot commented Aug 22, 2025

@kyrtapz: Overrode contexts on behalf of kyrtapz: ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw

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.

@tsorya
Copy link
Contributor Author

tsorya commented Aug 22, 2025

/retest-required

1 similar comment
@tsorya
Copy link
Contributor Author

tsorya commented Aug 22, 2025

/retest-required

Copy link
Contributor

openshift-ci bot commented Aug 22, 2025

@tsorya: 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-aws-hypershift-ovn-kubevirt c17dba5 link false /test e2e-aws-hypershift-ovn-kubevirt
ci/prow/e2e-aws-ovn-serial c17dba5 link false /test e2e-aws-ovn-serial
ci/prow/security c17dba5 link false /test security
ci/prow/4.20-upgrade-from-stable-4.19-e2e-gcp-ovn-upgrade c17dba5 link false /test 4.20-upgrade-from-stable-4.19-e2e-gcp-ovn-upgrade
ci/prow/4.20-upgrade-from-stable-4.19-e2e-azure-ovn-upgrade c17dba5 link false /test 4.20-upgrade-from-stable-4.19-e2e-azure-ovn-upgrade

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 13a1527 into openshift:master Aug 22, 2025
35 of 40 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: cluster-network-operator
This PR has been included in build cluster-network-operator-container-v4.21.0-202508230015.p0.g13a1527.assembly.stream.el9.
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

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.

7 participants