Attempt to remove 'name' results in HTTP 500

Bug #1533248 reported by Dmitry Tantsur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Kan

Bug Description

Name is an optional property and should be removable (set back to None). However:
$ ironic node-update b804c08b-98f0-473c-9eaf-38f3fc24aa6b remove name
'value' (HTTP 500)

this is on tripleo liberty, didn't try on master.

Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: 2016-01-12 10:04:09.750 57785 ERROR wsme.api [req-a0438d79-7ba8-44be-a253-600b3534a9e2 ] Server-side error: "'value'". Detail:
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: Traceback (most recent call last):
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 84, in callfunction
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: result = f(self, *args, **kwargs)
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: File "/usr/lib/python2.7/site-packages/ironic/api/controllers/v1/node.py", line 1180, in patch
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: name = api_utils.get_patch_value(patch, '/name')
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: File "/usr/lib/python2.7/site-packages/ironic/api/controllers/v1/utils.py", line 72, in get_patch_value
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: return p['value']
Jan 12 10:04:09 host15.beaker.tripleo.lab.eng.rdu2.redhat.com ironic-api[57785]: KeyError: 'value'

Revision history for this message
Dmitry Tantsur (divius) wrote :
description: updated
Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
tags: added: api low-hanging-fruit
Revision history for this message
Kan (kansks) wrote :

Try to investigate this.

Changed in ironic:
assignee: nobody → Kan (kansks)
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/267327

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

Reviewed: https://review.openstack.org/267327
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=47e18981b42ec8669ca6fe8f9383f66b472435a5
Submitter: Jenkins
Branch: master

commit 47e18981b42ec8669ca6fe8f9383f66b472435a5
Author: Kan <email address hidden>
Date: Thu Jan 14 06:12:49 2016 +0000

    Enable removing name when updating node

    Name is an optional property and should be removable(set back to None).
    Enable removing name when updating node with 'remove name' argument.
    Also add test cases for that.

    Change-Id: Ie89b6bd80ac773b357861ca8dc77f72fdc137aed
    Closes-Bug: #1533248

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/ironic 5.0.0

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