Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -ex
IRONIC_IMAGE=$(image_for ironic)
IRONIC_INSPECTOR_IMAGE=$(image_for ironic-inspector)
IPA_DOWNLOADER_IMAGE=$(image_for ironic-ipa-downloader)
COREOS_DOWNLOADER_IMAGE=$(image_for ironic-rhcos-downloader)
COREOS_DOWNLOADER_IMAGE=$(image_for ironic-machine-os-downloader || image_for ironic-rhcos-downloader)

# This image is templated in via the installer pkg/asset/ignition/bootstrap/bootstrap.go
RHCOS_BOOT_IMAGE_URL="{{.BootImage}}"
Expand Down
6 changes: 3 additions & 3 deletions pkg/asset/machines/baremetal/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
}

func provider(clusterName string, platform *baremetal.Platform, osImage string, userDataSecret string) (*baremetalprovider.BareMetalMachineProviderSpec, error) {
// The rhcos-downloader container launched by the baremetal-operator downloads the image,
// The machine-os-downloader container launched by the baremetal-operator downloads the image,
// compresses it to speed up deployments and makes it available on platform.ClusterProvisioningIP, via http
// osImage looks like:
// https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.2/42.80.20190725.1/rhcos-42.80.20190725.1-openstack.qcow2?sha256sum=123
// But the cached URL looks like:
// http://172.22.0.3:6180/images/rhcos-42.80.20190725.1-openstack.qcow2/rhcos-42.80.20190725.1-compressed.qcow2
// See https://github.com/openshift/ironic-rhcos-downloader for more details
// The image is now formatted with a query string containing the sha256sum, we strip that here
// and it will be consumed for validation in ironic-rhcos-downloader
// and it will be consumed for validation in ironic-machine-os-downloader
imageURL, err := url.Parse(osImage)
if err != nil {
return nil, errors.Wrap(err, "invalid osImage URL format")
}
imageURL.RawQuery = ""
imageURL.Fragment = ""
// We strip any .gz suffix because ironic-rhcos-downloader unzips the image
// We strip any .gz suffix because ironic-machine-os-downloader unzips the image
// ref https://github.com/openshift/ironic-rhcos-downloader/pull/12
imageFilename := path.Base(strings.TrimSuffix(imageURL.String(), ".gz"))
compressedImageFilename := strings.Replace(imageFilename, "openstack", "compressed", 1)
Expand Down
4 changes: 2 additions & 2 deletions pkg/tfvars/baremetal/baremetal.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TFVars(libvirtURI, bootstrapProvisioningIP, bootstrapOSImage, externalBridg
}

// Instance Info
// The rhcos-downloader container downloads the image, compresses it to speed up deployments
// The machine-os-downloader container downloads the image, compresses it to speed up deployments
// and then makes it available on bootstrapProvisioningIP via http
// The image is now formatted with a query string containing the sha256sum, we strip that here
// and it will be consumed for validation in https://github.com/openshift/ironic-rhcos-downloader
Expand All @@ -99,7 +99,7 @@ func TFVars(libvirtURI, bootstrapProvisioningIP, bootstrapOSImage, externalBridg
}
imageURL.RawQuery = ""
imageURL.Fragment = ""
// We strip any .gz suffix because ironic-rhcos-downloader unzips the image
// We strip any .gz suffix because ironic-machine-os-downloader unzips the image
// ref https://github.com/openshift/ironic-rhcos-downloader/pull/12
imageFilename := path.Base(strings.TrimSuffix(imageURL.String(), ".gz"))
compressedImageFilename := strings.Replace(imageFilename, "openstack", "compressed", 1)
Expand Down