can not delete an instance when resizing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description
===========
When an instance task state is RESIZE_MIGRATED or RESIZE_FINISH, delete the instance will hint an error,
I found some problems with the code, because my flavor contains vram and instance at a special task state, a TypeError or an AttributeError will throw out.
Delete when instance at resize_migrated task state, AttributeError will throw out.
Delete when instance at resize_finish task state, TypeError will throw out.
Steps to reproduce
==================
1.create an instance use flavor1,names server1
2.resize it but not resize confirm.
3.delete the instance quickly.
4.you can run " nova resize service1 flavor2 && sleep 2.0 && nova delete server1 ".
Just delete the instance quickly
When resize an instance, its task state will go through None => resize_migrating => resize_migrated => resize_finish => None, the purpose of sleep is to catch the target state,resize_
Environment
===========
RDO Newton
DevStack (master=pike)
Logs & Configs
==============
Traceback (most recent call last):
File "/usr/lib/
return f(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return function(self, context, instance, *args, **kwargs)
File "/usr/lib/
return fn(self, context, instance, *args, **kwargs)
File "/usr/lib/
return f(self, context, instance, *args, **kw)
File "/usr/lib/
self.
File "/usr/lib/
task_
File "/usr/lib/
quotas.
File "/usr/lib/
self.
File "/usr/lib/
six.
File "/usr/lib/
project_id, user_id)
File "/usr/lib/
instance_
TypeError: unsupported operand type(s) for +: 'int' and 'unicode'
OR
Traceback (most recent call last):
File "/usr/lib/
return f(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return function(self, context, instance, *args, **kwargs)
File "/usr/lib/
return fn(self, context, instance, *args, **kwargs)
File "/usr/lib/
return f(self, context, instance, *args, **kw)
File "/usr/lib/
self.
File "/usr/lib/
task_
File "/usr/lib/
quotas.
File "/usr/lib/
self.
File "/usr/lib/
six.
File "/usr/lib/
project_id, user_id)
File "/usr/lib/
instance_vcpus = old_flavor.vcpus
AttributeError: 'NoneType' object has no attribute 'vcpus'
Changed in nova: | |
assignee: | nobody → 赵明俊 (falseuser) |
description: | updated |
description: | updated |
tags: | added: api |
tags: |
added: compute removed: api |
Changed in nova: | |
status: | In Progress → Confirmed |
assignee: | 赵明俊 (falseuser) → nobody |
Fix proposed to branch: master /review. openstack. org/463466
Review: https:/