Skip to content

Commit

Permalink
add labels to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Nov 27, 2024
1 parent d303278 commit 0cf76a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/nnf_clientmount_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ func getServerForClientMountOrNnfNodeStorage(ctx context.Context, c client.Clien
ownerNS, ownerNSExists := labels[dwsv1alpha2.OwnerNamespaceLabel]
_, idxExists := labels[nnfv1alpha4.DirectiveIndexLabel]

log.FromContext(ctx).Info("BLAKE labels - after", "labels", labels)
// log.FromContext(ctx).Info("BLAKE labels - after", "labels", labels)

// We should expect the owner to be NnfStorage and have the expected labels
if !ownerExists || !ownerNameExists || !ownerNSExists || !idxExists || ownerKind != storageKind {
return nil, dwsv1alpha2.NewResourceError("expected owner to be of kind NnfStorage and have the expected labels").WithMajor()
return nil, dwsv1alpha2.NewResourceError(fmt.Sprintf("expected owner to be of kind NnfStorage and have the expected labels: %v", labels)).WithMajor()
}

// Retrieve the NnfStorage resource
Expand Down

0 comments on commit 0cf76a2

Please sign in to comment.