← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1361317] [NEW] Nova creates volume images of wrong size in Ceph RBD

 

Public bug reported:

When spawning a new instance and using the Boot from Image option, nova
will create images of the wrong size on ceph RBD.  This problem shows up
as the image being several orders of magnitude larger than the requested
size in ceph (i.e. 1TB in size instead of 1GB in size).

Configuration notes:
- nova version 2.17.0
- ceph version 0.80.1

This can be verified using the rbd command line tool after spawning an instance.
1) Start an instance of cirros using 1GB boot disk (m1.tiny)
2) rbd -p vms ls          ( get the disk image name)
3) rbd -p vms info <image name>

The bug comes from a size conversion error in
nova/virt/libvirt/imagebackend.py (lines 657-658, patch file attached)

    def _resize(self, volume_name, size):
        size = int(size) * units.Ki

Should be:
    def _resize(self, volume_name, size):
        size = int(size)

** Affects: nova
     Importance: Undecided
         Status: New

** Patch added: "Patch for nova - ceph RBD image size bug"
   https://bugs.launchpad.net/bugs/1361317/+attachment/4186839/+files/imagebackend.py.patch

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1361317

Title:
  Nova creates volume images of wrong size in Ceph RBD

Status in OpenStack Compute (Nova):
  New

Bug description:
  When spawning a new instance and using the Boot from Image option,
  nova will create images of the wrong size on ceph RBD.  This problem
  shows up as the image being several orders of magnitude larger than
  the requested size in ceph (i.e. 1TB in size instead of 1GB in size).

  Configuration notes:
  - nova version 2.17.0
  - ceph version 0.80.1

  This can be verified using the rbd command line tool after spawning an instance.
  1) Start an instance of cirros using 1GB boot disk (m1.tiny)
  2) rbd -p vms ls          ( get the disk image name)
  3) rbd -p vms info <image name>

  The bug comes from a size conversion error in
  nova/virt/libvirt/imagebackend.py (lines 657-658, patch file attached)

      def _resize(self, volume_name, size):
          size = int(size) * units.Ki

  Should be:
      def _resize(self, volume_name, size):
          size = int(size)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1361317/+subscriptions


Follow ups

References