mirror of
https://git.mirrors.martin98.com/https://github.com/ceph/ceph-csi.git
synced 2025-04-18 11:49:57 +08:00
rbd: add check to getVolumeReplicationInfo
this commit adds a check to getVolumeReplicationInfo to include status not found error while getting the remote status. This helps the failover to be done even if remote site status is not found Signed-off-by: yati1998 <ypadia@redhat.com> (cherry picked from commit a5f6d89171168bcca50f36f7f709953f5265eb60)
This commit is contained in:
parent
a3424872fb
commit
82cfb0b368
@ -866,6 +866,10 @@ func (rs *ReplicationServer) GetVolumeReplicationInfo(ctx context.Context,
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
if errors.Is(err, librbd.ErrNotExist) {
|
||||
return nil, status.Errorf(codes.NotFound, "failed to get remote status: %v", err)
|
||||
}
|
||||
|
||||
return nil, status.Errorf(codes.Internal, "failed to get remote status: %v", err)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user