mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rbd: remove per volume rbd-nbd logfiles on detach
- Update the meta stash with logDir details - Use the same to remove logfile on unstage/unmap to be space efficient Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
d67e88ccd0
commit
ea3def0db2
@ -275,6 +275,9 @@ func (ns *NodeServer) NodeStageVolume(
|
||||
volOptions.UnmapOptions = req.GetVolumeContext()["unmapOptions"]
|
||||
volOptions.Mounter = req.GetVolumeContext()["mounter"]
|
||||
volOptions.LogDir = req.GetVolumeContext()["cephLogDir"]
|
||||
if volOptions.LogDir == "" {
|
||||
volOptions.LogDir = defaultLogDir
|
||||
}
|
||||
|
||||
err = volOptions.Connect(cr)
|
||||
if err != nil {
|
||||
@ -827,6 +830,7 @@ func (ns *NodeServer) NodeUnstageVolume(
|
||||
encrypted: imgInfo.Encrypted,
|
||||
volumeID: req.GetVolumeId(),
|
||||
unmapOptions: imgInfo.UnmapOptions,
|
||||
logDir: imgInfo.LogDir,
|
||||
}
|
||||
if err = detachRBDImageOrDeviceSpec(ctx, dArgs); err != nil {
|
||||
util.ErrorLog(
|
||||
|
Reference in New Issue
Block a user