From 3b3e3765c4a00dbde800c5e89ce0940139fa1f75 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 8 Dec 2018 15:37:46 -0800 Subject: [PATCH] pkg: Pin to RHCOS 47.198 and quay.io/openshift-release-dev/ocp-release:4.0.0-4 That's the latest RHCOS release: $ curl -s https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/builds.json | jq '{latest: .builds[0], timestamp}' { "latest": "47.198", "timestamp": "2018-12-08T23:13:22Z" } And Clayton just pushed 4.0.0-alpha.0-2018-12-07-090414 to quay.io/openshift-release-dev/ocp-release:4.0.0-4. That's not the most recent release, but it's the most-recent stable release ;). Renaming OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE gets us CI testing of the pinned release despite openshift/release@60007df2 (Use RELEASE_IMAGE_LATEST for CVO payload, 2018-10-03, openshift/release#1793). --- pkg/asset/ignition/bootstrap/bootstrap.go | 4 ++-- pkg/rhcos/builds.go | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg/asset/ignition/bootstrap/bootstrap.go b/pkg/asset/ignition/bootstrap/bootstrap.go index 09dd63faf16..cc3eb50e00f 100644 --- a/pkg/asset/ignition/bootstrap/bootstrap.go +++ b/pkg/asset/ignition/bootstrap/bootstrap.go @@ -30,7 +30,7 @@ import ( const ( rootDir = "/opt/openshift" - defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0" + defaultReleaseImage = "quay.io/openshift-release-dev/ocp-release:4.0.0-4" bootstrapIgnFilename = "bootstrap.ign" ) @@ -141,7 +141,7 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, adminKub } releaseImage := defaultReleaseImage - if ri, ok := os.LookupEnv("OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE"); ok && ri != "" { + if ri, ok := os.LookupEnv("_OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE"); ok && ri != "" { logrus.Warn("Found override for ReleaseImage. Please be warned, this is not advised") releaseImage = ri } diff --git a/pkg/rhcos/builds.go b/pkg/rhcos/builds.go index a1a76158d9c..32dce96aeff 100644 --- a/pkg/rhcos/builds.go +++ b/pkg/rhcos/builds.go @@ -33,9 +33,15 @@ type metadata struct { } func fetchLatestMetadata(ctx context.Context, channel string) (metadata, error) { - build, err := fetchLatestBuild(ctx, channel) - if err != nil { - return metadata{}, errors.Wrap(err, "failed to fetch latest build") + var build string + var err error + if channel == DefaultChannel { + build = "47.198" + } else { + build, err = fetchLatestBuild(ctx, channel) + if err != nil { + return metadata{}, errors.Wrap(err, "failed to fetch latest build") + } } url := fmt.Sprintf("%s/%s/%s/meta.json", baseURL, channel, build)