nova/nova/tests/unit/compute
melanie witt 62bf0ef129 Disallow CONF.compute.max_disk_devices_to_attach = 0
The CONF.compute.max_disk_devices_to_attach option controls the maximum
number of disk devices allowed to attach to an instance. If it is set
to 0, it will literally allow no disk device for instances, preventing
them from being able to boot.

This adds a note to the config option help to call this out and changes
nova-compute to raise InvalidConfiguration during init_host if
[compute]max_disk_devices_to_attach has been set to 0. The nova-compute
service will fail to start if the option is set to 0.

Note: there doesn't appear to be any way to disallow particular values
in a oslo.config IntOpt other than the min/max values. Here we need the
min value to be -1 to represent unlimited. There is a 'choices' kwarg
available but that is only for enumerating valid values and we need to
allow any integer >= 1 as well.

Change-Id: I6e30468bc28f661ddc17937ab1de04a706f05063
Closes-Bug: #1897950
(cherry picked from commit 25a632a4e1)
(cherry picked from commit 8e12b81839)
(cherry picked from commit 4ad7e5e263)
2021-01-29 09:36:43 +00:00
..
monitors Do not log a warning about not using compute monitors 2019-04-04 14:32:53 -04:00
__init__.py
eventlet_utils.py
fake_resource_tracker.py Tests: autospecs all the mock.patch usages 2019-08-19 09:43:10 -05:00
test_claims.py objects: Add 'NUMACell.pcpuset' field 2019-09-18 00:21:10 +01:00
test_compute.py post live migration: don't call Neutron needlessly 2020-09-09 10:15:04 -04:00
test_compute_api.py Merge "compute: Validate a BDMs disk_bus when provided" into stable/train 2020-10-23 19:34:06 +00:00
test_compute_mgr.py Disallow CONF.compute.max_disk_devices_to_attach = 0 2021-01-29 09:36:43 +00:00
test_compute_utils.py Add nova.compute.utils.delete_image 2019-08-27 14:26:33 -04:00
test_compute_xen.py Remove mox in nova/tests/unit/virt/xenapi/stubs.py 2018-06-21 23:59:39 +00:00
test_flavors.py Make compute unit tests inherit from test.NoDBTestCase 2015-02-24 17:54:29 +02:00
test_host_api.py Follow up for pre-filter-disabled-computes series 2019-07-03 15:53:06 -04:00
test_instance_list.py Plumbing for ignoring list_records_by_skipping_down_cells 2019-02-08 16:28:28 -05:00
test_keypairs.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_multi_cell_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
test_provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
test_resource_tracker.py Join migration_context and flavor in Migration.instance 2019-11-14 22:06:53 +00:00
test_rpcapi.py compute: Use long_rpc_timeout in reserve_block_device_name 2019-12-02 20:09:55 +00:00
test_shelve.py Retrieve the allocations early 2019-09-13 08:50:35 +00:00
test_stats.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_virtapi.py Add VirtAPI.update_compute_provider_status 2019-07-02 11:45:40 -04:00