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:
Hemant Kumar
2019-02-28 12:07:16 -05:00
parent f229aa0ad6
commit 89d1de9eb9
12 changed files with 89 additions and 52 deletions

View File

@@ -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)