ovirt_disk: Don't pass "initial_size" while adding the disk (#52559)

Currently we are passing "initial_size" while creating the disk for
block based storage domains. Since this is equal to the size of the
disk, all the thin provisioned disk which is created using this
module will be having the size equal to the virtual size of the disk.
The "initial_size" is only required while uploading the image. The
patch take care of the same.
This commit is contained in:
Nijin Ashok 2019-02-19 18:52:04 +05:30 committed by ansibot
parent 922af44d7d
commit e7d784e5cc

View file

@ -504,7 +504,7 @@ class DisksModule(BaseModule):
],
) if logical_unit else None,
)
if hasattr(disk, 'initial_size'):
if hasattr(disk, 'initial_size') and self._module.params['upload_image_path']:
disk.initial_size = convert_to_bytes(
self._module.params.get('size')
)