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

Bug 2094896

Summary: Run 'openshift-install agent create image' has segfault exception if cluster-manifests directory missing
Product: OpenShift Container Platform Reporter: Nora Niu <zniu>
Component: InstallerAssignee: Andrea Fasano <afasano>
Installer sub component: Agent based installation QA Contact: Nora Niu <zniu>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: asegurap, mhans
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:17:00 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 Nora Niu 2022-06-08 14:53:07 UTC
Description: When run 'openshift-install agent create image' to create iso, the yaml files in cluster-manifests directory are required. If the 'cluster-manifests' directory is missing, there should be a solution to cover the case, but it will throw a segfault exception now.

How reproducible:

always

1) Get the latest agent-installer 

git clone -b agent-installer https://github.com/openshift/installer.git
cd installer/
ls cluster-manifests/ (FAIL)

2) Build the agent-installer

hack/build.sh (PASS)


3) Create the agent.iso image:
bin/openshift-install agent create image (FAIL)


Actual Results:
1) [core@ocp-edge49 installer]$ ls cluster-manifests/
ls: cannot access 'cluster-manifestss/': No such file or directory

3) [core@ocp-edge49 installer]$ bin/openshift-install agent create image
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x138 pc=0x34baa64]

goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/agent/image.(*Ignition).Generate(0xc000513640, 0x5)
	/home/core/installer/pkg/asset/agent/image/ignition.go:93 +0x164
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc000c1a3c0, {0x19dc9af0, 0xc000513640}, {0x4c25a4f, 0x2})
	/home/core/installer/pkg/asset/store/store.go:227 +0x604
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc000c1a3c0, {0x7fe860598f78, 0x1d53f9f0}, {0x0, 0x0})
	/home/core/installer/pkg/asset/store/store.go:221 +0x759
github.com/openshift/installer/pkg/asset/store.(*storeImpl).Fetch(0x4c25a3c, {0x7fe860598f78, 0x1d53f9f0}, {0x1d51af40, 0x2, 0x2})
	/home/core/installer/pkg/asset/store/store.go:77 +0x48
main.runTargetCmd.func1({0x4c25a3c, 0x1})
	/home/core/installer/cmd/openshift-install/create.go:250 +0x116
main.runTargetCmd.func2(0x1d52b520, {0x1d596848, 0x0, 0x0})
	/home/core/installer/cmd/openshift-install/create.go:279 +0xe7
github.com/spf13/cobra.(*Command).execute(0x1d52b520, {0x1d596848, 0x0, 0x0})
	/home/core/installer/vendor/github.com/spf13/cobra/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xc00098a280)
	/home/core/installer/vendor/github.com/spf13/cobra/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/home/core/installer/vendor/github.com/spf13/cobra/command.go:902
main.installerMain()
	/home/core/installer/cmd/openshift-install/main.go:61 +0x2b0
main.main()
	/home/core/installer/cmd/openshift-install/main.go:38 +0xff

Expected Results: 

1) cluster-manifest should exist. 

3) Agent.iso file should generate without error.

Comment 1 Nora Niu 2022-06-15 02:48:06 UTC
Proper warning raise now:
[core@dhcp-8-30-236 installer]$ bin/openshift-install agent create image
FATAL failed to fetch Agent Installer ISO: failed to fetch dependency of "Agent Installer ISO": failed to fetch dependency of "Agent Installer Ignition": failed to fetch dependency of "Agent Manifests": failed to generate asset "Agent PullSecret": missing configuration or manifest file

Comment 3 errata-xmlrpc 2022-08-10 11:17:00 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 (Important: OpenShift Container Platform 4.11.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-2022:5069