Bug 1737559
| Summary: | using "display" on a service raises a string conversion error | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> | ||||
| Component: | Automate | Assignee: | Lucy Fu <lufu> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Niyaz Akhtar Ansari <nansari> | ||||
| Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||
| Priority: | medium | ||||||
| Version: | 5.10.7 | CC: | dmetzger, fdewaley, gmccullo, mkanoor, nansari, obarenbo, simaishi, tfitzger | ||||
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
| Target Release: | 5.11.0 | Flags: | mfeifer:
mirror+
|
||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 5.11.0.22 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1745763 (view as bug list) | Environment: | |||||
| Last Closed: | 2019-12-13 14:54:11 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | Bug | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1745763 | ||||||
| Attachments: |
|
||||||
Hi Felix, Thanks for the reproducer environment. We're still looking into the issue, but wanted to give the customer a workaround in the meantime. The list_services Automate method will work properly if they modify it as follows: Use this: next if !s.attributes['display'] In place of this: #next if !s.display They should use attributes['display'] any place they want to refer to the service display attribute. Let me know if you have any questions. Thanks, Tina New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/7172835b42f7a21e370e85bef27b7ee5da509901 commit 7172835b42f7a21e370e85bef27b7ee5da509901 Author: Lucy Fu <lufu> AuthorDate: Thu Aug 15 11:02:16 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Thu Aug 15 11:02:16 2019 -0400 Undefine Kernel#display which would be called over service#display for DRbObject. https://bugzilla.redhat.com/show_bug.cgi?id=1737559 lib/miq_automation_engine/engine/miq_ae_engine/drb_remote_invoker.rb | 2 + 1 file changed, 2 insertions(+) New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/93a83c3ffb118affa37d39644be62cd9b717e11a commit 93a83c3ffb118affa37d39644be62cd9b717e11a Author: tina <tfitzger> AuthorDate: Mon Aug 19 13:51:57 2019 -0400 Commit: tina <tfitzger> CommitDate: Mon Aug 19 13:51:57 2019 -0400 Merge pull request #349 from lfu/service_display_1737559 Undefine Kernel#display which would be called over service#display for DRbObject (cherry picked from commit 3cf59e26a94f8284fc8cc1f4183c0f6360aa10c0) https://bugzilla.redhat.com/show_bug.cgi?id=1737559 lib/miq_automation_engine/engine/miq_ae_engine/drb_remote_invoker.rb | 2 + 1 file changed, 2 insertions(+) master branch needs extra PRs: https://github.com/ManageIQ/manageiq/pull/19211 https://github.com/ManageIQ/manageiq-schema/pull/410 Verified in Version 5.11.0.22.20190827200559_e618ece New commit detected on ManageIQ/manageiq-schema/master: https://github.com/ManageIQ/manageiq-schema/commit/3ee3f1ae899619a40fe8c6425d2b04cf058f4b75 commit 3ee3f1ae899619a40fe8c6425d2b04cf058f4b75 Author: Lucy Fu <lufu> AuthorDate: Tue Aug 27 10:54:59 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Tue Aug 27 10:54:59 2019 -0400 Rename service display column to visible. Avoid the name conflict with Kernel#display method. https://bugzilla.redhat.com/show_bug.cgi?id=1737559 db/migrate/20190827141149_rename_service_display_to_visible.rb | 5 + 1 file changed, 5 insertions(+) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/9c72451aa296ddaff00c86d4150d18b18cfb1609 commit 9c72451aa296ddaff00c86d4150d18b18cfb1609 Author: Lucy Fu <lufu> AuthorDate: Tue Aug 27 10:56:20 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Tue Aug 27 10:56:20 2019 -0400 Service display has been renamed to visible. To avoid name conflict with Kernel#display method. https://bugzilla.redhat.com/show_bug.cgi?id=1737559 app/models/service.rb | 2 + 1 file changed, 2 insertions(+) |
Created attachment 1600656 [details] list_services.rb Description of problem: using .display on a service raises a string conversion error : [----] E, [2019-08-05T17:59:07.376762 #2868:4d8d2f0] ERROR -- : <AEMethod list_services> The following error occurred during method evaluation: [----] E, [2019-08-05T17:59:07.377236 #2868:4d8d2f0] ERROR -- : <AEMethod list_services> TypeError: no implicit conversion of MiqAeMethodService::MiqAeServiceService into String Version-Release number of selected component (if applicable): 5.10.7 How reproducible: all the time Steps to Reproduce: 1. import the method attached 2. create a dialog that will use the method to populate a droplist 3. populate cloudforms with a couple services 4. load the dialog wiht a button Actual results: a method error happens : [----] E, [2019-08-05T17:59:07.376762 #2868:4d8d2f0] ERROR -- : <AEMethod list_services> The following error occurred during method evaluation: [----] E, [2019-08-05T17:59:07.377236 #2868:4d8d2f0] ERROR -- : <AEMethod list_services> TypeError: no implicit conversion of MiqAeMethodService::MiqAeServiceService into String [----] E, [2019-08-05T17:59:07.377918 #2868:4d8d2f0] ERROR -- : <AEMethod list_services> (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /var/www/miq/vmdb/lib/vmdb/loggers/io_logger.rb:12:in `write' (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1584:in `perform' (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `loop' (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' (druby://python.usersys.redhat.com:44432) -:127:in `display' (druby://python.usersys.redhat.com:44432) -:127:in `block in <main>' (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1584:in `perform' (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1664:in `loop' (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:11:in `block_yield' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:18:in `block in perform_with_block' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:15:in `each' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:15:in `perform_with_block' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1582:in `perform' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `loop' (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2019-08-05T17:59:07.385017 #2868:4d8d2f0] ERROR -- : Method STDERR: (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /var/www/miq/vmdb/lib/vmdb/loggers/io_logger.rb:12:in `write': no implicit conversion of MiqAeMethodService::MiqAeServiceService into String (TypeError) [----] E, [2019-08-05T17:59:07.385423 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' [----] E, [2019-08-05T17:59:07.385885 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1584:in `perform' [----] E, [2019-08-05T17:59:07.386314 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' [----] E, [2019-08-05T17:59:07.386736 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `loop' [----] E, [2019-08-05T17:59:07.387146 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2019-08-05T17:59:07.387570 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) -:127:in `display' [----] E, [2019-08-05T17:59:07.387981 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) -:127:in `block in <main>' [----] E, [2019-08-05T17:59:07.388387 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' [----] E, [2019-08-05T17:59:07.388809 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1584:in `perform' [----] E, [2019-08-05T17:59:07.389225 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' [----] E, [2019-08-05T17:59:07.389619 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1664:in `loop' [----] E, [2019-08-05T17:59:07.390035 #2868:4d8d2f0] ERROR -- : Method STDERR: from (druby://python.usersys.redhat.com:44432) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2019-08-05T17:59:07.390472 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:11:in `block_yield' [----] E, [2019-08-05T17:59:07.390911 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:18:in `block in perform_with_block' [----] E, [2019-08-05T17:59:07.391335 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:15:in `each' [----] E, [2019-08-05T17:59:07.391732 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/invokemethod.rb:15:in `perform_with_block' [----] E, [2019-08-05T17:59:07.392125 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1582:in `perform' [----] E, [2019-08-05T17:59:07.392550 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' [----] E, [2019-08-05T17:59:07.392954 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `loop' [----] E, [2019-08-05T17:59:07.393385 #2868:4d8d2f0] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20190805-2868-pr51uf) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2019-08-05T17:59:07.393815 #2868:4d8d2f0] ERROR -- : Method STDERR: from /Reprod/UI/service_list/list_services:33:in `<main>' [----] I, [2019-08-05T17:59:07.413786 #2868:621af9c] INFO -- : <AEMethod [/Reprod/UI/service_list/list_services]> Ending [----] E, [2019-08-05T17:59:07.414675 #2868:621af9c] ERROR -- : Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]] Expected results: Additional info: