Boolean extra-specs need should work with simple True/False value

Bug #1493971 reported by Mark Sturdevant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
NidhiMittalHada

Bug Description

For a share type extra-spec to match a Boolean capability (using CapabilitiesFilter), the current design requires the extra-spec value to use the syntax '<is> True' instead of just True or 'True'. When normal humans put True in there, they will find a logged message from the scheduler saying True is not equal True. This is because there is a mismatch between the the extra-spec value (string) and the actual boolean reported.

The scheduler filter should be made to recognize how to match a Boolean with a boolean-like string so that the awkward <is> syntax is not needed.

Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Changed in manila:
status: New → In Progress
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on this.

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

Have reproduced the bug, working on its fix.

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

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

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

submitted the fix to gerrit

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/270604
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=37e8a4100da10ad4d70e451bab4f38e4735c4256
Submitter: Jenkins
Branch: master

commit 37e8a4100da10ad4d70e451bab4f38e4735c4256
Author: nidhimittalhada <email address hidden>
Date: Wed Jan 20 16:50:17 2016 +0530

    extra-specs should work with string True/False

    For a share type extra-spec to match a Boolean capability
    (using CapabilitiesFilter), the current design requires
    the extra-spec value to use the syntax '<is> True' instead
    of just True or 'True'.
    When normal humans put 'True' in there, they will find a logged message
    from the scheduler saying True is not equal True.

    This is because there is a mismatch between the the extra-spec value(string)
    and the actual boolean reported.

    Fixed the bug by using strutils boolean to string converter.

    Change-Id: I959906bc92a374abc25625d012cfbad8aaf11065
    Closes-Bug: #1493971

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0b3

This issue was fixed in the openstack/manila 2.0.0.0b3 development milestone.

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.