Activity log for bug #1406167

Date Who What changed Old value New value Message
2014-12-29 02:53:38 Yang Luo bug added bug
2015-01-01 01:46:14 Yang Luo description Summary: When block-migrating a vm between two compute nodes, if the destination node lacks ssh daemon or refuses ssh connection, the block-migration would fail and cause permanent damage to the vm, vm will be unusable and no easy way to recover. Scenario: Block-migrating a vm between two compute nodes Example: Compute Node 1: ly-compute1 (10.0.0.31) Compute Node 2: ly-compute2 (10.0.0.32) with VM: test11 The below tutorial is what I followed for openstack installation, it doesn't say about installing ssh support on compute nodes, so I didn't install ssh on both compute nodes. OpenStack Installation Guide for Ubuntu 12.04/14.04 (LTS) http://docs.openstack.org/icehouse/install-guide/install/apt/content/ Error occurs when I use the command "nova migrate --poll test11" trying to migrate vm "test11" from ly-compute2 to ly-compute1. both error message and log said that ssh connecting to 10.0.0.31 failed (because ssh daemon is NOT even installed.) And the vm "test11" will enter a vm_state error state. ********************************************************************* Tring to migrate: C:\Windows\system32>nova migrate --poll test11 Server migrating... 0% complete Error migrating server ERROR (InstanceInErrorState): Unexpected error while running command. Command: ssh 10.0.0.31 mkdir -p /var/lib/nova/instances/30c4dac1-f3bc-4e6a-8a38-ee49671eee6a Exit code: 255 Stdout: u'' Stderr: u'ssh: connect to host 10.0.0.31 port 22: Connection refused\r\n' ********************************************************************* dashboard log message: Unexpected error while running command. Command: ssh 10.0.0.31 mkdir -p /var/lib/nova/instances/30c4dac1-f3bc-4e6a-8a38-ee49671eee6a Exit code: 255 Stdout: u'' Stderr: u'ssh: connect to host 10.0.0.31 port 22: Connection refused\r\n' Code 500 Details File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 290, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3472, in resize_instance block_device_info) File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4954, in migrate_disk_and_power_off utils.execute('ssh', dest, 'mkdir', '-p', inst_base) File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 165, in execute return processutils.execute(*cmd, **kwargs) File "/usr/lib/python2.7/dist-packages/nova/openstack/common/processutils.py", line 195, in execute cmd=sanitized_cmd) ********************************************************************* Second time tring to migrate: C:\Windows\system32>nova migrate --poll test11 ERROR (Conflict): Cannot 'migrate' while instance is in vm_state error (HTTP 409) (Request-ID: req-ba3ca8e1-0753-40ac-9e2e-2f7c319ec691) ********************************************************************* Request: This fault is VERY DANGEROUS, because it will cause permanent damage to the vm of a user. The migrate_disk_and_power_off function from nova/virt/libvirt/driver.py should pre-check if ssh daemon is running on dest node, before the actual block-migration process. Summary: When block-migrating a vm between two compute nodes, if the destination node lacks ssh daemon or refuses ssh connection, the block-migration would fail and cause damage to the vm, vm will be in error state for a certain time. Scenario: Block-migrating a vm between two compute nodes Example: Compute Node 1: ly-compute1 (10.0.0.31) Compute Node 2: ly-compute2 (10.0.0.32) with VM: test11 The below tutorial is what I followed for openstack installation, it doesn't say about installing ssh support on compute nodes, so I didn't install ssh on both compute nodes. OpenStack Installation Guide for Ubuntu 12.04/14.04 (LTS) http://docs.openstack.org/icehouse/install-guide/install/apt/content/ Error occurs when I use the command "nova migrate --poll test11" trying to migrate vm "test11" from ly-compute2 to ly-compute1. both error message and log said that ssh connecting to 10.0.0.31 failed (because ssh daemon is NOT even installed.) And the vm "test11" will enter a vm_state error state. ********************************************************************* Tring to migrate: C:\Windows\system32>nova migrate --poll test11 Server migrating... 0% complete Error migrating server ERROR (InstanceInErrorState): Unexpected error while running command. Command: ssh 10.0.0.31 mkdir -p /var/lib/nova/instances/30c4dac1-f3bc-4e6a-8a38-ee49671eee6a Exit code: 255 Stdout: u'' Stderr: u'ssh: connect to host 10.0.0.31 port 22: Connection refused\r\n' ********************************************************************* dashboard log message: Unexpected error while running command. Command: ssh 10.0.0.31 mkdir -p /var/lib/nova/instances/30c4dac1-f3bc-4e6a-8a38-ee49671eee6a Exit code: 255 Stdout: u'' Stderr: u'ssh: connect to host 10.0.0.31 port 22: Connection refused\r\n' Code 500 Details File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 290, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3472, in resize_instance block_device_info) File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4954, in migrate_disk_and_power_off utils.execute('ssh', dest, 'mkdir', '-p', inst_base) File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 165, in execute return processutils.execute(*cmd, **kwargs) File "/usr/lib/python2.7/dist-packages/nova/openstack/common/processutils.py", line 195, in execute cmd=sanitized_cmd) ********************************************************************* Second time tring to migrate: C:\Windows\system32>nova migrate --poll test11 ERROR (Conflict): Cannot 'migrate' while instance is in vm_state error (HTTP 409) (Request-ID: req-ba3ca8e1-0753-40ac-9e2e-2f7c319ec691) ********************************************************************* Request: This fault can be dangerous, because it will cause damage to the vm of a user. The migrate_disk_and_power_off function from nova/virt/libvirt/driver.py should pre-check if ssh daemon is running on dest node, before the actual block-migration process.
2015-01-01 01:46:31 Yang Luo nova: status New Confirmed
2015-01-01 01:46:51 Yang Luo tags compute libvirt nova-manage compute documentation libvirt
2015-02-10 21:18:50 jichenjc nova: assignee jichenjc (jichenjc)
2015-02-10 22:45:09 OpenStack Infra nova: status Confirmed In Progress
2015-02-18 16:35:26 Davanum Srinivas (DIMS) nova: importance Undecided Low
2015-03-03 21:29:55 OpenStack Infra nova: status In Progress Fix Committed
2015-03-20 07:40:35 Thierry Carrez nova: status Fix Committed Fix Released
2015-03-20 07:40:35 Thierry Carrez nova: milestone kilo-3
2015-04-30 09:23:48 Thierry Carrez nova: milestone kilo-3 2015.1.0