Public bug reported: This API's docs says it takes a boolean for the forced_down field:
https://developer.openstack.org/api-ref/compute/?expanded=update-forced- down-detail#update-forced-down But the schema uses the boolean parameter type: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/openstack/compute/schemas/services.py#L42 Which is not only booleans, it's also things like 'on/off' and 'yes/no': https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/validation/parameter_types.py#L188 Which isn't converted to a boolean: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/openstack/compute/services.py#L136 That's just passed through to update the service object: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/objects/service.py#L151 https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/db/sqlalchemy/models.py#L97 Which is expecting a boolean, so 'yes' or 'on' is going to result in an error. ** Affects: nova Importance: Medium Status: Triaged ** Affects: nova/newton Importance: Undecided Status: New ** Affects: nova/ocata Importance: Undecided Status: New ** Tags: api -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1697497 Title: PUT /os-services/force-down won't work with non-boolean forced_down field Status in OpenStack Compute (nova): Triaged Status in OpenStack Compute (nova) newton series: New Status in OpenStack Compute (nova) ocata series: New Bug description: This API's docs says it takes a boolean for the forced_down field: https://developer.openstack.org/api-ref/compute/?expanded=update- forced-down-detail#update-forced-down But the schema uses the boolean parameter type: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/openstack/compute/schemas/services.py#L42 Which is not only booleans, it's also things like 'on/off' and 'yes/no': https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/validation/parameter_types.py#L188 Which isn't converted to a boolean: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/api/openstack/compute/services.py#L136 That's just passed through to update the service object: https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/objects/service.py#L151 https://github.com/openstack/nova/blob/a43dbba2b8feea063ed2d0c79780b4c3507cf89b/nova/db/sqlalchemy/models.py#L97 Which is expecting a boolean, so 'yes' or 'on' is going to result in an error. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1697497/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

