Skip to content

Commit 3cf6fb2

Browse files
.
1 parent d74cfe7 commit 3cf6fb2

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

pkg/operator/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ func (optr *Operator) allMachineConfigPoolStatus() (map[string]string, error) {
502502

503503
// isMachineConfigPoolConfigurationValid returns nil, or error when the configuration of a `pool` is created by the controller at version `version`,
504504
// when the osImageURL does not match what's in the configmap or when the rendered-config-xxx does not match the OCP release version.
505-
func isMachineConfigPoolConfigurationValid(fgHandler ctrlcommon.FeatureGatesHandler, pool *mcfgv1.MachineConfigPool, version, releaseVersion, osURL string, machineConfigGetter func(string) (*mcfgv1.MachineConfig, error)) error {
505+
func isMachineConfigPoolConfigurationValid(pool *mcfgv1.MachineConfigPool, version, releaseVersion, osURL string, machineConfigGetter func(string) (*mcfgv1.MachineConfig, error)) error {
506506
// both .status.configuration.name and .status.configuration.source must be set.
507507
if pool.Spec.Configuration.Name == "" {
508508
return fmt.Errorf("configuration spec for pool %s is empty: %v", pool.GetName(), machineConfigPoolStatus(pool))

pkg/operator/status_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/stretchr/testify/assert"
2020
"k8s.io/apimachinery/pkg/util/uuid"
2121

22-
apicfgv1 "github.com/openshift/api/config/v1"
2322
configv1 "github.com/openshift/api/config/v1"
2423
mcfgv1 "github.com/openshift/api/machineconfiguration/v1"
2524
fakeconfigclientset "github.com/openshift/client-go/config/clientset/versioned/fake"
@@ -191,11 +190,7 @@ func TestIsMachineConfigPoolConfigurationValid(t *testing.T) {
191190
source = append(source, corev1.ObjectReference{Name: s})
192191
}
193192

194-
fgHandler := ctrlcommon.NewFeatureGatesHardcodedHandler(
195-
[]apicfgv1.FeatureGateName{},
196-
[]apicfgv1.FeatureGateName{},
197-
)
198-
err := isMachineConfigPoolConfigurationValid(fgHandler, &mcfgv1.MachineConfigPool{
193+
err := isMachineConfigPoolConfigurationValid(&mcfgv1.MachineConfigPool{
199194
ObjectMeta: metav1.ObjectMeta{
200195
Name: "dummy-pool",
201196
},

pkg/operator/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ func (optr *Operator) syncRequiredMachineConfigPools(config *renderConfig, co *c
17641764
}
17651765
releaseVersion, _ := optr.vStore.Get("operator")
17661766

1767-
if err := isMachineConfigPoolConfigurationValid(optr.fgHandler, pool, version.Hash, releaseVersion, opURL, optr.mcLister.Get); err != nil {
1767+
if err := isMachineConfigPoolConfigurationValid(pool, version.Hash, releaseVersion, opURL, optr.mcLister.Get); err != nil {
17681768
lastErr = fmt.Errorf("MachineConfigPool %s has not progressed to latest configuration: %w, retrying", pool.Name, err)
17691769
newCO := co.DeepCopy()
17701770
syncerr := optr.syncUpgradeableStatus(newCO)

0 commit comments

Comments
 (0)