Bug 1281582 - Automate domain and a namespace can't have the same name
Automate domain and a namespace can't have the same name
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
All Linux
unspecified Severity low
: GA
: 5.6.0
Assigned To: mkanoor
Jeff Teehan
: ZStream
Depends On:
Blocks: 1284639
  Show dependency treegraph
 
Reported: 2015-11-12 15:50 EST by mkanoor
Modified: 2016-06-29 11:05 EDT (History)
7 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1284639 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:05:46 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)

  None (edit)
Description mkanoor 2015-11-12 15:50:09 EST
Description of problem:
If the Automate model has a domain with the same name as a namespace name, during resolution Automate Engine cannot locate the correct instance

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

How reproducible:
100%

Steps to Reproduce:
1. Create two Domains called TEST1 & TEST2 respectively
2. In TEST2 domain create a namespace called TEST1
3. In the TEST1 namespace create a class and instance called CLASS1 and INSTANCE1
4. Click on Simulation
  System/Process  -> Request
  Message         -> create
  Request         -> Call_Instance

Attribute/Value Pairs
  1. namespace    = TEST1
  2. class        = CLASS1
  3. instance     = INSTANCE1


Submit
  In the Tree View on the right hand pane you should be able to drill down to the 
  TEST2/TEST1/CLASS1/INSTANCE1 

Actual results:
ERROR -- : Class [TEST1/CLASS1] not found in MiqAeDatastore

Expected results:
It should be able to properly locate the TEST2/TEST1/CLASS1/INSTANCE1 instance


Additional info:
Comment 3 CFME Bot 2015-11-13 11:20:36 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0ca7fc480a2d8fa84c0ed5879291d66eb3d81089

commit 0ca7fc480a2d8fa84c0ed5879291d66eb3d81089
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 15:53:35 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Nov 12 16:06:16 2015 -0500

    Domain Priority doesn't need a default value
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    The default value for the  priority of a domain is set in the model
    MiqAeDomain#default_priority. The callers dont have to pass it in.
    This spec helper file was always setting it to 10. Which is not
    desirable for some testcases

 spec/support/automation_spec_helper.rb | 1 -
 1 file changed, 1 deletion(-)
Comment 4 CFME Bot 2015-11-13 11:20:42 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fd120a57091876be54cab34b4241b97a780519d2

commit fd120a57091876be54cab34b4241b97a780519d2
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 16:07:16 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Nov 12 16:07:16 2015 -0500

    Allow for namespace and domain to have same names
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    When doing a domain search for instances, if the automate model
    contains a namespace which has the same name as one of the domains
    the search returns incorrect results.

 .../engine/miq_ae_domain_search.rb                 |  6 ++-
 .../miq_ae_domain_search_spec.rb                   | 44 ++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 spec/lib/miq_automation_engine/miq_ae_domain_search_spec.rb
Comment 5 CFME Bot 2015-11-13 11:20:48 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3a09e8ca69fbc0e064319d3994945e627b21ff6d

commit 3a09e8ca69fbc0e064319d3994945e627b21ff6d
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 17:30:07 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Nov 12 17:30:07 2015 -0500

    The copy class fails
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    The copy class fails when it misinterprets a domain as namespace

 lib/miq_automation_engine/models/miq_ae_class_copy.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 6 CFME Bot 2015-11-13 11:21:14 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/dc6ebf8ce47e9ac6d0ccda2780b102b6f34fa8fb

commit dc6ebf8ce47e9ac6d0ccda2780b102b6f34fa8fb
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Fri Nov 13 10:08:08 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Fri Nov 13 10:08:08 2015 -0500

    PR feedback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    When doing a domain search for instances, if the automate model
    contains a namespace which has the same name as one of the domains
    the search returns incorrect results.

 spec/lib/miq_automation_engine/miq_ae_domain_search_spec.rb | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
Comment 7 CFME Bot 2015-12-07 16:43:43 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=35e91448467df1124eca379dc8d455f84f0816d9

commit 35e91448467df1124eca379dc8d455f84f0816d9
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 15:53:35 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Dec 3 14:36:58 2015 -0500

    Domain Priority doesn't need a default value
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    The default value for the  priority of a domain is set in the model
    MiqAeDomain#default_priority. The callers dont have to pass it in.
    This spec helper file was always setting it to 10. Which is not
    desirable for some testcases

 spec/support/automation_spec_helper.rb | 1 -
 1 file changed, 1 deletion(-)
Comment 8 CFME Bot 2015-12-07 16:43:47 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=9b8ca3705f52f5f259c1f387a5ab85679063618a

commit 9b8ca3705f52f5f259c1f387a5ab85679063618a
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 17:30:07 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Dec 3 14:36:58 2015 -0500

    The copy class fails
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    The copy class fails when it misinterprets a domain as namespace

 lib/miq_automation_engine/models/miq_ae_class_copy.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 9 CFME Bot 2015-12-07 16:43:51 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=3bd3d03353936cfd09a8bcde161261dad5539498

commit 3bd3d03353936cfd09a8bcde161261dad5539498
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Fri Nov 13 10:08:08 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Dec 3 14:36:58 2015 -0500

    PR feedback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    When doing a domain search for instances, if the automate model
    contains a namespace which has the same name as one of the domains
    the search returns incorrect results.

 spec/lib/miq_automation_engine/miq_ae_domain_search_spec.rb | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
Comment 10 CFME Bot 2015-12-07 16:43:56 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a5c52375c32ff9717e4155182b1ccd149099628e

commit a5c52375c32ff9717e4155182b1ccd149099628e
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Nov 12 16:07:16 2015 -0500
Commit:     Madhu Kanoor <mkanoor@redhat.com>
CommitDate: Thu Dec 3 14:36:58 2015 -0500

    Allow for namespace and domain to have same names
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281582
    
    When doing a domain search for instances, if the automate model
    contains a namespace which has the same name as one of the domains
    the search returns incorrect results.

 .../engine/miq_ae_domain_search.rb                 |  6 ++-
 .../miq_ae_domain_search_spec.rb                   | 44 ++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 spec/lib/miq_automation_engine/miq_ae_domain_search_spec.rb
Comment 11 Jeff Teehan 2016-04-19 13:17:29 EDT
I think I set it up the same.  I created basically the same items with exact same names and the drill down and back up is working correctly.

Moving to Verified as of 5.6.0.1 using https://10.16.7.174/miq_ae_class/explorer

That instance will be up for a few days.
Comment 13 errata-xmlrpc 2016-06-29 11:05:46 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.