ceph image clone to volume not marked as bootable

Bug #1185533 reported by Edward Hope-Morley
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Edward Hope-Morley

Bug Description

If, using a Ceph backend for Cinder and Glance, you create a volume from a Glance image, the request is actioned in one of two ways. If Glance does not supply sufficient information to Cinder, a full copy is made of the Glance image. Otherwise, Ceph uses it's copy-on-write capability to do a clone. If a full copy is done, the volume is marked as Bootable=True but if a clone is done it is not.

This does not appear to break booting from volume at present but the status displayed by the cinder client is broken.

This should be a simple matter of making sure that the Glance metadata is saved with the volume when the clone is finished.

Tags: ceph drivers
description: updated
description: updated
tags: added: ceph drivers
Changed in cinder:
assignee: nobody → xiaoxi_chen (xiaoxi-chen)
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/31020

Changed in cinder:
assignee: xiaoxi_chen (xiaoxi-chen) → Edward Hope-Morley (hopem)
status: Confirmed → In Progress
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/31020
Committed: http://github.com/openstack/cinder/commit/427146437570e96d0e64b691150c8d1a3b1ebd87
Submitter: Jenkins
Branch: master

commit 427146437570e96d0e64b691150c8d1a3b1ebd87
Author: Edward Hope-Morley <email address hidden>
Date: Wed May 29 23:35:32 2013 +0100

    Fix incorrect status for volume clone from image

    If, when using a Ceph as a backend for Cinder and Glance, you
    create a volume from a Glance image, the request is actioned
    in one of two ways; (1) if Glance does not supply sufficient
    information to Cinder, a full copy is made of the Glance
    image or (2) Ceph uses it's copy-on-write capability to do a
    clone. If a full copy is done, the volume is marked as
    Bootable=True but if a clone is done it is not.

    This does not appear to break nova boot from volume at present
    but the status displayed by the cinder client is incorrect.

    Change-Id: I2959fc3dfaf0e073781583019797bcd44f7789d6
    Fixes: bug 1185533

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
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/41382

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

Reviewed: https://review.openstack.org/41382
Committed: http://github.com/openstack/cinder/commit/162aa28824fb6caa6e3adaf7ed268e9fae178a73
Submitter: Jenkins
Branch: master

commit 162aa28824fb6caa6e3adaf7ed268e9fae178a73
Author: xiaoxi_chen <email address hidden>
Date: Mon Aug 12 19:25:59 2013 +0800

    Set bootable flag for volume cloned from image

    In previous code we don't set the bootable flag for volume
    cloned from image. This does not appear to break booting
    from volume at present but the status displayed by the cinder
    client is broken.

    The bug is reported and fixed several months ago(bug #1185533)
    but the author doesn't provide unit test with the patch. Now it
    has been broken again by somebody else.The patch re-fixed this
    bug together with unit tests.

    Also add a function named _handle_bootable_volume_glance_meta,
    it is a combination of enable_bootable_flag and glance_metadata
    handling. There are 3 kinds of volume creation tasks may required
    to copy/fetch the glance metadata. In previous code every kind of
    task have its own handling code, this patch consolidate them together
    to share some common code.

    fixed bug #1211272
    fixed bug #1185533

    Change-Id: I86007e26efbebe58dc0c5995b6f14f68258144b5

Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.2
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.