rbd: Update pool name in image chain

While traversing image chain, the parent
image can be present in a different pool
that the one child is in. So, updating
pool name in the next itteration to
that of the Parent.

Co-authored-by: Madhu Rajanna <madhupr007@gmail.com>
Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug 2021-03-18 17:02:10 +05:30 committed by mergify[bot]
parent 1f6a9cabfd
commit d992803e9e

View File

@ -566,6 +566,7 @@ func (rv *rbdVolume) getCloneDepth(ctx context.Context) (uint, error) {
depth++
}
vol.RbdImageName = vol.ParentName
vol.Pool = vol.ParentPool
}
}
@ -741,6 +742,7 @@ func (rv *rbdVolume) checkImageChainHasFeature(ctx context.Context, feature uint
return true, nil
}
vol.RbdImageName = vol.ParentName
vol.Pool = vol.ParentPool
}
}