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

feat: MOFED subscription mounts #946

Merged
merged 1 commit into from
May 26, 2024
Merged

Conversation

rollandf
Copy link
Member

Add needed mounts for subscription in RHEL with non CRIO container runtime.

@rollandf rollandf added the on hold This enhancement is currently on hold pending additional clarification and evaluation label May 20, 2024
@coveralls
Copy link
Collaborator

coveralls commented May 20, 2024

Pull Request Test Coverage Report for Build 9208587816

Details

  • 45 of 53 (84.91%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 64.201%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/nodeinfo/node_info.go 12 16 75.0%
pkg/state/state_ofed.go 33 37 89.19%
Files with Coverage Reduction New Missed Lines %
controllers/nicclusterpolicy_controller.go 2 77.78%
Totals Coverage Status
Change from base Build 9204901829: 0.2%
Covered Lines: 3264
Relevant Lines: 5084

💛 - Coveralls

@rollandf
Copy link
Member Author

Related Red Hat Knowledgebase : https://access.redhat.com/solutions/5870841

@@ -127,6 +129,8 @@ func (p *provider) GetNodePools(filters ...Filter) []NodePool {
}
nodePool.Kernel = kernel

nodePool.ContainerRuntime = getContainerRuntime(node)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you assume that container runtime is the same for all nodes that are part of the pool ?

technically every attribute that is not part of the key in nodePoolMap may be different and you just save the last node that match.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I assume all nodes in the same pool have the same container runtime.

Copy link
Collaborator

@adrianchiris adrianchiris May 26, 2024

Choose a reason for hiding this comment

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

ack. technically i think we can have several runtimes. moreover it can be set dynamically with RuntimeClass[1] but i dont think we have a requirement to support it.

[1] https://kubernetes.io/docs/concepts/containers/runtime-class/

func (s *stateOFED) handleSubscriptionVolumes(
ctx context.Context, osname string, runtime string, mounts *additionalVolumeMounts) error {
reqLogger := log.FromContext(ctx)
if osname == "rhel" && runtime != nodeinfo.CRIO {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to ignore an empty runtime value ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can an empty runtime happen?

Copy link
Collaborator

Choose a reason for hiding this comment

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

field should be set. just wondering if we should add check for completness.

Add needed mounts for subscription in
RHEL with non CRIO container runtime.

Signed-off-by: Fred Rolland <frolland@nvidia.com>
@rollandf
Copy link
Member Author

/retest-image_scan

@rollandf
Copy link
Member Author

/retest-nic_operator_helm

@rollandf rollandf removed the on hold This enhancement is currently on hold pending additional clarification and evaluation label May 26, 2024
@rollandf
Copy link
Member Author

Tested manually on cluster with RHEL 8.8, containerd 1.7.16
MOFED pods compiles successfully

@adrianchiris adrianchiris merged commit 17d04f5 into Mellanox:master May 26, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants