Skip to content

Commit

Permalink
Merge pull request #746 from ykulazhenkov/pr-remove-rdma-core-install
Browse files Browse the repository at this point in the history
Remove logic that installs rdma-core package
  • Loading branch information
SchSeba authored Aug 8, 2024
2 parents 97aa700 + f8cc336 commit 8b8f651
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 666 deletions.
4 changes: 2 additions & 2 deletions cmd/sriov-network-config-daemon/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ func phasePre(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helpe
return fmt.Errorf("failed to remove sriov result file: %v", err)
}

_, err := hostHelpers.TryEnableRdma()
_, err := hostHelpers.CheckRDMAEnabled()
if err != nil {
setupLog.Error(err, "warning, failed to enable RDMA")
setupLog.Error(err, "warning, failed to check RDMA state")
}
hostHelpers.TryEnableTun()
hostHelpers.TryEnableVhostNet()
Expand Down
6 changes: 3 additions & 3 deletions cmd/sriov-network-config-daemon/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var _ = Describe("Service", func() {
"/etc/sriov-operator/sriov-interface-result.yaml": []byte("something"),
},
})
hostHelpers.EXPECT().TryEnableRdma().Return(true, nil)
hostHelpers.EXPECT().CheckRDMAEnabled().Return(true, nil)
hostHelpers.EXPECT().TryEnableTun().Return()
hostHelpers.EXPECT().TryEnableVhostNet().Return()
hostHelpers.EXPECT().DiscoverSriovDevices(hostHelpers).Return([]sriovnetworkv1.InterfaceExt{{
Expand All @@ -183,7 +183,7 @@ var _ = Describe("Service", func() {
"/etc/sriov-operator/sriov-interface-result.yaml": []byte("something"),
},
})
hostHelpers.EXPECT().TryEnableRdma().Return(true, nil)
hostHelpers.EXPECT().CheckRDMAEnabled().Return(true, nil)
hostHelpers.EXPECT().TryEnableTun().Return()
hostHelpers.EXPECT().TryEnableVhostNet().Return()

Expand Down Expand Up @@ -211,7 +211,7 @@ var _ = Describe("Service", func() {
"/etc/sriov-operator/sriov-interface-result.yaml": []byte("something"),
},
})
hostHelpers.EXPECT().TryEnableRdma().Return(true, nil)
hostHelpers.EXPECT().CheckRDMAEnabled().Return(true, nil)
hostHelpers.EXPECT().TryEnableTun().Return()
hostHelpers.EXPECT().TryEnableVhostNet().Return()
hostHelpers.EXPECT().DiscoverSriovDevices(hostHelpers).Return([]sriovnetworkv1.InterfaceExt{{
Expand Down
1 change: 1 addition & 0 deletions doc/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
1. A supported SRIOV hardware on the cluster nodes. Supported models can be found [here](https://github.com/k8snetworkplumbingwg/sriov-network-operator/blob/master/doc/supported-hardware.md).
2. Kubernetes or Openshift cluster running on bare metal nodes.
3. Multus-cni is deployed as default CNI plugin, and there is a default CNI plugin (flannel, openshift-sdn etc.) available for Multus-cni.
4. On RedHat Enterprise Linux and Ubuntu operating systems, the `rdma-core` package must be installed to support RDMA resource provisioning. On RedHat CoreOS the package installation is not required.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (dn *Daemon) Run(stopCh <-chan struct{}, exitCh <-chan error) error {

if !vars.UsingSystemdMode {
log.Log.V(0).Info("Run(): daemon running in daemon mode")
dn.HostHelpers.TryEnableRdma()
dn.HostHelpers.CheckRDMAEnabled()
dn.HostHelpers.TryEnableTun()
dn.HostHelpers.TryEnableVhostNet()
err := systemd.CleanSriovFilesFromHost(vars.ClusterType == consts.ClusterTypeOpenshift)
Expand Down
2 changes: 1 addition & 1 deletion pkg/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var _ = Describe("Config Daemon", func() {
platformHelper.EXPECT().IsHypershift().Return(false).AnyTimes()

vendorHelper := mock_helper.NewMockHostHelpersInterface(mockCtrl)
vendorHelper.EXPECT().TryEnableRdma().Return(true, nil).AnyTimes()
vendorHelper.EXPECT().CheckRDMAEnabled().Return(true, nil).AnyTimes()
vendorHelper.EXPECT().TryEnableVhostNet().AnyTimes()
vendorHelper.EXPECT().TryEnableTun().AnyTimes()
vendorHelper.EXPECT().PrepareNMUdevRule([]string{"0x1014", "0x154c"}).Return(nil).AnyTimes()
Expand Down
177 changes: 15 additions & 162 deletions pkg/helper/mock/mock_helper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions pkg/host/internal/common.go

This file was deleted.

Loading

0 comments on commit 8b8f651

Please sign in to comment.