admin_metadata not saved when returned in model_update from driver's create_volume

Bug #1656867 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Michal Dulko

Bug Description

admin_metadata are not saved by the o.vo without an admin context. Turns out it is never saved correctly if driver returns admin_metadata in model_update:

InvalidRequestError: Entity '<class 'cinder.db.sqlalchemy.models.Volume'>' has no property 'admin_metadata'

Tags: huawei
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Fix is here, I'm not sure why Launchpad missed it: https://review.openstack.org/#/c/420749/

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

Reviewed: https://review.openstack.org/420749
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=beccf8b67149e9b63642a46309404b6dd1a3123d
Submitter: Jenkins
Branch: master

commit beccf8b67149e9b63642a46309404b6dd1a3123d
Author: Michał Dulko <email address hidden>
Date: Mon Jan 16 15:53:31 2017 +0100

    Save model_update as admin in create_volume

    admin_metadata are not saved by the object without an admin context.
    Turns out Huawei driver returns admin_metadata in model_update. To make
    sure admin_metadata will be saved we should save the volume to the DB
    with admin context. This commit implements that.

    Change-Id: Ia48498734db61474009c8854a353c67cbdfccc0e
    Closes-Bug: 1656867

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

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