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

OCPBUGS-42523: allow single MCP match per node group by default #1055

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shajmakh
Copy link
Member

Because of historical accident we have a 1:N mapping between NodeGroup and MCPs (MachineConfigPools is a slice!). One of the key design assumptions in NROP is the 1:1 mapping between NodeGroups and MCPs.

Since we want to conserve the backward compatibility we still need to support multiple MCP matches per tree; however, since by design the intention was to have a single matching MCP per node group, make this the default behavior. To re-enable the old behavior permitting multiple pools matches, use the following annotation: experimental.multiple-pools-per-tree: enabled

Experiment the effects of the new default for the next 2 releases. If there are no complaints, we shall remove the multiple MCP match logic.

Copy link
Contributor

openshift-ci bot commented Oct 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shajmakh

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 Oct 22, 2024
@shajmakh
Copy link
Member Author

/hold

@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 Oct 22, 2024
Because of historical accident we have a 1:N mapping between NodeGroup and MCPs (MachineConfigPool*s* is a slice!).
One of the key design assumptions in NROP is the 1:1 mapping between NodeGroups and MCPs.

Since we want to conserve the backward compatibility we still need to
support multiple MCP matches per tree; however, since by design the
intention was to have a single matching MCP per node group, make
this the default behavior. To re-enable the old behavior permitting
multiple pools matches, use the following annotation:
`experimental.multiple-pools-per-tree: enabled`

Experiment the effects of the new default for the next 2
releases. If there are no complaints, we shall remove the multiple MCP match logic.

Signed-off-by: Shereen Haj <[email protected]>
Add tests to cover scenarios with the new annotations:
`config.node.openshift-kni.io/selinux-policy`
`experimental.multiple-pools-per-tree`

Signed-off-by: Shereen Haj <[email protected]>
@shajmakh
Copy link
Member Author

/unhold
tests are ready

@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 Oct 22, 2024
@shajmakh shajmakh changed the title api: allow single MCP match per node group by default OCPBUGS-42523: allow single MCP match per node group by default Oct 22, 2024
@openshift-ci-robot
Copy link

@shajmakh: This pull request references Jira Issue OCPBUGS-42523, which is invalid:

  • expected the bug to target the "4.18.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.

In response to this:

Because of historical accident we have a 1:N mapping between NodeGroup and MCPs (MachineConfigPools is a slice!). One of the key design assumptions in NROP is the 1:1 mapping between NodeGroups and MCPs.

Since we want to conserve the backward compatibility we still need to support multiple MCP matches per tree; however, since by design the intention was to have a single matching MCP per node group, make this the default behavior. To re-enable the old behavior permitting multiple pools matches, use the following annotation: experimental.multiple-pools-per-tree: enabled

Experiment the effects of the new default for the next 2 releases. If there are no complaints, we shall remove the multiple MCP match logic.

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.

@shajmakh
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

@shajmakh: This pull request references Jira Issue OCPBUGS-42523, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @mrniranjan

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

Copy link
Member

@ffromani ffromani left a comment

Choose a reason for hiding this comment

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

the idea is fine, but I'd do this in the controller. Warnings in the logs will almost certainly go unnoticed.
Let's degrade the status if we have multiple MCP per NodeGroup, UNLESS the new magic annotation (which should not be documented as part as the public API but kept as magic hidden annotation) is set.

note controllers may import packages in internal.

@@ -26,6 +26,7 @@ import (
mcov1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"

nropv1 "github.com/openshift-kni/numaresources-operator/api/numaresourcesoperator/v1"
"github.com/openshift-kni/numaresources-operator/internal/api/annotations"
Copy link
Member

Choose a reason for hiding this comment

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

we can't import internal packages in public packages. We will need to review the code arrangement.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants