Do not set vm error state when raise MigrationError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Low
|
Unassigned |
Bug Description
Control Node: 101.0.0.20(also has compute service , but do not use it)
Compute Node: 101.0.0.30
nova version:
2014.1.
in control node nova.conf
allow_resize_
and
in compute node nova.conf
allow_resize_
detail:
1. boot an instance in compute node
nova boot --image 51c4a908-
2. resize it to flavor type 1
nova resize migrate_test 1
3.the instance has set to error state when resize failed.
#nova list
+------
| a1424990-
+------
#nova show
....
| config_drive | |
| created | 2014-06-
| fault | {"message": "<class 'nova.exception
| | node) |
| | File \"/opt/
| | raise exception.
| | ", "created": "2014-06-
| flavor | m1.micro (84) |
| hostId | f73013b02903292
....
error log in compute node:
2014-06-10 11:54:48.372 ERROR nova.compute.
-4bc2-8c17-
2014-06-10 11:54:48.372 TRACE nova.compute.
st):
2014-06-10 11:54:48.372 TRACE nova.compute.
ompute/manager.py", line 5231, in _error_
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
ompute/manager.py", line 3111, in prep_resize
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
2014-06-10 11:54:48.372 TRACE nova.compute.
bug reason:
1. nova-scheduler is allowed to scheduler to compute node (due to controller nova.conf)
2. but nova-compute is not allowed to resize in same host (due to compute node nova.conf)
3.
a)compute side _prep_resize() function set instance into error state:
....
self._set_
...
then raise exception
b)
compute node reschedule the instance again, failed again
....
self._reschedul
exc_info, instance_type, reservations, request_spec,
filter_
...
c)compute store instance fault info
....
compute_
instance, exc_info[0], exc_info=exc_info)
additional:
no matter what the scheduler filter is using, instance should not be set to ERROR status just because scheduler doesn't find a appropriate host to do resize.
and we can not deal with vm in ERROR state unless we change it's state in db
description: | updated |
tags: | added: compute |
tags: | added: migrate resize |
tags: |
added: migration removed: migrate |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → lizheming (lizheming-li) |
Changed in nova: | |
assignee: | lizheming (lizheming-li) → nobody |
You should be able to use the reset-state API to get it out of ERROR state, unless it's deleting in which case you've got bug 1299139.