Skip to content

Commit 9dc636f

Browse files
committed
Calculate RendezvousIP from NMState data
Even if the RendezvousIP is not specified directly, we can still calculate one from NMState data if it is provided. We already do this in the regular agent ignition, so do the same in the unconfigured ignition. There is no need to pass the host list because in the unconfigured ignition hosts will not have assigned roles, so there is no additional data there that can be used to improve the selection.
1 parent f8bb47e commit 9dc636f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/asset/agent/image/unconfigured_ignition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (a *UnconfiguredIgnition) Generate(_ context.Context, dependencies asset.Pa
169169
rendezvousHostTemplateFile := ignition.FileFromString(fmt.Sprintf("%s.template", rendezvousHostEnvPath), "root", 0644, rendezvousHostTemplateData)
170170
config.Storage.Files = append(config.Storage.Files, rendezvousHostTemplateFile)
171171

172-
rendezvousIP, err := RetrieveRendezvousIP(agentConfig.Config, nil, nil)
172+
rendezvousIP, err := RetrieveRendezvousIP(agentConfig.Config, nil, nmStateConfigs.Config)
173173
if err == nil {
174174
rendezvousHostData, err := getRendezvousHostEnvFromTemplate(rendezvousHostTemplateData, rendezvousIP)
175175
if err != nil {

0 commit comments

Comments
 (0)