Bug 1324094 - Automate namespace priority order not working properly
Summary: Automate namespace priority order not working properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: GA
: 5.6.0
Assignee: mkanoor
QA Contact: Milan Falešník
URL:
Whiteboard: automate
Depends On:
Blocks: 1326459
TreeView+ depends on / blocked
 
Reported: 2016-04-05 13:53 UTC by Martin Welk
Modified: 2016-08-10 14:08 UTC (History)
8 users (show)

Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1326459 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:47:32 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Martin Welk 2016-04-05 13:53:50 UTC
Description of problem:
Manually changing the priority order isn't working well

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

How reproducible:
100%

Steps to Reproduce:
0. Deploy a "fresh" appliance
1. Go to Automate -> Explorer -> Datastore
2. Create a domain "INI-TRANS-Config"
3. CFME shows domains in the order INI-TRANS-Config/RedHat/ManageIQ
4. Create another domain "INI-TRANS-Development"
5. CFME shows domains in the order INI-TRANS-Development/INI-TRANS-Config/RedHat/ManageIQ
6. Go to Datastore -> Configuration -> Edit Priority...
7. Move INI-TRANS-Config up to the top
8. Save.
9. CFME shows domains in the order INI_TRANS-Config/RedHat/INI-TRANS-Development/MangeIQ
10. Go to Datastore -> Configuration -> Edit Priority...
11. Move INI-TRANS-Development up to the top
12. Save.
13. CFME shows domains in the order INI_TRANS-Development/RedHat/INI-TRANS-Config/MangeIQ

Actual results:
See above.

Expected results:
I expect the custom domains listed before RedHat and ManageIQ.

Comment 2 mkanoor 2016-04-11 21:43:39 UTC
Created PR https://github.com/ManageIQ/manageiq/pull/7884

This error started happening since we introduced tenants and only those domains that were editable were eligible for priority ordering. All locked domains are not allowed for sorting. Since locked domains were filtered out, in the current ticket Redhat and INI-TRANS-Config had the same priority of 1.

The solution is to account for the locked uneditable domains before we set the priority

Comment 4 CFME Bot 2016-04-13 03:25:40 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d82851736750b10f3c598b227a0d5f709064000d

commit d82851736750b10f3c598b227a0d5f709064000d
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Apr 11 17:20:10 2016 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Mon Apr 11 17:20:10 2016 -0400

    Incorrect priority order of domains
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1324094
    
    With the tenant changes we only allow the user to change the priority
    of editable domains, when reseting the priority order the locked domains
    don't get accounted for and the priority values are off.

 app/controllers/miq_ae_class_controller.rb |  2 +-
 app/models/tenant.rb                       |  6 ++++++
 spec/models/tenant_spec.rb                 | 18 ++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

Comment 5 CFME Bot 2016-05-24 16:39:51 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a05a6621adda1e7376c7113000d12d077c4b5fb2

commit a05a6621adda1e7376c7113000d12d077c4b5fb2
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Apr 11 17:20:10 2016 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Tue May 24 10:12:19 2016 -0400

    Incorrect priority order of domains
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1324094
    
    With the tenant changes we only allow the user to change the priority
    of editable domains, when reseting the priority order the locked domains
    don't get accounted for and the priority values are off.

 app/controllers/miq_ae_class_controller.rb |  2 +-
 app/models/tenant.rb                       |  6 ++++++
 spec/models/tenant_spec.rb                 | 18 ++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

Comment 6 Milan Falešník 2016-05-26 13:48:43 UTC
Verified in 5.6.0.8, the domains are sorted as expected.

Comment 8 errata-xmlrpc 2016-06-29 15:47:32 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://access.redhat.com/errata/RHBA-2016:1348


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