"get console output" v3 API should allow -1 as the length

Bug #1295426 reported by Ken'ichi Ohmichi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ken'ichi Ohmichi
python-novaclient
Fix Released
Undecided
Ken'ichi Ohmichi

Bug Description

If running "nova console-log" command against v3 API, the command fails like the following:

$ nova --os-compute-api-version 3 console-log vm01
ERROR: Invalid input for field/attribute length. Value: None. None is not of type 'integer', 'string' (HTTP 400) (Request-ID: req-b8588c9b-58a7-4e22-a2e9-30c5354ae4f7)
$

This is because API schema of the API does not allow null as the length of log. The other APIs(quota, etc) considers -1 as an unlimited value.
So it would be nice that "get console output" API also considers -1 as the
unlimited length for API consistency.

Changed in nova:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
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/81947

Changed in nova:
status: New → In Progress
affects: nova → python-novaclient
affects: python-novaclient → nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

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

commit 8e5577f52f660960738f1fc0384dff77fa30fc8a
Author: Ken'ichi Ohmichi <email address hidden>
Date: Thu Apr 10 20:46:13 2014 +0900

    Allow -1 as the length of "get console output" API

    Current "get console output" API does not allow -1 as the length and
    returns a BadRequest response if receiving it. The other APIs(quota)
    considers -1 as an unlimited value.
    This patch allows -1 as the length for API consistency.

    DocImpact

    Change-Id: Idf88a238d1b0e545ebab5be872269b1b1030cc56
    Related-Bug: #1295426

Changed in nova:
status: In Progress → Fix Committed
Changed in python-novaclient:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: New → In Progress
summary: - "get console output" v3 API should allow "null" as the length
+ "get console output" v3 API should allow -1 as the length
description: updated
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/87422
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=7acbc5f1f8d6d8079f7aaf5e60c8b7a2ee3a5932
Submitter: Jenkins
Branch: master

commit 7acbc5f1f8d6d8079f7aaf5e60c8b7a2ee3a5932
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Apr 15 09:47:51 2014 +0900

    Fix the unlimited length of console-log

    Since the commit Idf88a238d1b0e545ebab5be872269b1b1030cc56 of Nova,
    the unlimited length has been changed to -1 for API consistency.

    This patch applies it to novaclient.

    Change-Id: I581609a55f081184ad9d791ba38d78fa30d298a6
    Closes-Bug: #1295426

Changed in python-novaclient:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/icehouse)

Related fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/101010

Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/icehouse)

Change abandoned by Dirk Mueller (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/101010
Reason: Agreed. no longer necessary. It was still having a point 3 weeks ago :-)

Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.