Public bug reported: 1. devstack install master version enviroment.
[root@localhost nova(keystone_admin)]# git log -1 commit 01f5c73bf51e9aec69c23a730d4021b91d06fd8c Merge: a7d30ff dbe8c93 Author: Jenkins <[email protected]> Date: Thu Feb 25 00:11:59 2016 +0000 Merge "make microversion a client level construct for tests" 2. log [root@localhost nova(keystone_admin)]# nova show 21170da3-f45f-4c47-9625-5e916b84c5b9 +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Property | Value | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | localhost.localdomain | | OS-EXT-SRV-ATTR:hostname | hanrong | | OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain | | OS-EXT-SRV-ATTR:instance_name | instance-0000000e | | OS-EXT-SRV-ATTR:kernel_id | 96707814-65c1-4f2d-b236-4ba5160ea859 | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | 6e9addd7-00c9-4b65-9766-04cf3fc8d38b | | OS-EXT-SRV-ATTR:reservation_id | r-30xh6eek | | OS-EXT-SRV-ATTR:root_device_name | /dev/vda | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 4 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | error | | OS-SRV-USG:launched_at | 2016-02-26T09:09:34.000000 | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | True | | created | 2016-02-26T09:09:26Z | | fault | {"message": "Unexpected error while running command. | | | Command: qemu-img resize /opt/stack/data/nova/instances/21170da3-f45f-4c47-9625-5e916b84c5b9/disk 2147483648 | | | Exit code: 1 | | | Stdout: u'' | | | Stderr: u\"qemu-img: Could not open '/opt/stack/data/nova/instances/21170da3-f45f-", "code": 500, "details": " File \"/opt/stack/nova/nova/compute/manager.py\", line 377, in decorated_function | | | return function(self, context, *args, **kwargs) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 4021, in finish_resize | | | self._set_instance_obj_error_state(context, instance) | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 220, in __exit__ | | | self.force_reraise() | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 196, in force_reraise | | | six.reraise(self.type_, self.value, self.tb) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 4009, in finish_resize | | | disk_info, image_meta) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 3974, in _finish_resize | | | old_instance_type) | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 220, in __exit__ | | | self.force_reraise() | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 196, in force_reraise | | | six.reraise(self.type_, self.value, self.tb) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 3969, in _finish_resize | | | block_device_info, power_on) | | | File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 7276, in finish_migration | | | self._disk_resize(image, size) | | | File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 7257, in _disk_resize | | | disk.extend(image, size) | | | File \"/opt/stack/nova/nova/virt/disk/api.py\", line 164, in extend | | | utils.execute('qemu-img', 'resize', image.path, size) | | | File \"/opt/stack/nova/nova/utils.py\", line 390, in execute | | | return processutils.execute(*cmd, **kwargs) | | | File \"/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py\", line 371, in execute | | | cmd=sanitized_cmd) | | | ", "created": "2016-02-26T09:13:10Z"} | | flavor | m1.tiny (1) | | hostId | 2ab310e3cace7ca941aebce9d65872ac43608e14c1554f6a6c8524e2 | | id | 21170da3-f45f-4c47-9625-5e916b84c5b9 | | image | cirros-0.3.4-x86_64-uec (5e59aed6-4535-4f7d-9fec-4682a2466308) | | key_name | - | | locked | False | | metadata | {} | | name | hanrong | | os-extended-volumes:volumes_attached | [] | | private network | 10.0.0.4, fdbc:aa05:7e9e:0:f816:3eff:fe7a:d584 | | security_groups | default | | status | ERROR | | tenant_id | 66abfcd2c32149c0bb3bf6137d49568b | | updated | 2016-02-26T09:17:39Z | | user_id | 7a77e73e0ccd4ced96b4c335fa920788 | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ [root@localhost nova(keystone_admin)]# 3. steps * I did modify nova.conf file and config allow_resize_to_same_host is true. [root@localhost nova(keystone_admin)]# cat /etc/nova/nova.conf | grep same allow_resize_to_same_host = True * then I created a new flavor named "harnong" with Disk is 2 which is different with "m1.tiny" flavor 's disk. [root@localhost nova(keystone_admin)]# nova flavor-list +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True | | 111 | hanrong | 512 | 2 | 0 | | 1 | 1.0 | True | * then I created a server named "test_resize" using flavor "m1.tiny" and waited for this server is running. [root@localhost nova(keystone_admin)]# nova boot --image 5e59aed6-4535 -4f7d-9fec-4682a2466308 --flavor m1.tiny --nic net-id=9b0f9b63-47d8 -417c-98d9-95404ca19ccb hanrong * then I did resize operation and server was error. [root@localhost nova(keystone_admin)]# nova resize 21170da3-f45f-4c47-9625-5e916b84c5b9 111 [root@localhost nova(keystone_admin)]# nova list +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ | 21170da3-f45f-4c47-9625-5e916b84c5b9 | hanrong | ERROR | - | Shutdown | private=10.0.0.4, fdbc:aa05:7e9e:0:f816:3eff:fe7a:d584 | | ef5b591f-a076-4c00-a503-14152fdcc142 | instance3 | ACTIVE | - | Running | private=10.0.0.3, fdbc:aa05:7e9e:0:f816:3eff:fe14:79a4 | +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ Expected result: I expect resize with different disk at the same host is successful. ** Affects: nova Importance: Undecided Assignee: Rong Han ZTE (hanrong) Status: New ** Changed in: nova Assignee: (unassigned) => Rong Han ZTE (hanrong) -- 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/1551069 Title: resize instance at the same host failed. Status in OpenStack Compute (nova): New Bug description: 1. devstack install master version enviroment. [root@localhost nova(keystone_admin)]# git log -1 commit 01f5c73bf51e9aec69c23a730d4021b91d06fd8c Merge: a7d30ff dbe8c93 Author: Jenkins <[email protected]> Date: Thu Feb 25 00:11:59 2016 +0000 Merge "make microversion a client level construct for tests" 2. log [root@localhost nova(keystone_admin)]# nova show 21170da3-f45f-4c47-9625-5e916b84c5b9 +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Property | Value | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | localhost.localdomain | | OS-EXT-SRV-ATTR:hostname | hanrong | | OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain | | OS-EXT-SRV-ATTR:instance_name | instance-0000000e | | OS-EXT-SRV-ATTR:kernel_id | 96707814-65c1-4f2d-b236-4ba5160ea859 | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | 6e9addd7-00c9-4b65-9766-04cf3fc8d38b | | OS-EXT-SRV-ATTR:reservation_id | r-30xh6eek | | OS-EXT-SRV-ATTR:root_device_name | /dev/vda | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 4 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | error | | OS-SRV-USG:launched_at | 2016-02-26T09:09:34.000000 | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | True | | created | 2016-02-26T09:09:26Z | | fault | {"message": "Unexpected error while running command. | | | Command: qemu-img resize /opt/stack/data/nova/instances/21170da3-f45f-4c47-9625-5e916b84c5b9/disk 2147483648 | | | Exit code: 1 | | | Stdout: u'' | | | Stderr: u\"qemu-img: Could not open '/opt/stack/data/nova/instances/21170da3-f45f-", "code": 500, "details": " File \"/opt/stack/nova/nova/compute/manager.py\", line 377, in decorated_function | | | return function(self, context, *args, **kwargs) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 4021, in finish_resize | | | self._set_instance_obj_error_state(context, instance) | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 220, in __exit__ | | | self.force_reraise() | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 196, in force_reraise | | | six.reraise(self.type_, self.value, self.tb) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 4009, in finish_resize | | | disk_info, image_meta) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 3974, in _finish_resize | | | old_instance_type) | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 220, in __exit__ | | | self.force_reraise() | | | File \"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py\", line 196, in force_reraise | | | six.reraise(self.type_, self.value, self.tb) | | | File \"/opt/stack/nova/nova/compute/manager.py\", line 3969, in _finish_resize | | | block_device_info, power_on) | | | File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 7276, in finish_migration | | | self._disk_resize(image, size) | | | File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 7257, in _disk_resize | | | disk.extend(image, size) | | | File \"/opt/stack/nova/nova/virt/disk/api.py\", line 164, in extend | | | utils.execute('qemu-img', 'resize', image.path, size) | | | File \"/opt/stack/nova/nova/utils.py\", line 390, in execute | | | return processutils.execute(*cmd, **kwargs) | | | File \"/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py\", line 371, in execute | | | cmd=sanitized_cmd) | | | ", "created": "2016-02-26T09:13:10Z"} | | flavor | m1.tiny (1) | | hostId | 2ab310e3cace7ca941aebce9d65872ac43608e14c1554f6a6c8524e2 | | id | 21170da3-f45f-4c47-9625-5e916b84c5b9 | | image | cirros-0.3.4-x86_64-uec (5e59aed6-4535-4f7d-9fec-4682a2466308) | | key_name | - | | locked | False | | metadata | {} | | name | hanrong | | os-extended-volumes:volumes_attached | [] | | private network | 10.0.0.4, fdbc:aa05:7e9e:0:f816:3eff:fe7a:d584 | | security_groups | default | | status | ERROR | | tenant_id | 66abfcd2c32149c0bb3bf6137d49568b | | updated | 2016-02-26T09:17:39Z | | user_id | 7a77e73e0ccd4ced96b4c335fa920788 | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ [root@localhost nova(keystone_admin)]# 3. steps * I did modify nova.conf file and config allow_resize_to_same_host is true. [root@localhost nova(keystone_admin)]# cat /etc/nova/nova.conf | grep same allow_resize_to_same_host = True * then I created a new flavor named "harnong" with Disk is 2 which is different with "m1.tiny" flavor 's disk. [root@localhost nova(keystone_admin)]# nova flavor-list +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True | | 111 | hanrong | 512 | 2 | 0 | | 1 | 1.0 | True | * then I created a server named "test_resize" using flavor "m1.tiny" and waited for this server is running. [root@localhost nova(keystone_admin)]# nova boot --image 5e59aed6-4535 -4f7d-9fec-4682a2466308 --flavor m1.tiny --nic net-id=9b0f9b63-47d8 -417c-98d9-95404ca19ccb hanrong * then I did resize operation and server was error. [root@localhost nova(keystone_admin)]# nova resize 21170da3-f45f-4c47-9625-5e916b84c5b9 111 [root@localhost nova(keystone_admin)]# nova list +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ | 21170da3-f45f-4c47-9625-5e916b84c5b9 | hanrong | ERROR | - | Shutdown | private=10.0.0.4, fdbc:aa05:7e9e:0:f816:3eff:fe7a:d584 | | ef5b591f-a076-4c00-a503-14152fdcc142 | instance3 | ACTIVE | - | Running | private=10.0.0.3, fdbc:aa05:7e9e:0:f816:3eff:fe14:79a4 | +--------------------------------------+-----------+--------+------------+-------------+--------------------------------------------------------+ Expected result: I expect resize with different disk at the same host is successful. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1551069/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

