the aggreates are populated in the hoststate object for usage by other filters and weighers the json filter was not designed to be used with them in general it was intend for use with the other filed that don't have dynamic subscriptable content. i.e. where the key si not know ahead of time the operations supprote dby it are basic comparsion that work on singal values with the excption fo in https://github.com/openstack/nova/blob/master/nova/scheduler/filters/json_fi... so you can check fi a instnce uuid is in the set of instnaces on a host that work becasue its a dict keyed by the instance uuid so in or container works since the aggreats are a list you cant check if a host aggregate is in the host aggregates list because you woudl have to construct a host aggret object for in to work so as i said above aggregates are not supported by this filter as it was not part of its original design. it was orginally inteded form matching onf files like hypervior_type or version https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py... On 10/12/2025 01:43, Andy Speagle wrote:
Hey Team,
I'm trying to use scheduler hints using the JsonFilter that involve host aggregates. Based on the documentation and my quick perusal of the scheduler's HostState class... it seems like $aggregates are populated there for usage, but I can't seem to find the right magick to make a json query work to schedule an instance on a host that belongs to a specific aggregate based on simply the name of the aggregate... or perhaps metadata contained within.
I think my lack of understanding of the structure of the $aggregates list in the scheduler's HostState class is tripping me up.
Does anyone have any insight into this?...
Thanks.