resize error on the same current host with enough vcpu resource
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Steps to reproduce
==================
A chronological list of steps which will bring off the
issue you noticed:
* I had a compute node, set allow_resize_
* I did boot a instance with flavor m1.tiny
1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True
* then I did boot my instance, let free vcpus of this compute node is 3
* then I did resize this instance use flavor 1-1 which vcpu number is 4.
| 1-1 | hanrong_cpu_4 | 512 | 1 | 0 | | 4 | 1.0 | True |
* then the instance was error.
{"message": "Insufficient compute resources: Free vcpu 3.00 VCPU < requested 4 VCPU.", "code": 400, "created": "2016-08-
Expected result
===============
I hope this instance resize successfully and freen vcpus of this compute node is 0 after resize.
Actual result
=============
instance error, and freen vcpus of this compute node is 3 after resize.
Environment
===========
1.
If this is from git, please provide
$ git log -1
commit 2b0557e4ee6737f
Merge: 40913fe 15a9458
Author: Jenkins <email address hidden>
Date: Thu Jun 16 01:51:48 2016 +0000
Merge "Added missed response to test_server_tags"
tags: | added: scheduler |
description: | updated |
Changed in nova: | |
assignee: | nobody → Charlotte Han (hanrong) |
Changed in nova: | |
assignee: | Charlotte Han (hanrong) → nobody |
tags: | added: resize |
Changed in nova: | |
assignee: | nobody → Maciej Szankin (mszankin) |
status: | New → In Progress |
description: | updated |
Changed in nova: | |
importance: | Undecided → Medium |
tags: |
added: compute removed: scheduler |
Changed in nova: | |
assignee: | Maciej Szankin (mszankin) → nobody |
status: | In Progress → Confirmed |
what's probably happening is it's hitting ComputeResource sUnavailable which triggers a reschedule, but since there is nowhere to reschedule to, it fails and is set to error.
yeah it gets into rt.resize_claim which does the claim test and raises the ComputeResource sUnavailable exception which can't reschedule b/c it's resize to same host / single node and that all happens within a _error_ out_instance_ on_exception context manager so the instance is put in error state.
so i guess you'd have to handle ComputeResource sUnavailable in _error_ out_instance_ on_exception and not set the instance to error state.