Hi,
Working on implementation of ‘Support filtering of allocation_candidates by forbidden aggregates’ spec. Here we are trying to Test granular resource request.
Facing issue in configuring inventories for 'CUSTOM_RESOURCE_CLASS' and resulting into 'No Valid host found' whereas expecting host from placement.
So kindly help me here how one can set inventory for 'CUSTOM_RESOURCE_CLASS' because when the inventory is added for the custom resource class
'CUSTOM_RESOURCE_CLASS', it's getting removed when the compute service periodic task updates the inventory.
FYI, here are the steps followed:
'POST'-- /os-aggregates(Create aggregate)
i. Setting metadata (trait:HW_CPU_X86_SGX) on the aggregate agg1 by using:
'POST'-- /os-aggregates/{aggregate_id}/action(set metadata)
ii. Setting metadata (trait:STORAGE_DISK_SSD) on the aggregate agg2 by using:
'POST'-- /os-aggregates/{aggregate_id}/action(set metadata)
iii. Setting metadata (trait:CUSTOM_MAGIC, trait:HW_CPU_X86_MMX) on the aggregate agg3 by using:
'POST'-- /os-aggregates/{aggregate_id}/action(set metadata)
'POST'-- /os-aggregates/{aggregate_id}/action(Add host)
'POST'-- /flavors/{flavor_id}/os-extra_specs
'PUT'-- /resource_providers/{uuid}/traits
'POST'-- /resource_classes
openstack resource provider inventory set --resource CUSTOM_RESOURCE_CLASS:total=78 <RP1_uuid>
'PUT'-- /resource_providers/{uuid}/inventories/{resource_class}
'/allocation_candidates?limit=1000&member_of=%21in%3A442ca580-fd07-433c-9b67-c18fdeccbca1%2C61b8bb02-01e0-4e28-af4c-0ea4c828539a
&required=HW_CPU_X86_MMX&required1=CUSTOM_MAGIC&resources=DISK_GB%3A1%2CMEMORY_MB%3A512%2CVCPU%3A1&resources1=CUSTOM_RESOURCE_CLASS%3A1'
when the compute service periodic task updates the inventory. Therefore the instance is not getting booted on 'RP1'.
The error faced which we get is 'No Valid host found'.
Regards,
Vrushali Kamde.