Rename ExandFS to NodeExpand
Handle resize error in online resizing Use NodeExpandable plugin to mark volumes that require node expansion
This commit is contained in:
@@ -201,12 +201,15 @@ func (plugin *rbdPlugin) ExpandVolumeDevice(spec *volume.Spec, newSize resource.
|
||||
}
|
||||
}
|
||||
|
||||
func (plugin *rbdPlugin) ExpandFS(spec *volume.Spec, devicePath, deviceMountPath string, _, _ resource.Quantity) error {
|
||||
func (plugin *rbdPlugin) NodeExpand(spec *volume.Spec, devicePath, deviceMountPath string, _, _ resource.Quantity) (bool, error) {
|
||||
_, err := volutil.GenericResizeFS(plugin.host, plugin.GetPluginName(), devicePath, deviceMountPath)
|
||||
return err
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
var _ volume.FSResizableVolumePlugin = &rbdPlugin{}
|
||||
var _ volume.NodeExpandableVolumePlugin = &rbdPlugin{}
|
||||
|
||||
func (expander *rbdVolumeExpander) ResizeImage(oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error) {
|
||||
return expander.manager.ExpandImage(expander, oldSize, newSize)
|
||||
|
||||
Reference in New Issue
Block a user