Skip to content

Commit

Permalink
Merge pull request #1063 from rabi/ipm_error
Browse files Browse the repository at this point in the history
Return error when IPSet not found
  • Loading branch information
openshift-merge-bot[bot] authored Sep 12, 2024
2 parents 5384a3d + 405d672 commit a113658
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/dataplane/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,16 @@ func GenerateNodeSetInventory(ctx context.Context, helper *helper.Helper,

err = resolveHostAnsibleVars(&node, &host)
if err != nil {
utils.LogErrorForObject(helper, err, "Could not resolve ansible host vars", instance)
utils.LogErrorForObject(helper, err, "could not resolve ansible host vars", instance)
return "", err
}

ipSet, ok := allIPSets[node.HostName]
if ok {
populateInventoryFromIPAM(&ipSet, host, dnsAddresses, node.HostName)
if !ok {
err := fmt.Errorf("no IPSet found for host: %s", node.HostName)
return "", err
}

populateInventoryFromIPAM(&ipSet, host, dnsAddresses, node.HostName)
}

invData, err := inventory.MarshalYAML()
Expand Down

0 comments on commit a113658

Please sign in to comment.