mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: retrieve parent pool name of child image
when clones are created in different pool,we need to retrieve the parent pool to get the information of the parent image. Co-authored-by: Madhu Rajanna <madhupr007@gmail.com> Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
parent
e699318acc
commit
b63b0bf18d
@ -114,8 +114,10 @@ type rbdVolume struct {
|
|||||||
Topology map[string]string
|
Topology map[string]string
|
||||||
// DataPool is where the data for images in `Pool` are stored, this is used as the `--data-pool`
|
// DataPool is where the data for images in `Pool` are stored, this is used as the `--data-pool`
|
||||||
// argument when the pool is created, and is not used anywhere else
|
// argument when the pool is created, and is not used anywhere else
|
||||||
DataPool string
|
DataPool string
|
||||||
ParentName string
|
ParentName string
|
||||||
|
// Parent Pool is the pool that contains the parent image.
|
||||||
|
ParentPool string
|
||||||
imageFeatureSet librbd.FeatureSet
|
imageFeatureSet librbd.FeatureSet
|
||||||
AdminID string `json:"adminId"`
|
AdminID string `json:"adminId"`
|
||||||
UserID string `json:"userId"`
|
UserID string `json:"userId"`
|
||||||
@ -1189,6 +1191,7 @@ func (rv *rbdVolume) getImageInfo() error {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rv.ParentName = parentInfo.Image.ImageName
|
rv.ParentName = parentInfo.Image.ImageName
|
||||||
|
rv.ParentPool = parentInfo.Image.PoolName
|
||||||
}
|
}
|
||||||
// Get image creation time
|
// Get image creation time
|
||||||
tm, err := image.GetCreateTimestamp()
|
tm, err := image.GetCreateTimestamp()
|
||||||
|
Loading…
Reference in New Issue
Block a user