os-agents api update return string that is different with index return integer

Bug #1333494 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Alex Xu

Bug Description

This bug found by Dan Smith in https://review.openstack.org/#/c/101995/

First problem, there is inconsistent in api samples.

create and index action return integer for agent id actually. But in api samples file the agent id is string.
This is because api sample file provide a wrong fake data.

Second problem, the update action return string for agent id.
For back compatibility problem, we can't fix this problem for v2 and v2.1 api

We only can fix this problem for v3 api. And we need to add translator for v2.1 api for this later.

This problem will be fixed after v3 api feature exposed by microversion

Alex Xu (xuhj)
Changed in nova:
assignee: nobody → Alex Xu (xuhj)
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/102092

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Alex Xu (<email address hidden>) on branch: master
Review: https://review.openstack.org/102107

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

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

commit 8bc56d8bf203970894924b4268f4ed16fc7f2ef4
Author: He Jie Xu <email address hidden>
Date: Tue Jun 24 10:31:59 2014 +0800

    Fix update agent return agent_id with string for os-agents v3

    Currently the agent update return agent_id with integer, that is
    inconsistent with the response of agent create and index. It because
    agent update use the agent_id that passed from url as the response.
    This problem is fixed by converting the agent id as integer.

    And the API sample tests provide agent_id with string type in the fake
    data. This patch fix this problem for API sample files and tests.

    And for back-compatibility, we should add translator for v2.1 API later.
    Then this fix will be exposed after v3 API feature exposed by microversion
    in the future.

    DocImpact: The agent_is is changed to integer type for agents'update action.

    Change-Id: Ia9c1034a325b77a2057934cc80b6eab679ff1d2b
    Partial-Bug: #1333494

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit a8b805d3a3106486ad663ab2b1c6be6525465c0b
Author: He Jie Xu <email address hidden>
Date: Tue Jun 24 11:20:26 2014 +0800

    Fix agent_id with string type in API samples files for os-agents v2

    The agent_id should be integer for agent create and index. But in
    the api sample file it is string type. It's because the api sample
    tests provide agent_id with string type in fake data. This patch
    correct the api sample files and tests.

    For agent update, it use agent_id that passed from url, make the
    response use string for agent_id. We can't fix this problem for
    back-compatibility. This will be fix in the future after v3 API
    expose by micro-version

    Change-Id: I262b4b26c94dba003e80bda2f38d2e985ef9f220
    Partial-Bug: #1333494

Sean Dague (sdague)
Changed in nova:
status: In Progress → Fix Committed
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 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.