Booting Ceph instance using Ceph glance doesn't resize root disk to flavor size

Bug #1623497 reported by Matthew Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

This bug is purely from code inspection; I haven't replicated it on a running system.

Change I46b5658efafe558dd6b28c9910fb8fde830adec0 added a resize check that the backing file exists before checking its size. Unfortunately we forgot that Rbd overrides get_disk_size(path), and ignores the path argument, which means it would previously not have failed even when the given path didn't exist. Additionally, the callback function passed to cache() by driver will also ignore its path argument, and therefore not write to the image cache, when cloning to a ceph instance from a ceph glance store (see the section starting if backend.SUPPORTS_CLONE in driver._create_and_inject_local_root). Consequently, when creating a ceph instance using a ceph glance store:

1. 'base' will not exist in the image cache
2. get_disk_size(base) will return the correct value anyway

We broke this with change I46b5658efafe558dd6b28c9910fb8fde830adec0.

Tags: ceph libvirt
Matthew Booth (mbooth-9)
tags: added: newton-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

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

Matt Riedemann (mriedem)
tags: added: ceph libvirt
Revision history for this message
Matthew Booth (mbooth-9) wrote :

Turns out that this case is still covered because Rbd.create_image() does a redundant resize. So, while the resize described in the bug report doesn't happen, the image is still resized anyway. In fact, it's now only resized once whereas it was previously resized twice, so it's actually slightly more efficient.

I'm personally inclined to leave this alone now until the refactor lands and this all becomes a lot simpler to follow.

tags: removed: newton-rc-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Matthew Booth (mbooth-9)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matthew Booth (<email address hidden>) on branch: master
Review: https://review.openstack.org/370180
Reason: Not going to go this way.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Matthew Booth (<email address hidden>) on branch: master
Review: https://review.openstack.org/370135
Reason: Not going to go this way.

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Matthew Booth (mbooth-9) → nobody
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.