Bug 1216005 - "XmlMarkup cannot mix a text argument with a block [miq_ae_tools/resolve]" in Automate->Simulation
Summary: "XmlMarkup cannot mix a text argument with a block [miq_ae_tools/resolve]" i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: GA
: 5.4.0
Assignee: mkanoor
QA Contact: Dave Johnson
URL:
Whiteboard:
: 1215984 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-28 10:54 UTC by Aziza Karol
Modified: 2015-06-16 13:00 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 13:00:23 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
err (51.45 KB, image/png)
2015-04-28 10:54 UTC, Aziza Karol
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Aziza Karol 2015-04-28 10:54:02 UTC
Created attachment 1019629 [details]
err

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
Steps to Reproduce:
1. Automate -> Simulation
2. 
 Object details:
    System/Process/ : Automation
    Message : create
    Request : Inspectme
 object attribute:
    Type: VM and Instance
    VM : (select any VM)
 Simulation Parameters:
    Execute Methods : Ticked
3. Submit

Actual results:
XmlMarkup cannot mix a text argument with a block [miq_ae_tools/resolve] is displayed in UI. see attached screenshot

Expected results:


Additional info:
production.log
4 -0400
[----] I, [2015-04-28T06:43:24.316062 #2438:483e9c]  INFO -- : Processing by MiqAeToolsController#form_field_changed as JS
[----] I, [2015-04-28T06:43:24.316329 #2438:483e9c]  INFO -- :   Parameters: {"readonly"=>"1", "id"=>"new"}
[----] I, [2015-04-28T06:43:24.550806 #2438:483e9c]  INFO -- : Completed 200 OK in 233.9ms (Views: 0.7ms | ActiveRecord: 1.3ms)
[----] I, [2015-04-28T06:43:34.730908 #2438:483e9c]  INFO -- : Started POST "/miq_ae_tools/resolve?button=throw" for 127.0.0.1 at 2015-04-28 06:43:34 -0400
[----] I, [2015-04-28T06:43:34.738746 #2438:483e9c]  INFO -- : Processing by MiqAeToolsController#resolve as JS
[----] I, [2015-04-28T06:43:34.738845 #2438:483e9c]  INFO -- :   Parameters: {"button"=>"throw"}
[----] F, [2015-04-28T06:43:35.628048 #2438:483e9c] FATAL -- : Error caught: [ArgumentError] XmlMarkup cannot mix a text argument with a block
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:56:in `tag!'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:184:in `block (2 levels) in cache_method_call'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:209:in `attribute_value_to_xml'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:219:in `block (3 levels) in to_xml'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `call'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `_nested_structures'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:63:in `tag!'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:184:in `block (2 levels) in cache_method_call'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:219:in `block (2 levels) in to_xml'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:218:in `each'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:218:in `block in to_xml'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `call'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `_nested_structures'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:63:in `tag!'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:88:in `method_missing'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:217:in `to_xml'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:176:in `block (2 levels) in to_expanded_xml'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:176:in `each'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:176:in `block in to_expanded_xml'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `call'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:170:in `_nested_structures'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:63:in `tag!'
/opt/rh/cfme-gemset/gems/builder-3.0.4/lib/builder/xmlbase.rb:88:in `method_missing'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:175:in `to_expanded_xml'
/var/www/miq/vmdb/app/controllers/application_controller/automate.rb:173:in `build_results'
/var/www/miq/vmdb/app/controllers/application_controller/automate.rb:17:in `resolve_button_throw'
/var/www/miq/vmdb/app/controllers/application_controller/automate.rb:157:in `resolve'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:557:in `_run__4090296148258292792__process_action__4401604731697838778__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:246:in `block in action'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/query_cache.rb:64:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `_run__4102346156447732981__call__3653610240099839436__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:32:in `call_app'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:18:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/engine.rb:484:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/application.rb:231:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/log_tailer.rb:17:in `call'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands/server.rb:70:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:55:in `block in <top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `tap'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Comment 2 Greg McCullough 2015-04-28 17:41:03 UTC
Madhu - The problem here is that they are calling a method that does not exist from simulate and the error is not being properly handled.  Note: The System/Process/Automation/Inspectme method does not exist.  It exists in System/Process/Request.

If the proper path is used it works as expected.

Comment 3 Dave Johnson 2015-04-30 16:01:25 UTC
*** Bug 1215984 has been marked as a duplicate of this bug. ***

Comment 4 CFME Bot 2015-05-04 21:00:51 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d69d53e8c726a70b8db111dccbccfefa9b34ea82

commit d69d53e8c726a70b8db111dccbccfefa9b34ea82
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Wed Apr 29 12:24:31 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Thu Apr 30 12:02:34 2015 -0400

    XML conversion for nil and service model objects
    
    The user chooses an incorrect Automation request causing
    nil attributes to be stored in the workspace. These nil values
    fail during xml conversion, causing a stack trace.
    Added a spec to validate the output of to_xml
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216005

 .../miq_automation_engine/engine/miq_ae_object.rb  |  4 +--
 .../miq_automation_engine/miq_ae_object_spec.rb    | 39 ++++++++++++++++++++++
 2 files changed, 41 insertions(+), 2 deletions(-)

Comment 6 Shveta 2015-05-13 17:11:48 UTC
Fixed in 5.4.0.0.26.20150511144816_f924bd4

Comment 8 errata-xmlrpc 2015-06-16 13:00:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1100.html


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