Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(provision): cleannup the volume at the provisioning time #138

Closed
wants to merge 2 commits into from

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Aug 25, 2021

fixes : #135

Cleanup the volume while provisioing it. If disk already had some partitions before and volume landed at the same offset where the old volume was present with the filesystem, we should clean it at the creation time. We already do the same at the deletion time.

Signed-off-by: Pawan <pawan@mayadata.io>
@pawanpraka1 pawanpraka1 added this to the v0.9 milestone Aug 25, 2021
@pawanpraka1 pawanpraka1 mentioned this pull request Aug 25, 2021
pkg/lvm/lvm_util.go Outdated Show resolved Hide resolved
err = removeVolumeFilesystem(vol)
if err != nil {
klog.Infof("lvm: volume %s filesystem cleanup failed", volume)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we propagate the error if wipefs fails by returning err?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as create volume already succeded and cleaning the filesystem is not the hard error, so ignoring the error here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be it is better to propagate the error. added the code to handle that.

Signed-off-by: Pawan <pawan@mayadata.io>
@mittachaitu
Copy link

mittachaitu commented Aug 26, 2021

#135 Looks like a compatibility issue b/w LVM-CSI Node driver and host machine OS, Apart from issue we are already wiping the fs signatures during creation of the lvm volume, addressed via #88

@pawanpraka1
Copy link
Contributor Author

closing this PR as we already clean the filesystem while creating the volume (#88).

@pawanpraka1 pawanpraka1 deleted the cleanup branch August 26, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fails to format
3 participants