Bug 2115770 - openshift-install agent wait-for subcommands fails when nmstateconfig is not provided in agent-config.yaml
Summary: openshift-install agent wait-for subcommands fails when nmstateconfig is not ...
Keywords:
Status: RELEASE_PENDING
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.12.0
Assignee: Lisa Ranjbar
QA Contact: Manoj Hans
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-05 10:03 UTC by Richard Su
Modified: 2022-11-09 13:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
install-config.yaml (835 bytes, text/plain)
2022-08-05 10:03 UTC, Richard Su
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 6236 0 None open Bug 2115770: Check for RendezvousIP in Agent config if NMStateConfig is not provided 2022-08-17 15:10:38 UTC

Description Richard Su 2022-08-05 10:03:51 UTC
Created attachment 1903843 [details]
install-config.yaml

What happened?

openshift-install agent wait-for install-complete (and bootstrap-complete) stack traces when nmstateconfig is not specified in agent-config.yaml.

agent-config.yaml used:

metadata:
  name: ostest
  namespace: cluster0
spec:
  rendezvousIP: 192.168.122.2

Steps to reproduce

1. Create agent.iso using install-config.yaml and agent-config.yaml
2. Deploy cluster using agent.iso
3. Execute wait-for command to wait for cluster install to complete

Expected:

wait-for command executes successfully

Actual:

wait-for command stack traces

./openshift-install agent wait-for install-complete
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/agent/manifests.GetNodeZeroIP({0x1d18bc80, 0x0, 0xc00006e340?})
	/home/celebdor/code/github.com/openshift/installer/pkg/asset/agent/manifests/nmstateconfig.go:229 +0x20c
github.com/openshift/installer/pkg/agent.NewNodeZeroRestClient({0x19f7beb0?, 0xc00007a080}, {0x485a01d, 0x1})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/rest.go:42 +0xdf
github.com/openshift/installer/pkg/agent.NewCluster({0x19f7beb0?, 0xc00007a080}, {0x485a01d, 0x1})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/cluster.go:64 +0x8f
github.com/openshift/installer/pkg/agent.WaitForBootstrapComplete({0x485a01d?, 0x40d7e7?})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/waitfor.go:17 +0x74
github.com/openshift/installer/pkg/agent.WaitForInstallComplete({0x485a01d?, 0x5?})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/waitfor.go:61 +0x56
github.com/openshift/installer/cmd/openshift-install/agent.newWaitForInstallCompleteCmd.func1(0xc0010fa000?, {0x1d18bc80?, 0x0?, 0x0?})
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/agent/waitfor.go:73 +0x126
github.com/spf13/cobra.(*Command).execute(0xc0010fa000, {0x1d18bc80, 0x0, 0x0})
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc0010a7b80)
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:902
main.installerMain()
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/main.go:61 +0x2b0
main.main()
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/main.go:38 +0xff


./openshift-install agent wait-for bootstrap-complete
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/agent/manifests.GetNodeZeroIP({0x1d18bc80, 0x0, 0xc0010946c0?})
	/home/celebdor/code/github.com/openshift/installer/pkg/asset/agent/manifests/nmstateconfig.go:229 +0x20c
github.com/openshift/installer/pkg/agent.NewNodeZeroRestClient({0x19f7beb0?, 0xc0001ba000}, {0x485a01d, 0x1})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/rest.go:42 +0xdf
github.com/openshift/installer/pkg/agent.NewCluster({0x19f7beb0?, 0xc0001ba000}, {0x485a01d, 0x1})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/cluster.go:64 +0x8f
github.com/openshift/installer/pkg/agent.WaitForBootstrapComplete({0x485a01d?, 0x5?})
	/home/celebdor/code/github.com/openshift/installer/pkg/agent/waitfor.go:17 +0x74
github.com/openshift/installer/cmd/openshift-install/agent.newWaitForBootstrapCompleteCmd.func1(0xc00109af00?, {0x1d18bc80?, 0x0?, 0x0?})
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/agent/waitfor.go:45 +0x134
github.com/spf13/cobra.(*Command).execute(0xc00109af00, {0x1d18bc80, 0x0, 0x0})
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc00104cf00)
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/home/celebdor/code/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:902
main.installerMain()
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/main.go:61 +0x2b0
main.main()
	/home/celebdor/code/github.com/openshift/installer/cmd/openshift-install/main.go:38 +0xff

Comment 1 Lisa Ranjbar 2022-08-05 15:49:46 UTC
If agent-config.yaml exists we should use the rendevousIP defined for the node0 IP. Otherwise we default to the first value in nmstateconfig.yaml

Comment 4 Manoj Hans 2022-09-29 08:11:47 UTC
Bug has been verified with 4.12.0-0.nightly-2022-09-26-111919 release. It's working fine when only provided rendezvousIP in the agent-config.


Note You need to log in before you can comment on or make changes to this bug.