termie / nova-migration-demo

Nova is a cloud computing fabric controller (the main part of an IaaS system). It is written in Python.
http://openstack.org/projects/compute/
Apache License 2.0
2 stars 0 forks source link

nova-compute should logout an iSCSI target on migration failure #295

Open termie opened 13 years ago

termie commented 13 years ago

After failing to migrate an instance with an iSCSI volume to HOST A, we can no longer migrate any instances with an iSCSI volume to HOST A.

The error message from nova-compute is as follows: 2011-03-25 11:16:26,640 ERROR nova.rpc [-] ['Traceback (most recent call last):\n', ' File "/home/nttdata/nova/nova/rpc.py", line 183, in _receive\n rval = node_func(context=ctxt, **node_args)\n', ' File "/home/nttdata/nova/nova/compute/manager.py", line 875, in pre_live_migration\n self.volume_manager.setup_compute_volume(context, v[\'id\'])\n', ' File "/home/nttdata/nova/nova/volume/manager.py", line 164, in setup_compute_volume\n path = self.driver.discover_volume(context, volume_ref)\n', ' File "/home/nttdata/nova/nova/volume/driver.py", line 456, in discover_volume\n self._run_iscsiadm(iscsi_properties, "--login")\n', ' File "/home/nttdata/nova/nova/volume/driver.py", line 428, in _run_iscsiadm\n iscsi_command)\n', ' File "/home/nttdata/nova/nova/utils.py", line 173, in execute\n cmd=\' \'.join(cmd))\n', "ProcessExecutionError: Unexpected error while running command.\nCommand: sudo iscsiadm -m node -T iqn.2010-10.org.openstack:volume-00000001 -p 10.192.12.34:3260 --login\nExit code: 255\nStdout: 'Logging in to [iface: default, target: iqn.2010-10.org.openstack:volume-00000001, portal: 10.192.12.34,3260]\n'\nStderr: 'iscsiadm: Could not login to [iface: default, target: iqn.2010-10.org.openstack:volume-00000001, portal: 10.192.12.34,3260]: \niscsiadm: initiator reported error (15 - already exists)\n'\n"]


Imported from Launchpad using lp2gh.

termie commented 13 years ago

(by noguchimn) Before migrateToURI() in _live_migration() is called, nova-compute logs in an iSCSI target in pre_live_migration() if an iSCSI volume is attached to a migrating instance. If nova-compute doesn't log out a target on migration failure, when we try to migrate an instance to the same host, nova-compute tries to log in the same target as it has already logged in.