Bug 1430518 - Unable to hot add new thin provisioned disk to VM
Summary: Unable to hot add new thin provisioned disk to VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: GA
: 5.8.0
Assignee: Lucy Fu
QA Contact: Alex Newman
URL:
Whiteboard:
: 1510761 (view as bug list)
Depends On:
Blocks: 1432961
TreeView+ depends on / blocked
 
Reported: 2017-03-08 20:12 UTC by myoder
Modified: 2020-12-14 08:19 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1432961 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:40:51 UTC
Category: Bug
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description myoder 2017-03-08 20:12:16 UTC
Description of problem:

We have added a button to hot add a hard disk to a VM.  The action works correctly and the hard disk is added with the specified size.  The problem is that it is only added as thick provisioned and we would like it to be thin.

The provider we are using is VMware.  We have a method in the automate domain that will hot add a disk to VMware VM.  We do not know how to specify how to add thin provision disk as it always defaults as thick.

# Get vm object
vm = $evm.root['vm']
##raise "Missing $evm.root['vm'] object" unless vm

##$evm.log(:info, "evm attributes:#{$evm.root.attributes.inspect}")
$evm.log("info", "dialog $evm.root['dialog_disk_size1' ")

size = $evm.root['dialog_disk_size1'].to_i

# Get the size for the new disk from the root object
##size = $evm.root['size'].to_i
$evm.log("info", "Detected size:<#{size}>")

# Add disk to a VM
if size.zero?
  $evm.log("error", "Size:<#{size}> invalid")
else
  $evm.log("info", "Creating a new #{size}GB disk on Storage:<#{vm.storage_name}>")
##  vm.add_disk("[#{vm.storage_name}]", size * 1024, :sync => true)
##  vm.add_disk("[#{vm.storage_name}]", size * 1024, {:sync => true, :thin_provisioned => true})
  vm.add_disk("[#{vm.storage_name}]", size * 1024, :thin_provisioned => true)
end

Version-Release number of selected component (if applicable):
5.7

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
I have found these 2 documents concerning thin provisioning:
https://github.com/ManageIQ/manageiq/issues/12488
https://github.com/ManageIQ/manageiq/pull/1758/files

Comment 2 Greg McCullough 2017-03-14 16:32:03 UTC
Lucy, this change should be the same as what was added for RHV here: miq_ae_service_manageiq-providers-redhat-infra_manager-vm.rb

But needs to be applied to the VMware caller:
miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb

Comment 4 CFME Bot 2017-03-15 20:11:21 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9d8d3bef15a358b0fed5d3c22d7545632fdb2ada

commit 9d8d3bef15a358b0fed5d3c22d7545632fdb2ada
Author:     Lucy Fu <lufu>
AuthorDate: Wed Mar 15 15:39:14 2017 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Mar 15 15:39:33 2017 -0400

    Allow passing options when adding a disk.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1430518

 .../miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb      | 2 +-
 .../miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 6 Josh Carter 2017-11-15 19:23:31 UTC
*** Bug 1510761 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.