PUT /os-services/force-down won't work with non-boolean forced_down field

Bug #1697497 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ken'ichi Ohmichi
Newton
Fix Committed
Medium
Matt Riedemann
Ocata
Fix Committed
Medium
Matt Riedemann
Tags: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

We should probably be using oslo_utils.strutils.bool_from_string:

https://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L113

Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

Yes, we need to use oslo_utils.strutils.bool_from_string() like the other APIs.

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

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

Changed in nova:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
status: Triaged → In Progress
Changed in nova:
assignee: Ken'ichi Ohmichi (oomichi) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/473564
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d0d7fc3a19dba48fa988b995db620e0da066381a
Submitter: Jenkins
Branch: master

commit d0d7fc3a19dba48fa988b995db620e0da066381a
Author: Ken'ichi Ohmichi <email address hidden>
Date: Mon Jun 12 12:37:20 2017 -0700

    Add bool_from_string for force-down action

    On force-down action API, its forced_down parameter is defined as
    parameter_types.boolean which allows string values like 'True',
    'False', etc. However the API code didn't contain bool_from_string
    call which converts string value to boolean value. In addition,
    the parameter is defined as BooleanField in the service object.
    So if the string value is passed on forced_down parameter, HTTP
    500 error happaned. This patch fixes this problem by adding
    bool_from_string call.

    Closes-Bug: #1697497

    Change-Id: Ifca579d1bb43ece190c633b3ea1ffa476daf6e34

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Ken'ichi Ohmichi (oomichi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/473842

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/473843

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0b3

This issue was fixed in the openstack/nova 16.0.0.0b3 development milestone.

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

Reviewed: https://review.openstack.org/473843
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9bc7db594ff8b15c3e6711f9a3430fbb43ea66e1
Submitter: Jenkins
Branch: stable/newton

commit 9bc7db594ff8b15c3e6711f9a3430fbb43ea66e1
Author: Ken'ichi Ohmichi <email address hidden>
Date: Mon Jun 12 12:37:20 2017 -0700

    Add bool_from_string for force-down action

    On force-down action API, its forced_down parameter is defined as
    parameter_types.boolean which allows string values like 'True',
    'False', etc. However the API code didn't contain bool_from_string
    call which converts string value to boolean value. In addition,
    the parameter is defined as BooleanField in the service object.
    So if the string value is passed on forced_down parameter, HTTP
    500 error happaned. This patch fixes this problem by adding
    bool_from_string call.

    Closes-Bug: #1697497

    Change-Id: Ifca579d1bb43ece190c633b3ea1ffa476daf6e34
    (cherry picked from commit d0d7fc3a19dba48fa988b995db620e0da066381a)

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

Reviewed: https://review.openstack.org/473842
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=586ed0ff1efc7a2b0fb36031f6cacef1e26faf05
Submitter: Jenkins
Branch: stable/ocata

commit 586ed0ff1efc7a2b0fb36031f6cacef1e26faf05
Author: Ken'ichi Ohmichi <email address hidden>
Date: Mon Jun 12 12:37:20 2017 -0700

    Add bool_from_string for force-down action

    On force-down action API, its forced_down parameter is defined as
    parameter_types.boolean which allows string values like 'True',
    'False', etc. However the API code didn't contain bool_from_string
    call which converts string value to boolean value. In addition,
    the parameter is defined as BooleanField in the service object.
    So if the string value is passed on forced_down parameter, HTTP
    500 error happaned. This patch fixes this problem by adding
    bool_from_string call.

    Closes-Bug: #1697497

    Change-Id: Ifca579d1bb43ece190c633b3ea1ffa476daf6e34
    (cherry picked from commit d0d7fc3a19dba48fa988b995db620e0da066381a)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.7

This issue was fixed in the openstack/nova 15.0.7 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.8

This issue was fixed in the openstack/nova 14.0.8 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.