Skip to content

Commit

Permalink
rbd: format log message correctly
Browse files Browse the repository at this point in the history
When a `dataPool` is passed while creating a volume, there is a
`%!s(MISSING)` piece added to a debug log message. By using
`fmt.Sprintf()` instead of concatinating the string, this should be gone
now.

Updates: ceph#5103
Signed-off-by: Niels de Vos <[email protected]>
  • Loading branch information
nixpanic committed Jan 30, 2025
1 parent 72cfaaf commit d477f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/rbd_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ func (rv *rbdVolume) constructImageOptions(ctx context.Context) (*librbd.ImageOp

logMsg := fmt.Sprintf("setting image options on %s", rv)
if rv.DataPool != "" {
logMsg += ", data pool %s" + rv.DataPool
logMsg += fmt.Sprintf(", data pool %s", rv.DataPool)
err = options.SetString(librbd.RbdImageOptionDataPool, rv.DataPool)
if err != nil {
return nil, fmt.Errorf("failed to set data pool: %w", err)
Expand Down

0 comments on commit d477f60

Please sign in to comment.