Adopt node failed

Bug #1705168 reported by liyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
liyi

Bug Description

Adopt node with body:
{
    "identity": "81c1110c-3931-4b8c-9898-0b97001f5cef",
    "metadata": {},
    "name": "node-adopt",
    "overrides": null,
    "role": "master",
    "snapshot": true,
    "type": "os.nova.server-1.0"
}

API raise exception:
{
  "code": 400,
  "error": {
    "code": 400,
    "message": "Additional properties are not allowed ('preview' was unexpected)",
    "type": "HTTPBadRequest"
  },
  "explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.",
  "title": "Bad Request"
}

The code https://github.com/openstack/senlin/blob/master/senlin/api/openstack/v1/nodes.py#L78 set the 'preview=False' in body, but NodeAdoptRequest class (https://github.com/openstack/senlin/blob/master/senlin/objects/requests/nodes.py#L113-L123) doesn't contain 'preview'.

liyi (whyliyi)
Changed in senlin:
assignee: nobody → liyi (whyliyi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

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

Changed in senlin:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/485092
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=89eb786478ea4c16114b1031bdf8c12844a46c2d
Submitter: Jenkins
Branch: master

commit 89eb786478ea4c16114b1031bdf8c12844a46c2d
Author: liyi <email address hidden>
Date: Wed Jul 19 16:08:48 2017 +0800

    Adopt node failure

    1. 'preview' is not necessary for adopt in API level, if need, we
    can set it node_adopt function in senlin-engin level.
    2. disk_config of server may be None, but AUTO_DISJ_CONFIG is
    boolean.
    3. bdm of server may be None, but BLOCK_DEVICE_MAPPING is list.
    4. config_drive of server may be empty string or None, but
    CONFIG_DRIVE is boolean.

    Change-Id: I76c0d689d7124f70af915f1e3c14c737314fd47f
    Closes-Bug: #1705168

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 4.0.0.0b3

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