Instance flavor column does not sort the proper way

Bug #1518893 reported by Itxaka Serrano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Itxaka Serrano
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Latest horizon from master branch.

When displaying the instance list of a project in the Horizon dashboard (/project/instances/) and sorting the instances by the "size" column, it won't be sorted the right way.

How to reproduce:

Create 3 instances, 2 with flavor m1.tiny and 1 with flavor m1.small.
Click on the "size" header several times to order them.

Expected result:
m1.tiny
m1.tiny
m1.small

Actual result:
m1.tiny
m1.small
m1.tiny

One would expect them to be sorted by name but instead the "size" filter is used which produces the unordered results.
https://github.com/openstack/horizon/blob/master/horizon%2Fstatic%2Fhorizon%2Fjs%2Fhorizon.tables.js#L258-L285

Itxaka Serrano (itxaka)
Changed in horizon:
assignee: nobody → Itxaka (itxakaserrano)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/248594

Changed in horizon:
status: New → In Progress
Revision history for this message
Matthias Runge (mrunge) wrote :

I'm still not sure, if I would agree on flavors to be sortable. IMHO the best option would be to remove the sort option for flavors here.

Revision history for this message
Itxaka Serrano (itxaka) wrote :

After a talk in #openstack-horizon seems that there is more cases and more expectations for this than expected so a better patch would be to remove the sorting by flavor altogether instead of creating wrong expectations and frustation to the end users with the sorting.

Preparing a new patch!

Changed in horizon:
importance: Undecided → Low
David Lyle (david-lyle)
Changed in horizon:
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/248594
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=acc142b062f397556233f6344b7849f03299ed04
Submitter: Jenkins
Branch: master

commit acc142b062f397556233f6344b7849f03299ed04
Author: Itxaka <email address hidden>
Date: Mon Nov 23 10:52:51 2015 +0100

    Remove data-type and sort from flavor column

    Due to the flavor column in the instances table having
    a data-type of size, the sortable plugin tries to sort
    it by a size parser.
    Removing the sorter for that column seems the
    sanest decision as the end-user may expect the
    sorting to be done on cpu or disk or any number
    of factors that we cannot know in advance.

    Change-Id: I418244069bdcbaa2248d99772090806825987d39
    Closes-Bug: 1518893

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b1

This issue was fixed in the openstack/horizon 9.0.0.0b1 development milestone.

Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/258406

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/258407

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/liberty)

Reviewed: https://review.openstack.org/258406
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=206cef6d597be573c6c100b70ffcfc39998bd792
Submitter: Jenkins
Branch: stable/liberty

commit 206cef6d597be573c6c100b70ffcfc39998bd792
Author: Itxaka <email address hidden>
Date: Mon Nov 23 10:52:51 2015 +0100

    Remove data-type and sort from flavor column

    Due to the flavor column in the instances table having
    a data-type of size, the sortable plugin tries to sort
    it by a size parser.
    Removing the sorter for that column seems the
    sanest decision as the end-user may expect the
    sorting to be done on cpu or disk or any number
    of factors that we cannot know in advance.

    Change-Id: I418244069bdcbaa2248d99772090806825987d39
    Closes-Bug: 1518893
    (cherry picked from commit acc142b062f397556233f6344b7849f03299ed04)

tags: added: in-stable-liberty
tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/kilo)

Reviewed: https://review.openstack.org/258407
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=37d4ca3b3b6acacb5f00b1ed9047d1579298c478
Submitter: Jenkins
Branch: stable/kilo

commit 37d4ca3b3b6acacb5f00b1ed9047d1579298c478
Author: Itxaka <email address hidden>
Date: Mon Nov 23 10:52:51 2015 +0100

    Remove data-type and sort from flavor column

    Due to the flavor column in the instances table having
    a data-type of size, the sortable plugin tries to sort
    it by a size parser.
    Removing the sorter for that column seems the
    sanest decision as the end-user may expect the
    sorting to be done on cpu or disk or any number
    of factors that we cannot know in advance.

    Change-Id: I418244069bdcbaa2248d99772090806825987d39
    Closes-Bug: 1518893
    (cherry picked from commit acc142b062f397556233f6344b7849f03299ed04)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 8.0.1

This issue was fixed in the openstack/horizon 8.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/horizon 8.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.