Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Volume migration fails "NotImplementedError: Swap only supports host devices"

Cinder is set up to use two separate ceph storage pools. When trying to migrate an attached volume; the new volume is created on the other pool, an error occurs, the migration fails, and the new volume is eventually deleted.

The only real error output I can find is in /var/log/nova/nova-compute.log
http://paste.openstack.org/raw/691729/

The conclusion that I take from the log is that cinder is correctly creating the new volume and contacting nova to copy the attached volume. Is it the switch from the old volume to the new volume where the error occurs? What does it mean by host devices? I haven't been able to find this error anywhere else. Do I have something misconfigured? How do I solve this?

The same error occurs regardless of:

  • The instance being powered on or off
  • The volume being root or not
  • ...

Let me know if there is anything you think I should try or any other information that would be useful.

Volume migration fails "NotImplementedError: Swap only supports host devices"

Cinder is set up to use two separate ceph storage pools. When trying to migrate an attached volume; the new volume is created on the other pool, an error occurs, the migration fails, and the new volume is eventually deleted.

The only real error output I can find is in /var/log/nova/nova-compute.log
http://paste.openstack.org/raw/691729/

2018-03-05 08:30:57.404 32084 INFO nova.compute.manager [req-6c1860ec-1a71-4b65-bc14-54a3fd7c7069 8bf003cdf58a4233b7e279aee1eec593 ee5d821a39174d8a91e3a741a6ecd97e - default default] [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc] Swapping volume fc8e2f25-60de-44b5-bddf-98a7d35a9c21 for 7f7bf267-2b5a-40b4-9ab6-8b509c5b45f6
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [req-6c1860ec-1a71-4b65-bc14-54a3fd7c7069 8bf003cdf58a4233b7e279aee1eec593 ee5d821a39174d8a91e3a741a6ecd97e - default default] [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc] Failed to swap volume fc8e2f25-60de-44b5-bddf-98a7d35a9c21 for 7f7bf267-2b5a-40b4-9ab6-8b509c5b45f6: NotImplementedError: Swap only supports host devices
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc] Traceback (most recent call last):
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 5058, in _swap_volume
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc]     resize_to)
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1349, in swap_volume
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc]     raise NotImplementedError(_("Swap only supports host devices"))
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc] NotImplementedError: Swap only supports host devices
2018-03-05 08:30:58.501 32084 ERROR nova.compute.manager [instance: 7249d430-743e-4463-8d28-d13cdb8cfddc] 
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server [req-6c1860ec-1a71-4b65-bc14-54a3fd7c7069 8bf003cdf58a4233b7e279aee1eec593 ee5d821a39174d8a91e3a741a6ecd97e - default default] Exception during message handling: NotImplementedError: Swap only supports host devices
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     result = func(ctxt, **new_args)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/exception_wrapper.py", line 76, in wrapped
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     function_name, call_dict, binary)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     self.force_reraise()
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/exception_wrapper.py", line 67, in wrapped
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     return f(self, context, *args, **kw)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 218, in decorated_function
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     kwargs['instance'], e, sys.exc_info())
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     self.force_reraise()
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 206, in decorated_function
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     return function(self, context, *args, **kwargs)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 5199, in swap_volume
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     is_cinder_migration)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 5098, in _swap_volume
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     context, new_attachment_id)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     self.force_reraise()
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 5058, in _swap_volume
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     resize_to)
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1349, in swap_volume
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server     raise NotImplementedError(_("Swap only supports host devices"))
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server NotImplementedError: Swap only supports host devices
2018-03-05 08:31:02.027 32084 ERROR oslo_messaging.rpc.server

The conclusion that I take from the log is that cinder is correctly creating the new volume and contacting nova to copy the attached volume. Is it the switch from the old volume to the new volume where the error occurs? What does it mean by host devices? I haven't been able to find this error anywhere else. Do I have something misconfigured? How do I solve this?

The same error occurs regardless of:

  • The instance being powered on or off
  • The volume being root or not
  • ...

Let me know if there is anything you think I should try or any other information that would be useful.