create backup from snapshot can't work as error in _create_temp_volume_from_snapshot

Bug #1549673 reported by Lisa Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Critical
Lisa Li

Bug Description

Currently when creating backup from snapshot, it uses following way to create volume.

    def _create_temp_volume_from_snapshot(self, context, volume, snapshot):
        temp_volume = {
            'size': volume['size'],
            'display_name': 'backup-vol-%s' % volume['id'],
            'host': volume['host'],
            'user_id': context.user_id,
            'project_id': context.project_id,
            'status': 'creating',
        }

But in objects.Volume, the fields attach_status and availability_zone can't be null. As a result, it leads c-api/c-sch/c-bak can't work.

Please look into bug https://bugs.launchpad.net/cinder/+bug/1549669.

Lisa Li (lisali)
Changed in cinder:
importance: Undecided → Critical
importance: Critical → High
Lisa Li (lisali)
Changed in cinder:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/285086

Changed in cinder:
milestone: none → mitaka-3
Changed in cinder:
assignee: Lisa Li (lisali) → Michal Dulko (michal-dulko-f)
Revision history for this message
Michal Dulko (michal-dulko-f) wrote : Re: _create_temp_volume_from_snapshot: use object.create to create volume

Reassigning back to Lisa, as I've just rebased a patch.

Changed in cinder:
assignee: Michal Dulko (michal-dulko-f) → Lisa Li (lisali)
Revision history for this message
Lisa Li (lisali) wrote :

Set the bug as critical as the function 'create backup from snapshot' can't work.

Changed in cinder:
importance: High → Critical
summary: + create backup from snapshot can't work:
_create_temp_volume_from_snapshot: use object.create to create volume
summary: - create backup from snapshot can't work:
- _create_temp_volume_from_snapshot: use object.create to create volume
+ create backup from snapshot can't work as error in
+ _create_temp_volume_from_snapshot
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 231f856ece08ebc65ed5fcf201df10b1cec27d0b
Author: lisali <email address hidden>
Date: Thu Feb 25 08:59:42 2016 +0000

    Add necessary fields to volume creation

    This patch is to add the two fields in driver.py when creating
    volumes.

    Without the fix, it leads query related to the volume failed
    with exception.

    Change-Id: I0055b5bf402b0aa7b4ee78b0fb40bedea850af94
    Closes-Bug: #1549673
    Related-Bug: #1549669

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

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

commit 7a158ac4488ac86c742e15c714dda7dd76772366
Author: LisaLi <email address hidden>
Date: Fri Feb 26 10:41:19 2016 +0800

    Make nullable of fields in db model and object match

    Currently there are some fields whose nullable in db
    model and object don't match. This may lead object query
    fails.

    For example, for volume, if attach_status is nullable in
    db schema, but is not nullable in object schema.
    When writting data to db using db interface, the attach_status
    can be null. But later when reading data from db to construct
    volume object, it raises exception. As a result, all the
    query related to the volume fails.

    This patch is to make all the fields in corresponding db
    model and object match.

    Change-Id: I84fb16f0a67f9a1f7a09e91bb8ebe6298f3f49c4
    Closes-Bug: #1549669
    Related-Bug: #1549673

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 8.0.0.0rc1

This issue was fixed in the openstack/cinder 8.0.0.0rc1 release candidate.

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.