@@ -18,18 +18,9 @@ import (
1818 "sync/atomic"
1919 "time"
2020
21- "github.com/thoas/go-funk"
22-
2321 "github.com/hashicorp/go-version"
2422 metal3v1alpha1 "github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1"
2523 configv1 "github.com/openshift/api/config/v1"
26- "github.com/pkg/errors"
27- "github.com/sirupsen/logrus"
28- certificatesv1 "k8s.io/api/certificates/v1"
29- v1 "k8s.io/api/core/v1"
30- apierrors "k8s.io/apimachinery/pkg/api/errors"
31- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
32-
3324 mapiv1beta1 "github.com/openshift/api/machine/v1beta1"
3425 "github.com/openshift/assisted-installer/src/common"
3526 "github.com/openshift/assisted-installer/src/config"
@@ -38,6 +29,13 @@ import (
3829 "github.com/openshift/assisted-installer/src/ops"
3930 "github.com/openshift/assisted-installer/src/utils"
4031 "github.com/openshift/assisted-service/models"
32+ "github.com/pkg/errors"
33+ "github.com/sirupsen/logrus"
34+ "github.com/thoas/go-funk"
35+ certificatesv1 "k8s.io/api/certificates/v1"
36+ v1 "k8s.io/api/core/v1"
37+ apierrors "k8s.io/apimachinery/pkg/api/errors"
38+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4139)
4240
4341const (
@@ -472,7 +470,7 @@ func (c *controller) PostInstallConfigs(ctx context.Context, wg *sync.WaitGroup)
472470 }
473471
474472 errMessage := ""
475- err , data := c .postInstallConfigs (ctx )
473+ data , err := c .postInstallConfigs (ctx )
476474 // Even if the context was cancelled, the error is sent to the assisted service.
477475 // The timeouts will be handled by the service
478476 if err != nil {
@@ -487,7 +485,7 @@ func (c *controller) PostInstallConfigs(ctx context.Context, wg *sync.WaitGroup)
487485 c .sendCompleteInstallation (ctx , success , errMessage , data )
488486}
489487
490- func (c * controller ) postInstallConfigs (ctx context.Context ) (error , map [string ]interface {}) {
488+ func (c * controller ) postInstallConfigs (ctx context.Context ) (map [string ]interface {}, error ) {
491489 var err error
492490 var data map [string ]interface {}
493491
@@ -499,12 +497,12 @@ func (c *controller) postInstallConfigs(ctx context.Context) (error, map[string]
499497 data = map [string ]interface {}{clusterOperatorReportKey : report }
500498 }
501499 if err != nil {
502- return errors .Wrapf (err , "Stopped waiting for cluster operators to be available" ), data
500+ return data , errors .Wrapf (err , "Stopped waiting for cluster operators to be available" )
503501 }
504502
505503 err = c .waitOnStage (ctx , models .FinalizingStageAddingRouterCa , failedOperatorRetry * time .Second , c .addRouterCAToClusterCA )
506504 if err != nil {
507- return errors .Wrapf (err , "Stopped waiting for router ca data" ), data
505+ return data , errors .Wrapf (err , "Stopped waiting for router ca data" )
508506 }
509507
510508 // Wait for OLM operators
0 commit comments