rbd: remove unused credentials argument from StoreImageID()

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2020-10-14 21:49:03 +05:30 committed by mergify[bot]
parent 4cb7d2bbbd
commit 75c6cb6544
5 changed files with 7 additions and 7 deletions

View File

@ -665,7 +665,7 @@ func (conn *Connection) GetImageAttributes(ctx context.Context, pool, objectUUID
} }
// StoreImageID stores the image ID in omap. // StoreImageID stores the image ID in omap.
func (conn *Connection) StoreImageID(ctx context.Context, pool, reservedUUID, imageID string, cr *util.Credentials) error { func (conn *Connection) StoreImageID(ctx context.Context, pool, reservedUUID, imageID string) error {
err := setOMapKeys(ctx, conn, pool, conn.config.namespace, conn.config.cephUUIDDirectoryPrefix+reservedUUID, err := setOMapKeys(ctx, conn, pool, conn.config.namespace, conn.config.cephUUIDDirectoryPrefix+reservedUUID,
map[string]string{conn.config.csiImageIDKey: imageID}) map[string]string{conn.config.csiImageIDKey: imageID})
if err != nil { if err != nil {

View File

@ -214,7 +214,7 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol
return err return err
} }
err = j.StoreImageID(ctx, rv.JournalPool, rv.ReservedID, rv.ImageID, rv.conn.Creds) err = j.StoreImageID(ctx, rv.JournalPool, rv.ReservedID, rv.ImageID)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to store volume %s: %v", rv, err) util.ErrorLog(ctx, "failed to store volume %s: %v", rv, err)
return err return err

View File

@ -479,7 +479,7 @@ func (cs *ControllerServer) createBackingImage(ctx context.Context, cr *util.Cre
return status.Error(codes.Internal, err.Error()) return status.Error(codes.Internal, err.Error())
} }
err = j.StoreImageID(ctx, rbdVol.JournalPool, rbdVol.ReservedID, rbdVol.ImageID, cr) err = j.StoreImageID(ctx, rbdVol.JournalPool, rbdVol.ReservedID, rbdVol.ImageID)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to reserve volume %s: %v", rbdVol, err) util.ErrorLog(ctx, "failed to reserve volume %s: %v", rbdVol, err)
return status.Error(codes.Internal, err.Error()) return status.Error(codes.Internal, err.Error())
@ -932,7 +932,7 @@ func (cs *ControllerServer) doSnapshotClone(ctx context.Context, parentVol *rbdV
} }
defer j.Destroy() defer j.Destroy()
err = j.StoreImageID(ctx, rbdSnap.JournalPool, rbdSnap.ReservedID, cloneRbd.ImageID, cr) err = j.StoreImageID(ctx, rbdSnap.JournalPool, rbdSnap.ReservedID, cloneRbd.ImageID)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to reserve volume id: %v", err) util.ErrorLog(ctx, "failed to reserve volume id: %v", err)
return ready, cloneRbd, err return ready, cloneRbd, err

View File

@ -198,7 +198,7 @@ func checkSnapCloneExists(ctx context.Context, parentVol *rbdVolume, rbdSnap *rb
err = undoSnapshotCloning(ctx, vol, rbdSnap, vol, cr) err = undoSnapshotCloning(ctx, vol, rbdSnap, vol, cr)
return false, err return false, err
} }
sErr = j.StoreImageID(ctx, vol.JournalPool, vol.ReservedID, vol.ImageID, cr) sErr = j.StoreImageID(ctx, vol.JournalPool, vol.ReservedID, vol.ImageID)
if sErr != nil { if sErr != nil {
util.ErrorLog(ctx, "failed to store volume id %s: %v", vol, sErr) util.ErrorLog(ctx, "failed to store volume id %s: %v", vol, sErr)
err = undoSnapshotCloning(ctx, vol, rbdSnap, vol, cr) err = undoSnapshotCloning(ctx, vol, rbdSnap, vol, cr)
@ -296,7 +296,7 @@ func (rv *rbdVolume) Exists(ctx context.Context, parentVol *rbdVolume) (bool, er
util.ErrorLog(ctx, "failed to get image id %s: %v", rv, err) util.ErrorLog(ctx, "failed to get image id %s: %v", rv, err)
return false, err return false, err
} }
err = j.StoreImageID(ctx, rv.JournalPool, rv.ReservedID, rv.ImageID, rv.conn.Creds) err = j.StoreImageID(ctx, rv.JournalPool, rv.ReservedID, rv.ImageID)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to store volume id %s: %v", rv, err) util.ErrorLog(ctx, "failed to store volume id %s: %v", rv, err)
return false, err return false, err

View File

@ -732,7 +732,7 @@ func genVolFromVolID(ctx context.Context, volumeID string, cr *util.Credentials,
util.ErrorLog(ctx, "failed to get image id %s: %v", rbdVol, err) util.ErrorLog(ctx, "failed to get image id %s: %v", rbdVol, err)
return rbdVol, err return rbdVol, err
} }
err = j.StoreImageID(ctx, rbdVol.JournalPool, rbdVol.ReservedID, rbdVol.ImageID, cr) err = j.StoreImageID(ctx, rbdVol.JournalPool, rbdVol.ReservedID, rbdVol.ImageID)
if err != nil { if err != nil {
util.ErrorLog(ctx, "failed to store volume id %s: %v", rbdVol, err) util.ErrorLog(ctx, "failed to store volume id %s: %v", rbdVol, err)
return rbdVol, err return rbdVol, err