Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1510761

Summary: Unable to add dependent disk in vsphere 6.0
Product: Red Hat CloudForms Management Engine Reporter: Neha Chugh <nchugh>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED DUPLICATE QA Contact: Alex Newman <anewman>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.8.0CC: agrare, anewman, cpelland, dajohnso, gblomqui, gmccullo, jfrey, jhardy, jocarter, myoder, nchugh, obarenbo, sacpatil
Target Milestone: GA   
Target Release: 5.8.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-14 06:37:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Disk added in dependent mode
none
disk added at vmware end in dependent mode
none
Additional logging for vm.add_disk
none
screenshot from vmware end where dependent disk not added from cfme 5.7.1.3
none
logs from cfme 5.7.1.3 where dependent disk not added none

Description Neha Chugh 2017-11-08 07:37:24 UTC
Description of problem:
By using Dependent parameter in add_disk method doesn't work for Vspere 6.0 though it works for Vsphere 6.5
Version-Release number of selected component (if applicable):
cloudforms 4.2

How reproducible:
Always

Steps to Reproduce:
1. Prepare a custom method to add the disk in persistent mode by using below code 
2. vmhost.add_disk("[#{vmhost.storage.name}]", real_size, {:dependent => true})
3. The dependent parameter doesn't work but it creates independent persistent mode of disk.

Actual results:

The dependent parameter doesn't work but it creates independent persistent mode of disk.


Expected results:

it should create persistent disk.

Additional info:

Via "Reconfigure VM" option, it is able to add disk in dependent peristent mode manually but not through automate method.
Also, the same code works for Vsphere 6.5 but not for Vsphere 6.0. Customer cannot upgrade the vmware version so looking for the workaround.

In order to extract logs, 

 [yank] complete - access files in /cases/01968015
 [browse] the files here: http://collab-shell.usersys.redhat.com/01968015/
 [images] are available here: http://collab-shell.usersys.redhat.com/01968015/x-image

Comment 5 Neha Chugh 2017-11-09 02:36:54 UTC
Created attachment 1349678 [details]
Disk added in dependent mode

Comment 6 Neha Chugh 2017-11-09 02:39:23 UTC
Created attachment 1349679 [details]
disk added at vmware end in dependent mode

Comment 10 Adam Grare 2017-11-09 16:59:12 UTC
Created attachment 1350032 [details]
Additional logging for vm.add_disk

This adds additional logging to add_disk so that we can see the options passed in.

Directions:
1. scp 5713_add_disk_logging.tar.gz to /var/www/miq/vmdb
2. make a backup copy of app/models/vm_or_template/operations/configuration.rb and app/models/manageiq/providers/vmware/infra_manager.rb
3. tar xfz 5713_add_disk_logging.tar.gz
4. systemctl restart evmserverd

The log lines will look like this:

MIQ(ManageIQ::Providers::Vmware::InfraManager::Vm#add_disk) ManageIQ::Providers::Vmware::InfraManager::Vm#add_disk: disk_name: [[NFS Share] ag_test_2/ag_test_2-3.vmdk] disk_size_mb: [300] options: [{:persistent=>true, :dependent=>true, :thin=>true}]
MIQ(ManageIQ::Providers::Vmware::InfraManager#vm_add_disk) ManageIQ::Providers::Vmware::InfraManager#vm_add_disk: VM [24] [ag_test_2] options: {:user_event=>"Console Request Action [vm_add_disk], VM [ag_test_2]", :diskName=>"[NFS Share] ag_test_2/ag_test_2-3.vmdk", :diskSize=>300, :thinProvisioned=>nil, :dependent=>true, :persistent=>true, :bootable=>nil, :datastore=>nil, :interface=>nil}

This will tell us exactly what options the add_disk method is being invoked with

Comment 15 Neha Chugh 2017-11-13 02:05:49 UTC
Created attachment 1351374 [details]
screenshot from vmware end where dependent disk not added from cfme 5.7.1.3

Comment 16 Neha Chugh 2017-11-13 02:07:10 UTC
Created attachment 1351375 [details]
logs from cfme 5.7.1.3 where dependent disk not added

Comment 17 Greg McCullough 2017-11-13 16:59:46 UTC
Neha - The ability to pass the options through automate was added to the 5.7 release on March 16th in PR https://github.com/ManageIQ/manageiq/pull/14350#issuecomment-287061139

The test appliance you are using has a build of 5.7.1.3-20170221135006_818f133 which is almost 1 month before.

Looks like they will need to a later build that contains the PR changes referenced above.

Comment 18 Adam Grare 2017-11-13 17:16:13 UTC
Neha this looks now like a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1430518, if this resolves the issue for the customer please close

Comment 22 Josh Carter 2017-11-15 19:23:31 UTC

*** This bug has been marked as a duplicate of bug 1430518 ***