Skip to content

Commit

Permalink
fix contans
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Sch <sebassch@gmail.com>
  • Loading branch information
SchSeba committed Sep 29, 2022
1 parent 90f23a8 commit b280fb8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion controllers/sriovoperatorconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (r *SriovOperatorConfigReconciler) Reconcile(ctx context.Context, req ctrl.
}

// For Openshift we need to create the systemd files using a machine config
if constants.ClusterType == constants.ClusterTypeOpenshift && defaultConfig.Spec.ConfigurationMode == sriovnetworkv1.SystemdConfigurationMode {
if utils.ClusterType == utils.ClusterTypeOpenshift && defaultConfig.Spec.ConfigurationMode == sriovnetworkv1.SystemdConfigurationMode {
if err = r.syncSystemdService(defaultConfig); err != nil {
return reconcile.Result{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func New(
useSystemdService: useSystemdService,
client: client,
kubeClient: kubeClient,
openshiftContext: openshiftContext,
openshiftContext: openshiftContext,
exitCh: exitCh,
stopCh: stopCh,
syncCh: syncCh,
Expand Down
1 change: 1 addition & 0 deletions pkg/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var _ = Describe("Config Daemon", func() {
syncCh,
refreshCh,
utils.Baremetal,
false,
)

sut.enabledPlugins = map[string]plugin.VendorPlugin{generic.PluginName: &fake.FakePlugin{}}
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/generic/generic_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var _ = Describe("Generic plugin", func() {
var genericPlugin plugin.VendorPlugin
var err error
BeforeEach(func() {
genericPlugin, err = generic.NewGenericPlugin()
genericPlugin, err = generic.NewGenericPlugin(false)
Expect(err).ToNot(HaveOccurred())
})

Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ func DiscoverSriovDevices(withUnsupported bool) ([]sriovnetworkv1.InterfaceExt,
// SyncNodeState Attempt to update the node state to match the desired state
//
func SyncNodeState(newState *sriovnetworkv1.SriovNetworkNodeState, pfsToConfig map[string]bool) error {
return ConfigSriovInterfaces(newState.Spec.Interfaces, newState.Status.Interfaces, vfsToConfig)
return ConfigSriovInterfaces(newState.Spec.Interfaces, newState.Status.Interfaces, pfsToConfig)
}

func ConfigSriovInterfaces(interfaces []sriovnetworkv1.Interface, ifaceStatuses []sriovnetworkv1.InterfaceExt, vfsToConfig map[string]bool) error {
func ConfigSriovInterfaces(interfaces []sriovnetworkv1.Interface, ifaceStatuses []sriovnetworkv1.InterfaceExt, pfsToConfig map[string]bool) error {
if IsKernelLockdownMode(true) && hasMellanoxInterfacesInSpec(ifaceStatuses, interfaces) {
glog.Warningf("cannot use mellanox devices when in kernel lockdown mode")
return fmt.Errorf("cannot use mellanox devices when in kernel lockdown mode")
Expand Down

0 comments on commit b280fb8

Please sign in to comment.