Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1287473 - Accessing the ae_domains association of an MiqAeServiceTenant object causes error "uninitialized constant MiqAeMethodService::MiqAeServiceMiqAeDomain"
Accessing the ae_domains association of an MiqAeServiceTenant object causes e...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
Unspecified Unspecified
unspecified Severity unspecified
: GA
: 5.6.0
Assigned To: mkanoor
Dmitry Misharov
:
: 1288119 (view as bug list)
Depends On:
Blocks: 1288119 1288120
  Show dependency treegraph
 
Reported: 2015-12-02 03:05 EST by Peter McGowan
Modified: 2018-05-22 16:40 EDT (History)
5 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1288119 1288120 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:15:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Peter McGowan 2015-12-02 03:05:05 EST
Description of problem:
The new MiqAeServiceTenant class has an association to ae_domains:

expose :ae_domains, :association => true

however when this association is accessed via an automate script, an error is generated:

MiqAeServiceModelBase.ar_method raised: <NameError>: <uninitialized constant MiqAeMethodService::MiqAeServiceMiqAeDomain>

...because there is no corresponding service model

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


How reproducible:
Every time

Steps to Reproduce:
1. Add a call to object_walker to a VMProvision_VM state machine instance
2. Provision a VM
3. Observe the error when object_walker traverses the associations of $evm.root['tenant']

Actual results:

[----] E, [2015-12-02T07:35:23.017981 #14760:90d6ee4] ERROR -- : Q-task_id([miq_provision_1000000000001]) MiqAeServiceModelBase.ar_method raised: <NameError>: <uninitialized constant MiqAeMethodService::MiqAeServiceMiqAeDomain>
[----] E, [2015-12-02T07:35:23.018243 #14760:90d6ee4] ERROR -- : Q-task_id([miq_provision_1000000000001]) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:116:in `const_get'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:116:in `block in wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:261:in `ar_method'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:108:in `wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:112:in `block (2 levels) in wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:112:in `collect'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:112:in `block in wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:261:in `ar_method'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:108:in `wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:126:in `wrap_results'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:97:in `block (2 levels) in expose'
/opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1624:in `perform_without_block'
/opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1584:in `perform'
/opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1657:in `block (2 levels) in main_loop'
/opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1653:in `loop'
/opt/rh/rh-ruby22/root/usr/share/ruby/drb/drb.rb:1653:in `block in main_loop'

Expected results:
no error

Additional info:
object_walker was 1.6.2 from https://github.com/pemcg/object_walker
Comment 3 CFME Bot 2015-12-02 16:35:18 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a0d8a7edc1f368f5daa39e0ce67615af4270d996

commit a0d8a7edc1f368f5daa39e0ce67615af4270d996
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Wed Dec 2 14:38:45 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Wed Dec 2 14:38:45 2015 -0500

    Added Service Model for MiqAeDomain
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1287473
    
    Starting in 5.5 each domain is owned by a tenant, tenants have a
    relationship to domains. The Service Model for MiqAeDomain was not
    being defined. Added Service Model for MiqAeDomain & MiqAeNamespace

 .../service_models/miq_ae_service_miq_ae_domain.rb         |  4 ++++
 .../service_models/miq_ae_service_miq_ae_namespace.rb      |  4 ++++
 .../lib/miq_automation_engine/miq_ae_service_model_spec.rb | 14 ++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_miq_ae_domain.rb
 create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_miq_ae_namespace.rb
Comment 4 mkanoor 2015-12-03 14:27:40 EST
*** Bug 1288119 has been marked as a duplicate of this bug. ***
Comment 5 CFME Bot 2015-12-07 14:33:50 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=ff66e0be304af60180bbc3fa03b26a322a1d387a

commit ff66e0be304af60180bbc3fa03b26a322a1d387a
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Wed Dec 2 14:38:45 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Wed Dec 2 16:37:04 2015 -0500

    Added Service Model for MiqAeDomain
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1287473
    
    Starting in 5.5 each domain is owned by a tenant, tenants have a
    relationship to domains. The Service Model for MiqAeDomain was not
    being defined. Added Service Model for MiqAeDomain & MiqAeNamespace

 .../service_models/miq_ae_service_miq_ae_domain.rb         |  4 ++++
 .../service_models/miq_ae_service_miq_ae_namespace.rb      |  4 ++++
 .../lib/miq_automation_engine/miq_ae_service_model_spec.rb | 14 ++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_miq_ae_domain.rb
 create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_miq_ae_namespace.rb
Comment 6 Milan Falešník 2016-05-27 04:38:50 EDT
Verified in 5.6.0.8, both in provision and in rails console, the .ae_domains relationship of tenant is working.
Comment 8 errata-xmlrpc 2016-06-29 11:15:07 EDT
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/RHBA-2016:1348

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