mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-26 15:00:19 +00:00
ci: address arguments have the wrong order (staticcheck)
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
parent
7d0b8580ea
commit
31d1159858
@ -298,7 +298,7 @@ func (rv *rbdVolume) NewSnapshotByID(
|
|||||||
log.DebugLog(ctx, "going to clone snapshot image %q from image %q with snapshot ID %d", snap, rv, id)
|
log.DebugLog(ctx, "going to clone snapshot image %q from image %q with snapshot ID %d", snap, rv, id)
|
||||||
|
|
||||||
err = librbd.CloneImageByID(rv.ioctx, rv.RbdImageName, id, rv.ioctx, snap.RbdImageName, options)
|
err = librbd.CloneImageByID(rv.ioctx, rv.RbdImageName, id, rv.ioctx, snap.RbdImageName, options)
|
||||||
if err != nil && !errors.Is(librbd.ErrExist, err) {
|
if err != nil && !errors.Is(err, librbd.ErrExist) {
|
||||||
log.ErrorLog(ctx, "failed to clone snapshot %q with id %d: %v", snap, id, err)
|
log.ErrorLog(ctx, "failed to clone snapshot %q with id %d: %v", snap, id, err)
|
||||||
|
|
||||||
return nil, fmt.Errorf("failed to clone %q with snapshot id %d as new image %q: %w", rv.RbdImageName, id, snap, err)
|
return nil, fmt.Errorf("failed to clone %q with snapshot id %d as new image %q: %w", rv.RbdImageName, id, snap, err)
|
||||||
@ -342,7 +342,7 @@ func (rv *rbdVolume) NewSnapshotByID(
|
|||||||
defer image.Close()
|
defer image.Close()
|
||||||
|
|
||||||
snapImage, err = image.CreateSnapshot(snap.RbdSnapName)
|
snapImage, err = image.CreateSnapshot(snap.RbdSnapName)
|
||||||
if err != nil && !errors.Is(librbd.ErrExist, err) {
|
if err != nil && !errors.Is(err, librbd.ErrExist) {
|
||||||
return nil, fmt.Errorf("failed to create snapshot on image %q: %w", snap, err)
|
return nil, fmt.Errorf("failed to create snapshot on image %q: %w", snap, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user