sriov-network-operator icon indicating copy to clipboard operation
sriov-network-operator copied to clipboard

Remove logic that installs rdma-core package

Open ykulazhenkov opened this issue 1 year ago • 4 comments
trafficstars

Remove logic that installs rdma-core package to align the code for all platforms. Before this commit the state is following:

  • Ubuntu - the logic is completely broken and newer executed. Reason: buggy IsUbuntuCheck() We use grep with --quiet flag and IsUbuntuCheck() returns true only if stdout is not empty. Because of the --quiet flag, stdout will be always empty. Broken for a long time, nobody reported an issue about this.
  • RHCOS - validation only logic from the begining
  • RHEL - package installation (partially broken in RHEL 8 and RHEL 9) Reason: This file Is available in RHEL 7, but not in RHEL 8 or 9

The operator currently uses quite dangerous logic to trigger loading of RDMA modules https://github.com/k8snetworkplumbingwg/sriov-network-operator/blob/ee40683567d8ac5d03365e3216592e74d47538b7/pkg/host/internal/kernel/kernel.go#L525

I think we don't want the operator to install the package and completely unload the driver, this can break multiple use-cases (NVIDIA driver in container, Externally managed PF and potentially more)

The commit changes logic for all OS to do only a validation of RDMA modules and print warning if they are not found.

@adrianchiris @SchSeba

ykulazhenkov avatar Jul 24 '24 12:07 ykulazhenkov

Thanks for your PR, To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor. Best regards.

github-actions[bot] avatar Jul 24 '24 12:07 github-actions[bot]

Pull Request Test Coverage Report for Build 10194187385

Details

  • 13 of 38 (34.21%) changed or added relevant lines in 5 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.3%) to 45.22%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/sriov-network-config-daemon/service.go 1 2 50.0%
pkg/host/mock/mock_host.go 0 11 0.0%
pkg/host/internal/kernel/kernel.go 0 13 0.0%
<!-- Total: 13 38
Files with Coverage Reduction New Missed Lines %
controllers/drain_controller.go 3 67.42%
<!-- Total: 3
Totals Coverage Status
Change from base Build 10178846427: 1.3%
Covered Lines: 6528
Relevant Lines: 14436

💛 - Coveralls

coveralls avatar Jul 24 '24 12:07 coveralls

we should not unload mlx5_core driver from kernel, thats dangerous as primary NIC may become unavailable. generally in NVIDIA we instruct customers to pre install rdma-core if inbox drivers are used, hence the install step is not needed from NVIDIA POV. (plus it seems it never worked :) )

+1 on just logging if something is wrong like we do in coreos. perhaps with a meaningfull msg like "rdma modules are not loaded, please install rdma-core package available from you package manager" in case its not coreos

adrianchiris avatar Jul 24 '24 12:07 adrianchiris

I am soooo happy to see this code going away from the operator!

never like it :)

Can you please just add in the read me information that the user must install the rdma package on the system? also you can add the in RedHat CoreOS that is not needed

@SchSeba I updated the quickstart.md to mention that rdma-core packgage must be installed.

ykulazhenkov avatar Aug 01 '24 07:08 ykulazhenkov