-
Notifications
You must be signed in to change notification settings - Fork 96
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
Conversation
Signed-off-by: Pawan <pawan@mayadata.io>
err = removeVolumeFilesystem(vol) | ||
if err != nil { | ||
klog.Infof("lvm: volume %s filesystem cleanup failed", volume) | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
closing this PR as we already clean the filesystem while creating the volume (#88). |
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.