rbd: format log message correctly

When a `dataPool` is passed while creating a volume, there is a
`%!s(MISSING)` piece added to a debug log message. When concatinating
strings, the `%s` formatter is not needed.

Updates: #5103
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2025-01-30 10:13:36 +01:00 committed by mergify[bot]
parent 72cfaaf3fc
commit c905dd863c

View File

@ -1586,7 +1586,7 @@ func (rv *rbdVolume) constructImageOptions(ctx context.Context) (*librbd.ImageOp
logMsg := fmt.Sprintf("setting image options on %s", rv) logMsg := fmt.Sprintf("setting image options on %s", rv)
if rv.DataPool != "" { if rv.DataPool != "" {
logMsg += ", data pool %s" + rv.DataPool logMsg += ", data pool " + rv.DataPool
err = options.SetString(librbd.RbdImageOptionDataPool, rv.DataPool) err = options.SetString(librbd.RbdImageOptionDataPool, rv.DataPool)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to set data pool: %w", err) return nil, fmt.Errorf("failed to set data pool: %w", err)