Creating metadef object without properties raises 500 error

Bug #1438154 reported by Kamil Rykowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Kamil Rykowski

Bug Description

When you try to create a metadef object without any properties associated with it you get an Internal Server Error 500:

glance md-object-create --name obj_name --schema '{"description": "some desc"}' OS::Software::DBMS

AttributeError: 'NoneType' object has no attribute 'iteritems'

The object itself is created successfully, but the notification is not fired.

Changed in glance:
assignee: nobody → Kamil Rykowski (kamil-rykowski)
status: New → In Progress
tags: added: metadef
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Louis Taylor (kragniz)
Changed in glance:
milestone: none → kilo-rc1
tags: added: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/168873
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=374d50a56e2c6883798ddb4391ba52eb004adddd
Submitter: Jenkins
Branch: master

commit 374d50a56e2c6883798ddb4391ba52eb004adddd
Author: Kamil Rykowski <email address hidden>
Date: Mon Mar 30 14:16:57 2015 +0200

    Creating metadef object without any properties

    Creating a metadef object without any properties associated with it
    raises an Internal Server Error. It is easily reproducible by running
    following glanceclient command:

    glance --os-image-api-version 2 md-object-create --name obj_name
    --schema '{"description": "some desc"}' OS::Software::DBMS

    The metadef object itself is created successfully, but the notification
    is not fired and the response has code 500. Proposed patch fixes it by
    making sure that notification system won't iterate over None value.

    Change-Id: I591801d80d9cb2738dc3d27d7719fcc53a3d0645
    Closes-Bug: 1438154

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-rc1 → 2015.1.0
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.