Resize to swapless flavor still looking for swap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Mounika Sreeram |
Bug Description
Description
===========
Resizing an instance with swap to a flavor without swap, the instance won't run because libvirt will still look after a swap file, for exemple, the default_swap_device in nova/instances table is still set to /dev/vdb after resizing.
The XML passed to libvirt still have the swap device defined.
Steps to reproduce
==================
* Create an instance with Swap
* Resize instance to a flavor without swap
* Try to start instance
Expected result
===============
The instance start without swap
Actual result
=============
Error in nova log
OSError: [Errno 2] No such file or directory: '/var/lib/
libvirt xml still have the swap defined
Environment
===========
rpm -qa | grep nova
openstack-
openstack-
openstack-
python2-
python-
openstack-
openstack-
openstack-
openstack-
rpm -qa | grep libvirt
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
rpm -qa | grep cinder
python-
python2-
openstack-
rpm -qa | grep lvm
lvm2-libs-
lvm2-2.
description: | updated |
tags: | added: libvirt |
Changed in nova: | |
status: | In Progress → Confirmed |
assignee: | jichenjc (jichenjc) → nobody |
tags: | added: resize |
Changed in nova: | |
assignee: | nobody → Mounika Sreeram (mounika1211) |
INFO nova.compute. manager [None req-0516127d- e96f-4a85- a050-70c058f77a 44 service nova] [instance: 2ebb3db1- e99f-4b5c- 85f4-ae3c9f93ca 79] Successfully reverted task state from resize_finish on failure for instance. rpc.server [None req-0516127d- e96f-4a85- a050-70c058f77a 44 service nova] Exception during message handling: libvirtError: Cannot access storage file '/opt/stack/ data/nova/ instances/ 2ebb3db1- e99f-4b5c- 85f4-ae3c9f93ca 79/disk. swap' (as uid:64055, gid:124): No such file or directory rpc.server Traceback (most recent call last): rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_messaging/ rpc/server. py", line 163, in _process_incoming rpc.server res = self.dispatcher .dispatch( message) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_messaging/ rpc/dispatcher. py", line 220, in dispatch rpc.server return self._do_ dispatch( endpoint, method, ctxt, args) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_messaging/ rpc/dispatcher. py", line 190, in _do_dispatch rpc.server result = func(ctxt, **new_args) rpc.server File "/opt/stack/ nova/nova/ exception_ wrapper. py", line 76, in wrapped rpc.server function_name, call_dict, binary) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_utils/ excutils. py", line 220, in __exit__ rpc.server self.force_ reraise( ) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_utils/ excutils. py", line 196, in force_reraise rpc.server six.reraise( self.type_ , self.value, self.tb) rpc.server File "/opt/stack/ nova/nova/ exception_ wrapper. py", line 67, in wrapped rpc.server return f(self, context, *args, **kw) rpc.server File "/opt/stack/ nova/nova/ compute/ manager. py", line 186, in decorated_function rpc.server "Error: %s", e, instance=instance) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_utils/ excutils. py", line 220, in __exit__ rpc.server self.force_ reraise( ) rpc.server File "/usr/local/ lib/python2. 7/dist- packages/ oslo_utils/ excutils. py", line 196, in force_reraise rpc.server six.reraise( self.type_ , self.value, self.tb) rpc.server File "/opt/stack/ nova/nova/ compute/ manager. py", line 156, in decorated_function rpc.server return function(self, context, *args, **kwargs) rpc.server File "/opt/stack/ nova/nova/ compute/ utils.py" , line 976, in decorated_function rpc.server return function(self, context, *args, **kwargs) rpc.server File "/opt/stack/ nova/nova/ compute/ manager. py", line 214, in decorated_function rpc.server kwargs['instance'], e, sys.exc_info()) rpc.server File "/usr/local/ lib/pyth. ..
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.