Skip to content

Commit e82193f

Browse files
Merge pull request #30000 from neisw/revert-29964-revert-29959-revert-29946-trt-2163-incluster-disruption-setup
Revert "Revert "Revert "trt-2163: return error"""
2 parents 94d16fe + 8ea276c commit e82193f

File tree

1 file changed

+3
-19
lines changed
  • pkg/monitortests/kubeapiserver/disruptioninclusterapiserver

1 file changed

+3
-19
lines changed

pkg/monitortests/kubeapiserver/disruptioninclusterapiserver/monitortest.go

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
utilerrors "k8s.io/apimachinery/pkg/util/errors"
1616

1717
"github.com/openshift/origin/pkg/monitortestlibrary/disruptionlibrary"
18-
"github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
1918
"k8s.io/apimachinery/pkg/labels"
2019
"k8s.io/apimachinery/pkg/selection"
2120

@@ -305,6 +304,7 @@ func (i *InvariantInClusterDisruption) PrepareCollection(ctx context.Context, ad
305304
func (i *InvariantInClusterDisruption) StartCollection(ctx context.Context, adminRESTConfig *rest.Config, _ monitorapi.RecorderWriter) error {
306305
var err error
307306
log := logrus.WithField("monitorTest", "apiserver-incluster-availability").WithField("namespace", i.namespaceName).WithField("func", "StartCollection")
307+
log.Infof("payload image pull spec is %v", i.payloadImagePullSpec)
308308
if len(i.payloadImagePullSpec) == 0 {
309309
configClient, err := configclient.NewForConfig(adminRESTConfig)
310310
if err != nil {
@@ -319,33 +319,17 @@ func (i *InvariantInClusterDisruption) StartCollection(ctx context.Context, admi
319319
return err
320320
}
321321
i.payloadImagePullSpec = clusterVersion.Status.History[0].Image
322-
323-
// saw this on rosa
324-
if len(i.payloadImagePullSpec) == 0 {
325-
log.Infof("configClient clusterVersion missing image pull spec %v", clusterVersion)
326-
i.notSupportedReason = "clusterversion/version not found and no image pull spec specified."
327-
return nil
328-
}
329322
}
330323

331-
log.Infof("payload image pull spec is %v", i.payloadImagePullSpec)
332-
333324
// runImageExtract extracts src from specified image to dst
334325
cmd := exec.Command("oc", "adm", "release", "info", i.payloadImagePullSpec, "--image-for=tests")
335326
out := &bytes.Buffer{}
336327
errOut := &bytes.Buffer{}
337328
cmd.Stdout = out
338329
cmd.Stderr = errOut
339330
if err := cmd.Run(); err != nil {
340-
// specifically ipv6 disconnected isn't expected to work
341-
// could we use OTE method for extracting image references to fix the issue with disconnected? https://github.com/openshift/origin/blob/58ddec89c791ea056a9b0fb3558f369128e55e64/pkg/test/extensions/util.go#L226
342-
jobType, err := platformidentification.GetJobType(context.TODO(), adminRESTConfig)
343-
if err == nil && jobType.Platform == "metal" {
344-
i.notSupportedReason = fmt.Sprintf("unable to determine openshift-tests image for metal platform: %v: %v", err, errOut.String())
345-
return nil
346-
}
347-
348-
return fmt.Errorf("unable to determine openshift-tests image: %v: %v", err, errOut.String())
331+
i.notSupportedReason = fmt.Sprintf("unable to determine openshift-tests image: %v: %v", err, errOut.String())
332+
return nil
349333
}
350334
i.openshiftTestsImagePullSpec = strings.TrimSpace(out.String())
351335
log.Infof("openshift-tests image pull spec is %v", i.openshiftTestsImagePullSpec)

0 commit comments

Comments
 (0)