Can create/update node with name "" in any api version

Bug #1563694 reported by Zhenguo Niu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Zhenguo Niu

Bug Description

In API version below 1.5, we don't support specify node name, but it can pass if you set name="".

That's because we do check like "if name" instead of "if name is not None" before verify whether name is acceptable in the API version of this request.

Changed in ironic:
assignee: nobody → Zhenguo Niu (niu-zglinux)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → High
Changed in ironic:
assignee: Zhenguo Niu (niu-zglinux) → Vladyslav Drok (vdrok)
Vladyslav Drok (vdrok)
Changed in ironic:
assignee: Vladyslav Drok (vdrok) → Zhenguo Niu (niu-zglinux)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/299264
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=4d06a423386d8af340d4ad4086da554df66a179f
Submitter: Jenkins
Branch: master

commit 4d06a423386d8af340d4ad4086da554df66a179f
Author: Zhenguo Niu <email address hidden>
Date: Wed Mar 30 17:35:00 2016 +0800

    Correct api version check conditional for node.name

    Currently the name acceptable check is under the condition of
    "if name", so if you specify name to an empty value like "",
    that will skip the API version check.

    Change-Id: I85dc67ea7ac4f38801dc4675f85fac5e1fc1b364
    Closes-Bug: #1563694

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/ironic 6.0.0

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