mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd:store/Read volumeID in/from PV annotation
In the case of the Async DR, the volumeID will not be the same if the clusterID or the PoolID is different, With Earlier implementation, it is expected that the new volumeID mapping is stored in the rados omap pool. In the case of the ControllerExpand or the DeleteVolume Request, the only volumeID will be sent it's not possible to find the corresponding poolID in the new cluster. With This Change, it works as below The csi-rbdplugin-controller will watch for the PV objects, when there are any PV objects created it will check the omap already exists, If the omap doesn't exist it will generate the new volumeID and it checks for the volumeID mapping entry in the PV annotation, if the mapping does not exist, it will add the new entry to the PV annotation. The cephcsi will check for the PV annotations if the omap does not exist if the mapping exists in the PV annotation, it will use the new volumeID for further operations. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
9aea701bd9
commit
0f8813d89f
@ -75,12 +75,12 @@ To solve this problem, We will have a new controller(rbdplugin controller)
|
||||
running as part of provisioner pod which watches for the PV objects. When a PV
|
||||
is created it will extract the required information from the PV spec and it
|
||||
will regenerate the OMAP data and also it will generate a new VolumeHandle
|
||||
(`newclusterID-newpoolID-volumeuniqueID`) and it creates an OMAP object for
|
||||
mapping between old VolumeHandle and new VolumeHandle. Whenever Ceph-CSI gets a
|
||||
RPC request with older VolumeHandle, it will check if any new VolumeHandle
|
||||
exists for the old VolumeHandle. If yes, it uses the new VolumeHandle for
|
||||
internal operations (to get pool name, Ceph monitor details from the ClusterID
|
||||
etc).
|
||||
(`newclusterID-newpoolID-volumeuniqueID`) and it adds a PV annotation
|
||||
`csi.ceph.io/volume-handle` for mapping between old VolumeHandle and new
|
||||
VolumeHandle. Whenever Ceph-CSI gets a RPC request with older VolumeHandle, it
|
||||
will check if any new VolumeHandle exists for the old VolumeHandle. If yes, it
|
||||
uses the new VolumeHandle for internal operations (to get pool name, Ceph
|
||||
monitor details from the ClusterID etc).
|
||||
|
||||
Currently, We are making use of watchers in node stage request to make sure
|
||||
ReadWriteOnce (RWO) PVC is mounted on a single node at a given point in time.
|
||||
|
Reference in New Issue
Block a user