Flavor Extra Spec and Image Properties Validation¶
Currently flavor extra-specs and image properties validation are done in separate places. If they are not compatible, the instance may fail to launch and go into an ERROR state, or may reschedule an unknown number of times depending on the virt driver behaviour.
As an end user I would like to have instant feedback if flavor extra spec or image properties are not valid or they are not compatible with each other so I can correct my configuration and retry the operation.
We want to validate the combination of the flavor extra-specs and image properties as early as possible once they’re both known.
If validation fails then synchronously return error to user.
We’d need to do this anywhere the flavor or image changes, so basically instance creation, rebuild, and resize. More precisely, rename _check_requested_image() to something more generic, take it out of _checks_for_create_and_rebuild(), modify it to check more things and call it from all three operations: creation, rebuild, and resize.
Only things that are not virt driver specific are validated.
Examples of validations to be added 1:
Call hardware.numa_get_constraints to validate all the various numa-related things. This is currently done only on _create_instance(), should be done for resize/rebuild as well.
Ensure that the cpu policy, cpu thread policy and emulator thread policy values are valid.
Validate the realtime mask.
Validate the number of serial ports.
Validate the cpu topology constraints.
quota:*settings (that are not virt driver specific) in the flavor.
Data model impact¶
REST API impact¶
Due to the new validations, users could face more 4xx errors for more cases than we did before in create/rebuild/resize operations.
Other end user impact¶
Other deployer impact¶
- Primary assignee:
Add validations mostly in nova/compute/api.py.
Add/update unit tests.
Update documentation/release-note if necessary depending on the new validations added.
Will add unit tests.