Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2004986

Summary: assisted-image-service is failing to append the cpu architecture version in the ISO image
Product: OpenShift Container Platform Reporter: Chad Crum <ccrum>
Component: assisted-installerAssignee: Flavio Percoco <fpercoco>
assisted-installer sub component: Deployment Operator QA Contact: Chad Crum <ccrum>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: unspecified CC: bzvonar, ccrum, fpercoco, mfilanov, ncarboni, sasha
Version: 4.9Keywords: Triaged
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
This needs documentation updated for ACM 2.4 that cpuArchitecture is a required field in AgentServiceConfig osImages: entries. In ACM 2.5 [1], if not included it will change to default (So not failure if excluded)
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-28 08:45:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chad Crum 2021-09-16 14:23:00 UTC
Description of problem:
Appears that the assisted-image-service is not appending the cpuArchitecture to the image it creates, causing 

Version-Release number of selected component (if applicable):
Version-Release number of selected component (if applicable):
OCP 4.9
Assisted Operator Index git_revision: 34c986435c1e85776b2bcb0544eab2e6e77a2c2b (Quay upstream)

This is a disconnected ipv6 bm env. Not sure if occurring on ipv4 connected.

How reproducible:
100%

Steps to Reproduce:
1. Deploy latest assisted service + operator 

Actual results:
It is failing to create the ISO and I see the following errors.
It looks to me tha the image-agent is failing to append the version in the ISO image it copies and therefore it cannot be found to prepare the ISO.:
       rhcos-4.8.2-x86_64-live.x86_64.iso to /data/rhcos-full-iso-4.8-.iso
       "error="open /data/rhcos-48.84.202107202156-0-x86_64.iso: no such file or directory"

Expected results:
No error

Additional info:

Comment 2 Chad Crum 2021-09-16 14:25:12 UTC
Although not related to https://bugzilla.redhat.com/show_bug.cgi?id=2004966, the work around is the same:

Add `cpuArchitecture: x86_64` to ACS osImages: entries

Comment 3 Nick Carboni 2021-09-16 20:17:56 UTC
What is the expected behavior? That we shouldn't have to provide cpuArchitecture in os images and that it should work?

And just to be clear, this is an error in the assisted-image-service logs when the agentserviceconfig osImages array items don't contain a cpuArchitecture field, correct?

Comment 4 Flavio Percoco 2021-09-17 06:26:08 UTC
(In reply to Nick Carboni from comment #3)
> What is the expected behavior? That we shouldn't have to provide
> cpuArchitecture in os images and that it should work?
> 
> And just to be clear, this is an error in the assisted-image-service logs
> when the agentserviceconfig osImages array items don't contain a
> cpuArchitecture field, correct?

I think the expectation is that these values are mandatory[0].

Based on the enhancement proposal, the default architecture should be `x86_64` when not specified [1]

Looks like there's no default value in the swagger definition for os-image[2] and release-image[3] ​

[0] https://github.com/openshift/assisted-service/blob/34c986435c1e85776b2bcb0544eab2e6e77a2c2b/internal/versions/versions.go#L351-L392
[1] https://github.com/openshift/assisted-service/blob/master/docs/enhancements/arm64-cpu-architecture.md#cluster-creation-and-iso-generation
[2] https://github.com/openshift/assisted-service/blob/m34c986435c1e85776b2bcb0544eab2e6e77a2c2b/swagger.yaml#L7945-L7947
[3] https://github.com/openshift/assisted-service/blob/34c986435c1e85776b2bcb0544eab2e6e77a2c2b/swagger.yaml#L7974-L797

Comment 5 Chad Crum 2021-09-17 14:07:00 UTC
(In reply to Nick Carboni from comment #3)
> What is the expected behavior? That we shouldn't have to provide
> cpuArchitecture in os images and that it should work?

I just wasn't aware of the cpuArchitecture parameter, although I knew it would get separated at some point. Also [1] https://github.com/openshift/assisted-service/blob/4752fd82a8a6313dc63b528e7ec7b1a2fc77c32a/docs/hive-integration/kube-api-select-ocp-versions.md#set-os-images-in-agentserviceconfig should be updated if it's required.

> 
> And just to be clear, this is an error in the assisted-image-service logs
> when the agentserviceconfig osImages array items don't contain a
> cpuArchitecture field, correct?

Yes exactly - the error shows up in the assisted-image-service pod when cpuArchitecture is not added.

Comment 6 Chad Crum 2021-10-06 16:14:14 UTC
CPU architecture is a required field now. It works with cpu_architecture": "x86_64 included.

Verified in latest acm.

Comment 7 Chad Crum 2021-10-20 12:22:57 UTC
This needs documentation updated for ACM 2.4 that cpuArchitecture is a required field in AgentServiceConfig osImages: entries.

In ACM 2.5 [1], if not included it will change to default (So not failure if excluded)


[1] https://bugzilla.redhat.com/show_bug.cgi?id=2004966

Comment 8 Michael Filanov 2021-10-20 12:27:45 UTC
I already talked with ACM team about the documentation and that they need to update this specific part of the documentation.