xenapi: image size calculation ignores container_format

Bug #1215928 reported by Mate Lakat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

During this review:
 https://review.openstack.org/40908

A potential bug has been discovered.

 nova/virt/xenapi/vm_utils.py

 if image_type == ImageType.DISK_VHD:
     vdis = _fetch_vhd_image(...)
 else:
     vdis = _fetch_disk_image(...)

So _fetch_disk_image is called with:
 ami, aki, ari, raw, iso disk_formats (see determine_disk_image_type() function in vm_utils.py)

Whenever the size is calculated for these images, the container_format is not taken into account, and the size reported by glance is used. If the container applies compression, the size reported by glance will be smaller, than the space needed to save the contents. In these cases, the size calculation should fail, instead of returning the size from metadata.

Look at _fetch_disk_image(...) and investigate the virtual_size calculation!

Tags: xenserver
Mate Lakat (mate-lakat)
tags: added: xenserver
Changed in nova:
importance: Undecided → Medium
Changed in nova:
status: New → Triaged
Revision history for this message
John Garbutt (johngarbutt) wrote :

This only affects raw images.

Either way, we check what the final VHD physically uses on disk, which should catch any issues with this one.

Changed in nova:
importance: Medium → Low
Sean Dague (sdague)
Changed in nova:
status: Triaged → Confirmed
Changed in nova:
assignee: nobody → Sumant Murke (sumant-murke)
Changed in nova:
assignee: Sumant Murke (sumant-murke) → nobody
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
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.