resize a instance,then revert the resize,excute cold migrate,error using ceph

Bug #1549194 reported by byhan
20
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

1.version: kilo&&liberty

 2.Relevant log files:

2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3895, in _finish_resize
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher block_device_info, power_on)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 6848, in finish_migration
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher fallback_from_host=migration.source_compute)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2861, in _create_image
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher instance, size, fallback_from_host)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 6282, in _try_fetch_image_cache
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher size=size)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 240, in cache
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher *args, **kwargs)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 783, in create_image
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher self.verify_base_size(base, size)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 290, in verify_base_size
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher flavor_size=base_size, image_size=size)
2016-02-24 16:45:20.549 1660 ERROR oslo_messaging.rpc.dispatcher FlavorDiskSmallerThanImage: Flavor's disk is too small for requested image. Flavor disk is 21474836480 bytes, image is 1073741824 bytes

3.Reproduce steps:
  3.1 resize a instance,Let us assume that it is testVM
  3.2 rever the resize
  3.3 cold migrate testVM

Expected result: cold migrate sucess
Actual result: cold migrate failed

Eli Qiao (taget-9)
Changed in nova:
assignee: nobody → Eli Qiao (taget-9)
Revision history for this message
Eli Qiao (taget-9) wrote :
Download full text (12.5 KiB)

hi

 I don't get your issue, please see below steps, can you detail your environment and your steps?

ubuntu@lm-1:~/devstack$ nova list
+--------------------------------------+-------+---------------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+---------------+------------+-------------+---------------------------------------------------------+
| 0cb800cb-6803-4403-976a-32c00f736cdc | test2 | VERIFY_RESIZE | - | Running | private=fd3f:22c2:65e6:0:f816:3eff:fef5:544a, 10.0.0.13 |
+--------------------------------------+-------+---------------+------------+-------------+---------------------------------------------------------+
ubuntu@lm-1:~/devstack$ nova resize-revert test2

ubuntu@lm-1:~/devstack$ nova list
virsh li+--------------------------------------+-------+---------------+------------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+---------------+------------------+-------------+---------------------------------------------------------+
| 0cb800cb-6803-4403-976a-32c00f736cdc | test2 | REVERT_RESIZE | resize_reverting | Running | private=fd3f:22c2:65e6:0:f816:3eff:fef5:544a, 10.0.0.13 |
+--------------------------------------+-------+---------------+------------------+-------------+---------------------------------------------------------+
----------------------------------------------------

ubuntu@lm-1:~/devstack$ nova show test2
+--------------------------------------+----------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | az2 |
| OS-EXT-SRV-ATTR:host | lm-2 |
| OS-EXT-SRV-ATTR:hostname | test2 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | lm-2 |
| OS-EXT-SRV-ATTR:instance_name | instance-00000011 |
| OS-EXT-SRV-ATTR:kernel_id | a80c2821-0ffc-42f6-941d-aae8b7011044 |
| OS-EXT-SRV-ATTR:launch_index | 0 ...

Changed in nova:
status: New → Incomplete
Revision history for this message
byhan (2005hanbaoying) wrote :

before cold migrate,you should resize the instance and then revert the resize

besides,the instance must be launched by image. using ceph

I have read the source ,find bug in here:
after resize, we will enlarge the size of image_cache
code path:D:\nova\nova\virt\libvirt\imagebackend.py

def create_image(self, prepare_template, base, size, *args, **kwargs):

        if not self.check_image_exists():
            prepare_template(target=base, max_size=size, *args, **kwargs)

        # prepare_template() may have cloned the image into a new rbd
        # image already instead of downloading it locally
        if not self.check_image_exists():
            self.driver.import_image(base, self.rbd_name)
        self.verify_base_size(base, size)

        if size and size > self.get_disk_size(self.rbd_name):
            self.driver.resize(self.rbd_name, size)

revert the resize ,the size of this image_cache did not become small
but the flavor become the smaller one

 means that:
 when cold migrate the instance, as we know running the same code as resize in openstack.
we will found flavor size is smaller than image_cache

verify_base_size throw exception

Revision history for this message
Augustina Ragwitz (auggy) wrote :

It looks like you've reported this issue against kilo and liberty, which are both at end of life. Can this issue be reproduced in Mitaka or in the current master?

Eli Qiao (taget-9)
Changed in nova:
assignee: Eli Qiao (taget-9) → nobody
Tang Chen (tangchen)
Changed in nova:
assignee: nobody → Tang Chen (tangchen)
Tang Chen (tangchen)
Changed in nova:
assignee: Tang Chen (tangchen) → nobody
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

Comment #2 gives the asked information. Liberty hasn't reached EOL yet. The report should be re-evaluated.

Changed in nova:
status: Incomplete → New
tags: added: ceph
Revision history for this message
John Garbutt (johngarbutt) wrote :

I am calling this confirmed due to: 1599067

summary: - resize a instance,then revert the resize,excute cold migrate,error
+ resize a instance,then revert the resize,excute cold migrate,error using
+ ceph
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version kilo in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.kilo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.