nova/nova/tests/cells
Liam Young bfeae680bc Fix CellStateManagerFile init to failure
Currently, specifying a cells_config file in nova.conf causes
CellStateManager to fail and in turn stops the nova-cells service from
starting. The reason is that CellsManager creates an instance of
CellStateManager with no arguments. CellStateManager __new__ runs and
creates an instance of CellStateManagerFile which runs __new__ and
__init__ with cell_state_cls and cells_config_path set. At this point
__new__ returns CellStateManagerFile and the new instance's __init__
method is invoked (CellStateManagerFile.__init__) with the original
arguments (there weren't any) which then results in:
2014-04-29 11:52:05.240 16759 TRACE nova self.state_manager =
cell_state_manager()
2014-04-29 11:52:05.240 16759 TRACE nova TypeError: __init__() takes
exactly 3 arguments (1 given)

It seems reasonable for CellStateManagerFile to derive the
cells_config_path info for itself so I have updated the code with that
change and added unit tests to catch this bug and to check that the
correct managers are still returned

Closes-Bug: #1314677
(cherry picked from commit 695191fa89)

Conflicts:
	nova/tests/cells/test_cells_state_manager.py

Change-Id: I9021640515142a3ca95c2d9e7b03e19b529bc175
2014-10-06 08:55:10 +01:00
..
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
fakes.py Merge "Makes _PATH_CELL_SEP a public global variable" 2013-07-17 09:07:00 +00:00
test_cells_filters.py Utilizes assertIsNone and assertIsNotNone - tests/etc 2013-10-31 06:06:02 +09:00
test_cells_manager.py Add a new compute API method for deleting retired services 2014-02-21 16:50:23 -05:00
test_cells_messaging.py Do not fail cell's instance deletion, if it's missing info_cache 2014-09-19 00:52:06 -07:00
test_cells_rpc_driver.py Port to oslo.messaging 2014-02-01 09:53:24 +00:00
test_cells_rpcapi.py Cells: Send instance object for instance_delete_everywhere 2014-03-18 10:14:23 -04:00
test_cells_scheduler.py Fix regression issues with cells target filter 2013-09-10 21:25:52 +00:00
test_cells_state_manager.py Fix CellStateManagerFile init to failure 2014-10-06 08:55:10 +01:00
test_cells_utils.py Convert TestCases to NoDBTestCase 2013-09-21 20:46:04 +10:00
test_cells_weights.py Rename Openstack to OpenStack 2014-02-13 16:20:50 +08:00