installer: Azure OKD installation failed (Image issue)

Version

4.7.0-0.okd-2021-06-04-191031

Platform:

Azure

  • IPI installation

What happened?

FCOS image URL is wrong

time="2021-06-09T14:20:01Z" level=debug msg="      Generating Image..."
time="2021-06-09T14:20:01Z" level=fatal msg="failed to fetch Metadata: failed to fetch dependency of \"Metadata\": failed to fetch dependency of \"Bootstrap Ignition Config\": failed to fetch dependency of \"Master Machines\": failed to generate asset \"Image\": testing/x86_64: No azure build found"
time="2021-06-09T14:23:24Z" level=debug msg="OpenShift Installer 4.7.0-0.okd-2021-06-04-191031"

Anything else we need to know?

Error in the Arch structure or in the fcos-stream.json

vendor/github.com/coreos/stream-metadata-go/stream/stream.go:27

// Arch contains release details for a particular hardware architecture
type Arch struct {
	Artifacts map[string]PlatformArtifacts `json:"artifacts"`
	Images    Images                       `json:"images,omitempty"`
	// RHELCoreOSExtensions is data specific to Red Hat Enterprise Linux CoreOS
	RHELCoreOSExtensions *rhcos.Extensions `json:"rhel-coreos-extensions,omitempty"`
}

File fcos-stream.json does not contain section rhel-coreos-extensions, which is present in file rhcos-stream.json

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (6 by maintainers)

Most upvoted comments

Faced with the same issue. With the next installer: 4.8.0-0.okd-2021-10-10-030117 time="2021-10-11T12:44:13+02:00" level=debug msg=" Generating Image..." time="2021-10-11T12:44:13+02:00" level=fatal msg="failed to fetch Metadata: failed to fetch dependency of \"Metadata\": failed to fetch dependency of \"Bootstrap Ignition Config\": failed to fetch dependency of \"Master Machines\": failed to generate asset \"Image\": stable/x86_64: No azure build found"

The workaround is not working for 4.13:

ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.cluster_image_version, 
ERROR   on main.tf line 139, in resource "azurerm_shared_image_version" "cluster_image_version": 
ERROR  139:   name                = var.azure_image_release 
ERROR                                              
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.clustergen2_image_version, 
ERROR   on main.tf line 157, in resource "azurerm_shared_image_version" "clustergen2_image_version": 
ERROR  157:   name                = var.azure_image_release 
ERROR                                              
ERROR failed to fetch Cluster: failed to generate asset "Cluster": failure applying terraform for "vnet" stage: failed to create cluster: failed to apply Terraform: exit status 1 
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.cluster_image_version, 
ERROR   on main.tf line 139, in resource "azurerm_shared_image_version" "cluster_image_version": 
ERROR  139:   name                = var.azure_image_release 
ERROR                                              
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.clustergen2_image_version, 
ERROR   on main.tf line 157, in resource "azurerm_shared_image_version" "clustergen2_image_version": 
ERROR  157:   name                = var.azure_image_release 
ERROR                                              
ERROR          

Try changing the “release” in fcos.json to the same name in rhcos.json - for example “413.92.202307260246-0”. Terraform likes this format.

I also encountered the above-mentioned issue, and eventually managed to provision a 4.14 OKD. The problem lies in the fact that when Terraform tries to create an Image Gallery in Azure, it cannot accept a version number with so many characters, and it specifically requires two dots to be included. When I received the error from the installer, I edited the terraform.platform.auto.tfvars.json file in the install folder, specifically the azure_image_release variable. It was prefilled with the current FCOS image version. I changed this to 1.0.0 and reinitiated the installation (without deleting the install folder). Terraform was then able to continue the installation process, resulting in the successful deployment of OKD 4.14.

Hi, where can I find the terraform.platform.auto.tfvars.json file? Or is it generated from the installer?

Hi!

Yes, the installer generates it before it fails. After the failure you can edit it, and start the installer again.

The workaround is not working for 4.13:

ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.cluster_image_version, 
ERROR   on main.tf line 139, in resource "azurerm_shared_image_version" "cluster_image_version": 
ERROR  139:   name                = var.azure_image_release 
ERROR                                              
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.clustergen2_image_version, 
ERROR   on main.tf line 157, in resource "azurerm_shared_image_version" "clustergen2_image_version": 
ERROR  157:   name                = var.azure_image_release 
ERROR                                              
ERROR failed to fetch Cluster: failed to generate asset "Cluster": failure applying terraform for "vnet" stage: failed to create cluster: failed to apply Terraform: exit status 1 
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.cluster_image_version, 
ERROR   on main.tf line 139, in resource "azurerm_shared_image_version" "cluster_image_version": 
ERROR  139:   name                = var.azure_image_release 
ERROR                                              
ERROR                                              
ERROR Error: Expected name to be in the format `1.2.3`, `latest`, or `recent` but got "37.202211". 
ERROR                                              
ERROR   with azurerm_shared_image_version.clustergen2_image_version, 
ERROR   on main.tf line 157, in resource "azurerm_shared_image_version" "clustergen2_image_version": 
ERROR  157:   name                = var.azure_image_release 
ERROR                                              
ERROR          

Try changing the “release” in fcos.json to the same name in rhcos.json - for example “413.92.202307260246-0”. Terraform likes this format.

I also encountered the above-mentioned issue, and eventually managed to provision a 4.14 OKD. The problem lies in the fact that when Terraform tries to create an Image Gallery in Azure, it cannot accept a version number with so many characters, and it specifically requires two dots to be included.

When I received the error from the installer, I edited the terraform.platform.auto.tfvars.json file in the install folder, specifically the azure_image_release variable. It was prefilled with the current FCOS image version. I changed this to 1.0.0 and reinitiated the installation (without deleting the install folder). Terraform was then able to continue the installation process, resulting in the successful deployment of OKD 4.14.