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
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
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.