Even with multipathing properly configured on the Nova node and libvirt.iscsi_use_multipath set to True in nova.conf,
when controller A is taken over by controller B in a NetApp cDOT cluster, 'nova volume-attach <instance-id> <volume-id>'
errors out. Examination of the nova cpu logs in this circumstance shows that iscsiadm discovery is being run against
a portal whose IP belongs to the LIF on the downed controller:
2015-03-23 16:41:40.591 ERROR nova.virt.block_device [req-7eb90c08-93a8-4713-88e6-5931798597e1 admin demo] [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Driver failed to attac
h volume f792cc36-5f49-488d-ae77-79fe25012ac2 at /dev/vdc
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Traceback (most recent call last):
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/block_device.py", line 251, in attach
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] device_type=self['device_type'], encryption=encryption)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1036, in attach_volume
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] self._connect_volume(connection_info, disk_info)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 987, in _connect_volume
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] driver.connect_volume(connection_info, disk_info)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] return f(*args, **kwargs)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/libvirt/volume.py", line 403, in connect_volume
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] out = self._run_iscsiadm_discover(iscsi_properties)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/libvirt/volume.py", line 539, in _run_iscsiadm_discover
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] check_exit_code=[0, 255])[0] or ""
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/virt/libvirt/volume.py", line 809, in _run_iscsiadm_bare
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] check_exit_code=check_exit_code)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/opt/stack/nova/nova/utils.py", line 206, in execute
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] return processutils.execute(*cmd, **kwargs)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 233, in execute
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] cmd=sanitized_cmd)
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] ProcessExecutionError: Unexpected error while running command.
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m discovery -t sendtargets -p 172.20.124.43:3260
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Exit code: 4
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Stdout: u''
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024] Stderr: u'iscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: cannot make connection to 172.20.124.43: No route to host\niscsiadm: connection login retries (reopen_max) 5 exceeded\niscsiadm: Could not perform SendTargets discovery: encountered connection failure\n'
2015-03-23 16:41:40.591 TRACE nova.virt.block_device [instance: 1546a98d-6da6-4b04-b0b6-9ead3a511024]
Fix proposed to branch: master /review. openstack. org/169812
Review: https:/