Bug 1520540

Summary: Multiple cloud volumes can't be added in Catalog
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: UI - OPSAssignee: Sam Lucidi <slucidi>
Status: CLOSED CURRENTRELEASE QA Contact: Vatsal Parekh <vparekh>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, hkataria, ikaur, jhardy, maufart, mpovolny, obarenbo, smallamp, vparekh
Target Milestone: GAKeywords: Reopened, TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.14 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1506466 Environment:
Last Closed: 2018-03-06 15:06:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On: 1506466    
Bug Blocks:    
Attachments:
Description Flags
recording none

Comment 2 CFME Bot 2017-12-04 16:43:54 UTC
New commit detected on ManageIQ/manageiq-ui-classic/gaprindashvili:
https://github.com/ManageIQ/manageiq-ui-classic/commit/29f756dea3e512d389cfa661f6b5c54fd45bc82b

commit 29f756dea3e512d389cfa661f6b5c54fd45bc82b
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Mon Dec 4 08:42:15 2017 +0100
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Dec 4 11:35:17 2017 -0500

    Merge pull request #2890 from mansam/fix-provisioning-workflow-volume-form
    
    Fix loop conditional on provisioning workflow volume form
    (cherry picked from commit 45d70e83af28dc3e9bed36cd45b8de7b6503bfed)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1520540

 app/views/miq_request/_prov_dialog_volume_fieldset.html.haml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 3 Vatsal Parekh 2017-12-12 09:38:23 UTC
The fix is half correct
Please check the video attached to see exact behavior.

If you go to create volumes, create multiple volumes, and order them, it works.
But if you create multiple volumes, and go back to a different tab, and come back, only the first volume is visible. 
with this only 1 volume seen, created the request to provision, the output from `rails c` : MiqRequest.find(1)
 #<MiqProvisionRequest id: 1, description: "Provision from [cirros] to [vparekh_test]", approval_state: "approved", type: "MiqProvisionRequest", created_on: "2017-12-12 08:53:23", updated_on: "2017-12-12 08:54:20", fulfilled_on: nil, requester_id: 1, requester_name: "Administrator", request_type: "template", request_state: "active", message: "[EVM] VM [vparekh_test] Step [CheckProvisioned] St...", status: "Ok", options: {:initial_pass=>true, :src_vm_id=>[2, "cirros"], :miq_request_dialog_name=>"miq_provision_openstack_dialogs_template", :customize_enabled=>["enabled"], :current_tab_key=>:requester, :owner_phone=>nil, :owner_country=>nil, :owner_phone_mobile=>nil, :owner_title=>nil, :owner_first_name=>nil, :owner_manager=>nil, :owner_address=>nil, :owner_company=>nil, :owner_last_name=>nil, :owner_manager_mail=>nil, :owner_city=>nil, :owner_department=>nil, :owner_load_ldap=>nil, :owner_manager_phone=>nil, :owner_state=>nil, :owner_office=>nil, :owner_zip=>nil, :owner_email=>"vparekh", :request_notes=>nil, :vm_tags=>[], :placement_auto=>[true, 1], :placement_availability_zone=>[nil, nil], :cloud_tenant=>[nil, nil], :cloud_network=>[nil, nil], :security_groups=>[nil, nil], :floating_ip_address=>[nil, nil], :number_of_vms=>[1, "1"], :vm_description=>nil, :vm_prefix=>nil, :vm_name=>"vparekh_test", :schedule_type=>["immediately", "Immediately on Approval"], :schedule_time=>Wed, 13 Dec 2017 00:00:00 UTC +00:00, :retirement=>[0, "Indefinite"], :retirement_warn=>[604800, "1 Week"], :instance_type=>[1, "m1.tiny"], :guest_access_key_pair=>[nil, nil], :name=>nil, :size=>nil, :delete_on_terminate=>false, :customization_template_script=>nil, :dns_servers=>nil, :dns_suffixes=>nil, :addr_mode=>["dhcp", "DHCP"], :linux_host_name=>nil, :gateway=>nil, :linux_domain_name=>nil, :subnet_mask=>nil, :customization_template_id=>[nil, nil], :root_password=>nil, :hostname=>nil, :start_date=>"12/13/2017", :start_hour=>"00", :start_min=>"00", :src_vm_nics=>[], :src_vm_lans=>[], :src_ems_id=>[3, "RHOS11"], :name_1=>"vol1", :size_1=>"2", :volumes=>[{:name=>"vol1", :size=>"2"}], :requester_group=>"EvmGroup-super_administrator", :owner_group=>nil, :delivered_on=>2017-12-12 08:53:44 UTC, :user_message=>"[EVM] VM [vparekh_test] Step [CheckProvisioned] Status [Creating VM] Message [Creating VM] Current Retry Number [1]"}, userid: "admin", source_id: 2, source_type: "VmOrTemplate", destination_id: nil, destination_type: nil, tenant_id: 2, service_order_id: nil, process: true>

Comment 4 Vatsal Parekh 2017-12-12 09:38:55 UTC
Created attachment 1366502 [details]
recording

Volume half fix

Comment 5 Sam Lucidi 2017-12-12 20:38:42 UTC
It appears that if the "Add Volume" button was added after interacting with the fields that were already present, then a flag could be set that would prevent the new fields from being observed. A new patch is available to address this issue: https://github.com/ManageIQ/manageiq-ui-classic/pull/3043

Comment 6 CFME Bot 2017-12-15 13:52:58 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/1648446c42250bc815da6cc31c0dcfaedabb855d

commit 1648446c42250bc815da6cc31c0dcfaedabb855d
Author:     Sam Lucidi <slucidi>
AuthorDate: Tue Dec 12 15:24:40 2017 -0500
Commit:     Sam Lucidi <slucidi>
CommitDate: Tue Dec 12 15:24:40 2017 -0500

    Reset isObserved flag on cloned volume fieldsets
    
    If the volume fieldset was cloned after focusing a field,
    the isObserved flag would be true on the original field,
    causing the clone not to be watched for changes.
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1520540

 app/views/miq_request/_prov_dialog_volume_fieldset.html.haml | 3 +++
 1 file changed, 3 insertions(+)

Comment 7 Satoe Imaishi 2017-12-15 14:32:18 UTC
Moving back to ON_DEV as this is cfme-5.9 BZ and the PR isn't backported to Gaprindashvili branch yet.

Comment 8 CFME Bot 2017-12-15 19:29:12 UTC
New commit detected on ManageIQ/manageiq-ui-classic/gaprindashvili:
https://github.com/ManageIQ/manageiq-ui-classic/commit/544df3b39979f0b5801d8398de677fd7141aa650

commit 544df3b39979f0b5801d8398de677fd7141aa650
Author:     Martin Hradil <himdel>
AuthorDate: Fri Dec 15 14:48:23 2017 +0100
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Dec 15 14:21:19 2017 -0500

    Merge pull request #3043 from mansam/fix-observation-of-cloned-volume-fieldsets
    
    Fix observation of cloned volume fieldsets
    (cherry picked from commit d4536f703bdbe64fdd865f1c24ede1fb62468961)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1520540

 .../miq_request/_prov_dialog_volume_fieldset.html.haml    | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Comment 9 Vatsal Parekh 2017-12-22 09:37:51 UTC
Able to verify this on Version 5.9.0.14.20171219165537_e3dea29