diff --git a/internal/journal/voljournal.go b/internal/journal/voljournal.go index 742941746..37bb43678 100644 --- a/internal/journal/voljournal.go +++ b/internal/journal/voljournal.go @@ -285,7 +285,7 @@ func (conn *Connection) CheckReservation(ctx context.Context, } savedImagePoolID = int64(binary.BigEndian.Uint64(buf64)) - savedImagePool, err = util.GetPoolName(ctx, conn.monitors, conn.cr, savedImagePoolID) + savedImagePool, err = util.GetPoolName(conn.monitors, conn.cr, savedImagePoolID) if err != nil { if _, ok := err.(util.ErrPoolNotFound); ok { err = conn.UndoReservation(ctx, journalPool, "", "", reqName) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index 37291c4e4..557da4164 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -385,7 +385,7 @@ func genSnapFromSnapID(ctx context.Context, rbdSnap *rbdSnapshot, snapshotID str return err } - rbdSnap.Pool, err = util.GetPoolName(ctx, rbdSnap.Monitors, cr, vi.LocationID) + rbdSnap.Pool, err = util.GetPoolName(rbdSnap.Monitors, cr, vi.LocationID) if err != nil { return err } @@ -408,7 +408,7 @@ func genSnapFromSnapID(ctx context.Context, rbdSnap *rbdSnapshot, snapshotID str // convert the journal pool ID to name, for use in DeleteSnapshot cases if imageAttributes.JournalPoolID != util.InvalidPoolID { - rbdSnap.JournalPool, err = util.GetPoolName(ctx, rbdSnap.Monitors, cr, imageAttributes.JournalPoolID) + rbdSnap.JournalPool, err = util.GetPoolName(rbdSnap.Monitors, cr, imageAttributes.JournalPoolID) if err != nil { // TODO: If pool is not found we may leak the image (as DeleteSnapshot will return success) return err @@ -448,7 +448,7 @@ func genVolFromVolID(ctx context.Context, volumeID string, cr *util.Credentials, return nil, err } - rbdVol.Pool, err = util.GetPoolName(ctx, rbdVol.Monitors, cr, vi.LocationID) + rbdVol.Pool, err = util.GetPoolName(rbdVol.Monitors, cr, vi.LocationID) if err != nil { return nil, err } @@ -483,7 +483,7 @@ func genVolFromVolID(ctx context.Context, volumeID string, cr *util.Credentials, // convert the journal pool ID to name, for use in DeleteVolume cases if imageAttributes.JournalPoolID >= 0 { - rbdVol.JournalPool, err = util.GetPoolName(ctx, rbdVol.Monitors, cr, imageAttributes.JournalPoolID) + rbdVol.JournalPool, err = util.GetPoolName(rbdVol.Monitors, cr, imageAttributes.JournalPoolID) if err != nil { // TODO: If pool is not found we may leak the image (as DeleteVolume will return success) return nil, err diff --git a/internal/util/cephcmds.go b/internal/util/cephcmds.go index fef15814b..3dd33a77d 100644 --- a/internal/util/cephcmds.go +++ b/internal/util/cephcmds.go @@ -108,7 +108,7 @@ func GetPoolID(monitors string, cr *Credentials, poolName string) (int64, error) // GetPoolName fetches the pool whose pool ID is equal to the requested poolID // parameter -func GetPoolName(ctx context.Context, monitors string, cr *Credentials, poolID int64) (string, error) { +func GetPoolName(monitors string, cr *Credentials, poolID int64) (string, error) { conn, err := connPool.Get(monitors, cr.ID, cr.KeyFile) if err != nil { return "", err