How to change ISCSI volumes IP

Asked by Marc DANO

Hi,

I have an issue since I had to change the public IP of my server. Config file and mysql db have been updated with the new IP. ISCSI targets have been deleted (LVM volumes are still there) and remap on the new IP address.

I am using Essex ubuntu package with tgtadm as iscsi helper.

When I launch nova-compute service, he is still looking for iscsi volumes on the old IP address. In the nova-compute.log I can see:
[...]
2012-08-12 14:00:19 CRITICAL nova [-] Unable to allow access for disk path /dev/disk/by-path/ip-192.168.1.179:3260-iscsi-iqn.2010-10.org.openstack:volume-00000008-lun-1: No such file or directory
2012-08-12 14:00:19 TRACE nova Traceback (most recent call last):
2012-08-12 14:00:19 TRACE nova File "/usr/bin/nova-compute", line 49, in <module>
2012-08-12 14:00:19 TRACE nova service.wait()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 413, in wait
2012-08-12 14:00:19 TRACE nova _launcher.wait()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 131, in wait
2012-08-12 14:00:19 TRACE nova service.wait()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2012-08-12 14:00:19 TRACE nova return self._exit_event.wait()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-08-12 14:00:19 TRACE nova return hubs.get_hub().switch()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-08-12 14:00:19 TRACE nova return self.greenlet.switch()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2012-08-12 14:00:19 TRACE nova result = function(*args, **kwargs)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
2012-08-12 14:00:19 TRACE nova server.start()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
2012-08-12 14:00:19 TRACE nova self.manager.init_host()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 253, in init_host
2012-08-12 14:00:19 TRACE nova self.reboot_instance(context, instance['uuid'])
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-08-12 14:00:19 TRACE nova return f(*args, **kw)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 159, in decorated_function
2012-08-12 14:00:19 TRACE nova function(self, context, instance_uuid, *args, **kwargs)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 183, in decorated_function
2012-08-12 14:00:19 TRACE nova sys.exc_info())
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-08-12 14:00:19 TRACE nova self.gen.next()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2012-08-12 14:00:19 TRACE nova return function(self, context, instance_uuid, *args, **kwargs)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 904, in reboot_instance
2012-08-12 14:00:19 TRACE nova reboot_type)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-08-12 14:00:19 TRACE nova return f(*args, **kw)
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 721, in reboot
2012-08-12 14:00:19 TRACE nova if self._soft_reboot(instance):
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 757, in _soft_reboot
2012-08-12 14:00:19 TRACE nova dom.create()
2012-08-12 14:00:19 TRACE nova File "/usr/lib/python2.7/dist-packages/libvirt.py", line 551, in create
2012-08-12 14:00:19 TRACE nova if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
2012-08-12 14:00:19 TRACE nova libvirtError: Unable to allow access for disk path /dev/disk/by-path/ip-192.168.1.179:3260-iscsi-iqn.2010-10.org.openstack:volume-00000008-lun-1: No such file or directory
2012-08-12 14:00:19 TRACE nova

Old IP is 192.168.1.179 and the new one is 192.168.100.1

At which point the old IP address can still be saved ?

Thanks,
Marc

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marc DANO (dano-marc0) said :
#1

nova.conf http://pastebin.com/LB69EE3f
full nova-compute.log after service start and stoped: http://pastebin.com/YFsAA7Ui

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

Did you update the provider_location field in the volumes table in the database with the new ip address?

Vish

Revision history for this message
Marc DANO (dano-marc0) said :
#3

Yes, I did but nova seem to be still looking at the old path.

I found a way to restart nova-compute by making links (ln) from current disk path to what nova-compute is looking.

Something like this: ln /dev/disk/by-path/ip-192.168.100.1\:3260-iscsi-iqn.2010-10.org.openstack\:volume-0000000a-lun-1 /dev/disk/by-path/ip-192.168.1.179\:3260-iscsi-iqn.2010-10.org.openstack\:volume-0000000a-lun-1

After that, everything is working. So I was able to backup concerned volumes delete them and create new ones. Freshly created volumes are using the good path...

Can you help with this problem?

Provide an answer of your own, or ask Marc DANO for more information if necessary.

To post a message you must log in.