Bug 1962957

Summary: [master] Assisted service reports a malformed iso when we fail to download the base iso
Product: OpenShift Container Platform Reporter: Nick Carboni <ncarboni>
Component: assisted-installerAssignee: Nick Carboni <ncarboni>
assisted-installer sub component: assisted-service QA Contact: bjacot
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, asegurap, pablo.iranzo
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Core KNI-EDGE-4.8
Fixed In Version: OCP-Metal-v1.0.22.1 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1969712 (view as bug list) Environment:
Last Closed: 2021-10-18 17:31:44 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:
Bug Depends On:    
Bug Blocks: 1958966, 1969712    

Description Nick Carboni 2021-05-20 20:49:46 UTC
Description of problem:
If we fail to download a base rhcos iso, we report the error when we try to extract the boot files rather than directly after the call.

Steps to Reproduce:
1. Deploy assisted service with the rhcos iso pointing to a faulty http server
2. Observe the logs

Actual results:
msg="Got leader, stop waiting" func="github.com/openshift/assisted-service/pkg/leader.(*Elector).waitForLeader" file="/go/src/github.com/openshift/origin/pkg/leader/leaderelector.go:94" configMap=assisted-service-baseiso-helper pkg=baseISOUploadLeader
time="2021-05-19T20:13:47Z" level=warning msg="ISO template version metadata not found, uploading latest" func=github.com/openshift/assisted-service/pkg/s3wrapper.HaveLatestMinimalTemplate file="/go/src/github.com/openshift/origin/pkg/s3wrapper/util.go:173" error="object minimal_templates_version.json was not found"
time="2021-05-19T20:13:47Z" level=info msg="Starting to upload initrd.img from Base ISO rhcos-48.84.202105182219-0.iso" func=github.com/openshift/assisted-service/pkg/s3wrapper.ExtractBootFilesFromISOAndUpload file="/go/src/github.com/openshift/origin/pkg/s3wrapper/util.go:65" go-id=892 request_id=
time="2021-05-19T20:13:47Z" level=fatal msg="Failed to extract and upload file initrd.img from ISO" func=github.com/openshift/assisted-service/pkg/s3wrapper.ExtractBootFilesFromISOAndUpload file="/go/src/github.com/openshift/origin/pkg/s3wrapper/util.go:68" error="Failed to read file /images/pxeboot/initrd.img from ISO: Unknown filesystem on partition 0" go-id=892 request_id=

Expected results:
A better error message

Comment 2 Nick Carboni 2021-06-08 20:14:16 UTC
Tried this out with the operator and it turns out the filesystem client goes through a different path that also has the original bug.
Missed that in the first pass so pushing this back to ASSIGNED.

Comment 3 bjacot 2021-06-14 19:09:01 UTC
Able to verify in the assisted-service latest that i am able to recieve this log message.

$ oc logs assisted-service-688595498f-skjj7 -c assisted-service | grep fetching
time="2021-06-14T19:05:30Z" level=fatal msg="Failed to upload boot files" func=main.main.func1 file="/go/src/github.com/openshift/origin/cmd/main.go:176" error="Failed uploading boot files for OCP version 4.7: Failed fetching from URL http://registry.ocp-edge-cluster-bjacot2-0.qe.lab.redhat.com:8080/images/pub/openshift-v4/dependencies/rhcos/pre-release/badlink/4.8.0-fc.8/rhcos-4.8.0-fc.8-x86_64-live.x86_64.iso: Received 404 Not Found"

Comment 7 errata-xmlrpc 2021-10-18 17:31:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759