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 1517852 - [Target refresh] A Template created from a VM, has missing values for some fields.
Summary: [Target refresh] A Template created from a VM, has missing values for some fi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Moti Asayag
QA Contact: Ilanit Stein
URL:
Whiteboard: target refresh:rhev
Depends On:
Blocks: 1525254
TreeView+ depends on / blocked
 
Reported: 2017-11-27 15:22 UTC by Ilanit Stein
Modified: 2018-06-21 20:41 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1525254 (view as bug list)
Environment:
Last Closed: 2018-06-21 20:41:53 UTC
Category: Bug
Cloudforms Team: RHEVM
Target Upstream Version:


Attachments (Terms of Use)
VM_provision_select_unpopulated_template.png (deleted)
2017-11-27 15:23 UTC, Ilanit Stein
no flags Details
evm.log (deleted)
2017-11-27 15:25 UTC, Ilanit Stein
no flags Details


Links
System ID Priority Status Summary Last Updated
Github ManageIQ manageiq-providers-ovirt pull 167 None None None 2017-12-04 11:44:17 UTC

Description Ilanit Stein 2017-11-27 15:22:16 UTC
Description of problem:
1. Publish VM to a template for a RHEL VM
-> there is a target refresh occurring for the created template,
however the target refresh do not populate all template fields.

2. Try to VM provision from this template: 
In the select template window, this template has some missing fields:
CPUs, memory, OS, Disk size

3. Select this template with the missing fields, and press continue
-> Nothing happen in the UI. In evm.log there is an error (see right bellow)

4. Running target refresh for this template do not populate the missing fields.

5. Go to provider page, and run Configuration->"Refresh relationships and power states" (Provider Full refresh)
-> This will populate all the missing fields of the template, and VM provision can be run successfully.  

Version-Release number of selected component (if applicable):
CFME-5.9.0.10/RHV-4.1.7

How reproducible:
100%

Additional info:
* This bug occur when the template creation from VM is done on RHV side as well.

* Error in evm.log:
[----] E, [2017-11-27T10:10:11.565618 #13501:9186d8] ERROR -- : [NoMethodError]: undefined method `memory_mb' for nil:NilClass  Method:[block in method_missing]
[----] E, [2017-11-27T10:10:11.565863 #13501:9186d8] ERROR -- : /var/www/miq/vmdb/app/models/manageiq/providers/infra_manager/provision_workflow.rb:4:in `set_or_default_hardware_field_values'
/opt/rh/cfme-gemset/bundler/gems/manageiq-providers-ovirt-ef3fc2c05cba/app/models/manageiq/providers/redhat/infra_manager/provision_workflow.rb:132:in `set_or_default_hardware_field_values'
/var/www/miq/vmdb/app/models/miq_provision_virt_workflow.rb:132:in `set_on_vm_id_changed'
/opt/rh/cfme-gemset/bundler/gems/manageiq-providers-ovirt-ef3fc2c05cba/app/models/manageiq/providers/redhat/infra_manager/provision_workflow.rb:92:in `set_on_vm_id_changed'
/var/www/miq/vmdb/app/models/miq_provision_virt_workflow.rb:79:in `refresh_field_values'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-8875886499ed/app/controllers/application_controller/miq_request_methods.rb:850:in `prov_set_form_vars'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-8875886499ed/app/controllers/application_controller/miq_request_methods.rb:208:in `prov_edit'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-8875886499ed/app/controllers/application_controller/miq_request_methods.rb:99:in `pre_prov'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.6/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:727:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/configuration.rb:232:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:578:in `handle_request'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:415:in `process_client'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:275:in `block in run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

Comment 2 Ilanit Stein 2017-11-27 15:23:18 UTC
Created attachment 1359515 [details]
VM_provision_select_unpopulated_template.png

Comment 3 Ilanit Stein 2017-11-27 15:25:12 UTC
Created attachment 1359522 [details]
evm.log

See template temp_1 - not populated with all fields.

Comment 5 CFME Bot 2017-12-07 11:24:27 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/14a3f07b973247c1a29aeca594b660123bedc9a9

commit 14a3f07b973247c1a29aeca594b660123bedc9a9
Author:     Moti Asayag <masayag@redhat.com>
AuthorDate: Sun Dec 3 22:25:56 2017 +0200
Commit:     Moti Asayag <masayag@redhat.com>
CommitDate: Mon Dec 4 13:36:18 2017 +0200

    Implement template targeted refresh
    
    Since we can create template from MIQ side on RHV, templates should be
    fully refreshed once the creation is completed.
    In addition, when a template is being created on RHV side, not all of
    its fields are being updated.
    Therefore, there is a need to support also template target refresh
    (unrelated to graph refresh in this context).
    
    Fixes bug:
    https://bugzilla.redhat.com/show_bug.cgi?id=1517852

 .../redhat/infra_manager/inventory/strategies/v4.rb  | 20 ++++++++++++++++++++
 .../redhat/infra_manager/refresh/refresher.rb        |  6 +++++-
 .../redhat/infra_manager/refresh/strategies/api3.rb  | 17 +++++++++++++++++
 .../redhat/infra_manager/refresh/strategies/api4.rb  |  4 ++++
 4 files changed, 46 insertions(+), 1 deletion(-)


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