Red Hat Bugzilla – Bug 1280350
NameError uninitialized constant MiqAeMethodService::MiqAeServiceEmsOpenstack
Last modified: 2015-12-08 08:46:19 EST
Description of problem: Automate method with the following line fails with error message "NameError uninitialized constant MiqAeMethodService::MiqAeServiceEmsOpenstack" $evm.vmdb(:ems_openstack).find_by_id(provider_id) Version-Release number of selected component (if applicable): 5.5 How reproducible: Always Steps to Reproduce: 1. Copy the /ManageIQ/System/Request/InspectMe method to a writable/enabled domain 2. Edit the method to contain a single line: $evm.vmdb(:ems_openstack) 3. Run /System/Request/InspectMe from Automate -> Simulation Actual results: ERROR -- : <AEMethod inspectme> The following error occurred during method evaluation: ERROR -- : <AEMethod inspectme> NameError: uninitialized constant MiqAeMethodService::MiqAeServiceEmsOpenstack Expected results: Method runs without error Additional info: [----] E, [2015-11-10T09:41:04.336182 #20255:6724b00] ERROR -- : <AEMethod list_openstack_flavors_using_openstackid> NameError uninitialized constant MiqAeMethodService::MiqAeServiceEmsOpenstack [----] E, [2015-11-10T09:41:04.337365 #20255:6724b00] ERROR -- : <AEMethod list_openstack_flavors_using_openstackid> (druby://127.0.0.1:38694) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service.rb:202:in `const_get' (druby://127.0.0.1:38694) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service.rb:202:in `vmdb' (druby://127.0.0.1:38694) /opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' (druby://127.0.0.1:38694) /opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1584:in `perform' (druby://127.0.0.1:38694) /opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1657:in `block (2 levels) in main_loop' (druby://127.0.0.1:38694) /opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1653:in `loop' (druby://127.0.0.1:38694) /opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1653:in `block in main_loop' <code: provider = $evm.vmdb(:ems_openstack).find_by_id(provider_id)>:22:in `get_provider' <code: provider = get_provider()>:67:in `<main>’
https://github.com/ManageIQ/manageiq/pull/5397
https://github.com/ManageIQ/manageiq/pull/5438
https://github.com/ManageIQ/manageiq/pull/5458
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/92ff2c3e8cff268818c8c7d66107102fe27cb00f commit 92ff2c3e8cff268818c8c7d66107102fe27cb00f Author: Greg McCullough <gmccullo@redhat.com> AuthorDate: Wed Nov 11 19:18:42 2015 -0500 Commit: Greg McCullough <gmccullo@redhat.com> CommitDate: Mon Nov 16 10:59:24 2015 -0500 Allow automate methods to load service models using old model names This is required to support automate methods that access models using legacy provider model names which are now name-spaced. For example: $evm.vmdb(:ems_openstack) is now: $evm.vmdb(:ManageIQ_Providers_Openstack_CloudManager) https://bugzilla.redhat.com/show_bug.cgi?id=1280350 lib/miq_automation_engine/engine/miq_ae_service.rb | 15 +++- .../engine/miq_ae_service_model_legacy.rb | 100 +++++++++++++++++++++ .../miq_automation_engine/miq_ae_service_spec.rb | 40 +++++++++ 3 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 lib/miq_automation_engine/engine/miq_ae_service_model_legacy.rb
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/e2b18ef05bdf1f825621a1431216641c38cf6271 commit e2b18ef05bdf1f825621a1431216641c38cf6271 Author: Greg McCullough <gmccullo@redhat.com> AuthorDate: Thu Nov 12 16:51:41 2015 -0500 Commit: Greg McCullough <gmccullo@redhat.com> CommitDate: Mon Nov 16 10:59:26 2015 -0500 Fix provider service model inheritance Discovered ConfigurationManager and ProvisioningManager service models were not properly converted to pluggable provider name-spacing. https://bugzilla.redhat.com/show_bug.cgi?id=1280350 .../service_models/miq_ae_service_configuration_manager.rb | 7 ------- .../miq_ae_service_manageiq-providers-configuration_manager.rb | 7 +++++++ .../miq_ae_service_manageiq-providers-provisioning_manager.rb | 7 +++++++ .../service_models/miq_ae_service_provisioning_manager.rb | 7 ------- spec/lib/miq_automation_engine/miq_ae_service_spec.rb | 6 ++++++ 5 files changed, 20 insertions(+), 14 deletions(-) delete mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_configuration_manager.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-configuration_manager.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-provisioning_manager.rb delete mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_provisioning_manager.rb
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8e12a678fa14e7e2a35ab9c27ba28b97be65c75d commit 8e12a678fa14e7e2a35ab9c27ba28b97be65c75d Author: Greg McCullough <gmccullo@redhat.com> AuthorDate: Wed Nov 11 19:18:42 2015 -0500 Commit: Greg McCullough <gmccullo@redhat.com> CommitDate: Mon Nov 16 15:17:23 2015 -0500 Allow automate methods to load service models using old model names This is required to support automate methods that access models using legacy provider model names which are now name-spaced. For example: $evm.vmdb(:ems_openstack) is now: $evm.vmdb(:ManageIQ_Providers_Openstack_CloudManager) https://bugzilla.redhat.com/show_bug.cgi?id=1280350 lib/miq_automation_engine/engine/miq_ae_service.rb | 15 +++- .../engine/miq_ae_service_model_legacy.rb | 100 +++++++++++++++++++++ .../miq_automation_engine/miq_ae_service_spec.rb | 40 +++++++++ 3 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 lib/miq_automation_engine/engine/miq_ae_service_model_legacy.rb
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a2695b726d6750665bdd85c2be4c633a25273189 commit a2695b726d6750665bdd85c2be4c633a25273189 Author: Greg McCullough <gmccullo@redhat.com> AuthorDate: Thu Nov 12 16:51:41 2015 -0500 Commit: Greg McCullough <gmccullo@redhat.com> CommitDate: Mon Nov 16 15:18:23 2015 -0500 Fix provider service model inheritance Discovered ConfigurationManager and ProvisioningManager service models were not properly converted to pluggable provider name-spacing. https://bugzilla.redhat.com/show_bug.cgi?id=1280350 .../service_models/miq_ae_service_configuration_manager.rb | 7 ------- .../miq_ae_service_manageiq-providers-configuration_manager.rb | 7 +++++++ .../miq_ae_service_manageiq-providers-provisioning_manager.rb | 7 +++++++ .../service_models/miq_ae_service_provisioning_manager.rb | 7 ------- spec/lib/miq_automation_engine/miq_ae_service_spec.rb | 6 ++++++ 5 files changed, 20 insertions(+), 14 deletions(-) delete mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_configuration_manager.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-configuration_manager.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-provisioning_manager.rb delete mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_provisioning_manager.rb
Created attachment 1098821 [details] Verification - Automation log
Created attachment 1098823 [details] Verification - Screenshot - Simulation
Verified against 5.5.0.12-rc2.20151124135609_653c0d4.
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://access.redhat.com/errata/RHSA-2015:2551