Skip to content

Commit

Permalink
impore logging for invalid driver name
Browse files Browse the repository at this point in the history
improve logging to log both actual
and exepect details which helps for
debugging.

fixes: ceph#53

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 committed Aug 6, 2024
1 parent 6d04e9e commit 502b559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/driver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (r *driverReconcile) LoadAndValidateDesiredState() error {
// we assume there is another driver CR with an identical name on some other namespace
if r.driver.Namespace != ownerObjKey.Namespace || r.driver.Name != ownerObjKey.Name {
err := fmt.Errorf("invalid driver name")
r.log.Error(err, "Desired name already in use by a different CSI Driver")
r.log.Error(err, "Desired name already in use by a CSI Driver in a different namespace", "owner", ownerObjKey, "desired", client.ObjectKeyFromObject(&r.driver))
return err
}
}
Expand Down

0 comments on commit 502b559

Please sign in to comment.