boolean values for capabilities don't work

Bug #1146306 reported by Avishay Traeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Huang Zhiteng
oslo-incubator
Fix Released
Undecided
Avishay Traeger
Grizzly
Fix Released
Undecided
Avishay Traeger

Bug Description

Boolean values for capabilities don't work because extra_specs are all converted to unicode. The scheduler will then check, for example, if the boolean 'True' is equal to the unicode string 'True', and will always return False. This is an issue for the 'QoS_support' flag.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Avishay Traeger (avishay-il)
status: New → In Progress
affects: cinder → oslo
Changed in cinder:
assignee: nobody → Avishay Traeger (avishay-il)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

tags: added: solidfire storwize-svc
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/23679
Committed: http://github.com/openstack/oslo-incubator/commit/2e8b5e8446432542901b3c814670a4c67e629137
Submitter: Jenkins
Branch: master

commit 2e8b5e8446432542901b3c814670a4c67e629137
Author: Avishay Traeger <email address hidden>
Date: Wed Mar 6 12:21:31 2013 +0200

    Add 'is' operator to extra specs ops.

    Boolean values for capabilities don't work because extra_specs are
    all converted to unicode. The scheduler will then check, for example,
    if the boolean 'True' is equal to the unicode string 'True', and will
    always return False. This patch allows admins to specify '<is> True'
    in extra_specs, which will compare successfully to boolean True.

    Fixes bug: 1146306

    Change-Id: Id0e6dcfb71eb0943a16bba551ec23c4d57206550

Changed in oslo:
status: In Progress → Fix Committed
Changed in cinder:
assignee: Avishay Traeger (avishay-il) → Huang Zhiteng (zhiteng-huang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/23880
Committed: http://github.com/openstack/cinder/commit/6abb5733968c9bf558a941c4d9cbd14e5ddf3768
Submitter: Jenkins
Branch: master

commit 6abb5733968c9bf558a941c4d9cbd14e5ddf3768
Author: Zhiteng Huang <email address hidden>
Date: Fri Mar 8 16:54:03 2013 +0800

    Pull newly merged Olso update for 'is' operator

    A recent update to common/scheduler/filters/extra_specs_ops.py in
    Oslo added new 'is' operator to allow Boolean check. The original
    commit message was:

    "Boolean values for capabilities don't work because extra_specs are
    all converted to unicode. The scheduler will then check, for example,
    if the boolean 'True' is equal to the unicode string 'True', and will
    always return False. This patch allows admins to specify '<is> True'
    in extra_specs, which will compare successfully to boolean True."

    Notice extra_specs_ops now relies on strutils from Olso, so this
    change pull strutils from Oslo as well.

    Fix bug: # 1146306

    Change-Id: I83adf707c30274a3862aa8034e72c3361fd19952

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc1 → 2013.1
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.