yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #38650
[Bug 1497218] [NEW] nova-api and nova-compute repeated examination “allow_resize_to_same_host”
Public bug reported:
1. version
kilo 2015.1.0
2. Relevant log files:
2.1 nova-scheduler.log
2015-09-18 12:57:03.981 21782 INFO nova.filters [req-87d25f64-fd40-49cc-
873c-6aad4da3ade9 9c67877ee37b47e989148a776862c7b8
40fc54dc632c4a02b44bf31d7ff15c82 - - -] Filter ComputeFilter returned 0
hosts for instance 02a31655-06da-47f7-a3e4-b3f654789cd2
2.2 nova-compute.log
2015-09-18 13:12:06.517 28500 ERROR nova.compute.manager [req-03981386-9782-49de-8134-aa5437adbbfd 9c67877ee37b47e989148a776862c7b8 40fc54dc632c4a02b44bf31d7ff15c82 - - -] [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] Setting instance vm_state to ERROR
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] Traceback (most recent call last):
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6748, in _error_out_instance_on_exception
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] yield
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4096, in prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] filter_properties)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4085, in prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] node, clean_shutdown)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4033, in _prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] raise exception.MigrationError(reason=msg)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] MigrationError: Migration error: destination same as source!
3. Reproduce steps:
3.1
I have one controller and one compute node。
create a VM
3.2
resize the VM in the following different situations:
----------------------------------------------------------------------------------------------------------------------------------------
ID | controller'S nova.conf | compute node'S nova.conf | resize'result | log |
----------------------------------------------------------------------------------------------------------------------------------------
1 | allow_resize_to_same_host=True | allow_resize_to_same_host=True | success | |
----------------------------------------------------------------------------------------------------------------------------------------
2 | allow_resize_to_same_host=false | allow_resize_to_same_host=True | failed | 2.1 |
-----------------------------------------------------------------------------------------------------------------------------------------
3 | allow_resize_to_same_host=True | allow_resize_to_same_host=false | failed | 2.2 |
-----------------------------------------------------------------------------------------------------------------------------------------
3.3
in the codes, has repeated examination “allow_resize_to_same_host” in nova/compute/api.py and nova/compute/manager.py
nova/compute/api.py has follow codes:
if not CONF.allow_resize_to_same_host:
filter_properties['ignore_hosts'].append(instance.host)
nova/compute/manager.py has follow codes:
elif same_host and not CONF.allow_resize_to_same_host:
self._set_instance_obj_error_state(context, instance)
msg = _('destination same as source!')
raise exception.MigrationError(reason=msg)
4 conclusion
modify “allow_resize_to_same_host” in nova.conf on controller need restart nova-api service
modify “allow_resize_to_same_host” in nova.conf on compute node need restart nova-scheduler service
you need modify multiple configs and restart multiple services on different host if you want resize a vm on same host
I think this way is very inconvenient and unnecessary
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1497218
Title:
nova-api and nova-compute repeated examination
“allow_resize_to_same_host”
Status in OpenStack Compute (nova):
New
Bug description:
1. version
kilo 2015.1.0
2. Relevant log files:
2.1 nova-scheduler.log
2015-09-18 12:57:03.981 21782 INFO nova.filters [req-87d25f64-fd40
-49cc-873c-6aad4da3ade9 9c67877ee37b47e989148a776862c7b8
40fc54dc632c4a02b44bf31d7ff15c82 - - -] Filter ComputeFilter returned
0 hosts for instance 02a31655-06da-47f7-a3e4-b3f654789cd2
2.2 nova-compute.log
2015-09-18 13:12:06.517 28500 ERROR nova.compute.manager [req-03981386-9782-49de-8134-aa5437adbbfd 9c67877ee37b47e989148a776862c7b8 40fc54dc632c4a02b44bf31d7ff15c82 - - -] [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] Setting instance vm_state to ERROR
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] Traceback (most recent call last):
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6748, in _error_out_instance_on_exception
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] yield
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4096, in prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] filter_properties)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4085, in prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] node, clean_shutdown)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4033, in _prep_resize
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] raise exception.MigrationError(reason=msg)
2015-09-18 13:12:06.517 28500 TRACE nova.compute.manager [instance: 02a31655-06da-47f7-a3e4-b3f654789cd2] MigrationError: Migration error: destination same as source!
3. Reproduce steps:
3.1
I have one controller and one compute node。
create a VM
3.2
resize the VM in the following different situations:
----------------------------------------------------------------------------------------------------------------------------------------
ID | controller'S nova.conf | compute node'S nova.conf | resize'result | log |
----------------------------------------------------------------------------------------------------------------------------------------
1 | allow_resize_to_same_host=True | allow_resize_to_same_host=True | success | |
----------------------------------------------------------------------------------------------------------------------------------------
2 | allow_resize_to_same_host=false | allow_resize_to_same_host=True | failed | 2.1 |
-----------------------------------------------------------------------------------------------------------------------------------------
3 | allow_resize_to_same_host=True | allow_resize_to_same_host=false | failed | 2.2 |
-----------------------------------------------------------------------------------------------------------------------------------------
3.3
in the codes, has repeated examination “allow_resize_to_same_host” in nova/compute/api.py and nova/compute/manager.py
nova/compute/api.py has follow codes:
if not CONF.allow_resize_to_same_host:
filter_properties['ignore_hosts'].append(instance.host)
nova/compute/manager.py has follow codes:
elif same_host and not CONF.allow_resize_to_same_host:
self._set_instance_obj_error_state(context, instance)
msg = _('destination same as source!')
raise exception.MigrationError(reason=msg)
4 conclusion
modify “allow_resize_to_same_host” in nova.conf on controller need restart nova-api service
modify “allow_resize_to_same_host” in nova.conf on compute node need restart nova-scheduler service
you need modify multiple configs and restart multiple services on different host if you want resize a vm on same host
I think this way is very inconvenient and unnecessary
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1497218/+subscriptions