-
Bug
-
Resolution: Unresolved
-
Undefined
-
rhos-18.0.14 FR 4
To Reproduce:
Configure the image properties weigher to use os_version or os_admin_user.
[zuul@controller ~]$ oc exec nova-scheduler-0 -- cat /etc/nova/nova.conf.d/02-nova-override.conf [filter_scheduler] image_props_weight_setting = hw_cpu_threads=2, hw_cpu_policy=10, os_secure_boot=3, os_admin_user=5' image_props_weight_multiplier = 10000.0
Update image(s) to use those properties:
sh-5.1$ openstack image set fff1d34a-9bd5-4116-ba6e-6f447ed97692 --property os_secure_boot=optional --property os_admin_user=rootsh-5.1$ openstack server create --image fff1d34a-9bd5-4116-ba6e-6f447ed97692 --flavor m1.micro --network public osprh-19466-01 --wait
Schedule multiple guests with the above image:
sh-5.1$ openstack server create --image fff1d34a-9bd5-4116-ba6e-6f447ed97692 --flavor m1.micro --network public osprh-19466-01 --wait sh-5.1$ openstack server create --image fff1d34a-9bd5-4116-ba6e-6f447ed97692 --flavor m1.micro --network public osprh-19466-02 --wait
Monitor the raw weights in this example os_secure_boot is being taking into consideration but not os_admin_user:
2025-10-30 19:14:51.731 1 DEBUG nova.weights [None req-bb4b5c32-0821-41f5-b62f-946a710179eb - - - - - -] ImagePropertiesWeigher: raw weights {('compute-1.ctlplane.example.com', 'compute-1.ctlplane.example.com'): 3.0, ('compute-0.ctlplane.example.com', 'compute-0.ctlplane.example.com'): 0.0} get_weighed_objects /usr/lib/python3.9/site-packages/nova/weights.py:136^[[00m2025-10-30 19:14:51.732 1 DEBUG nova.weights [None req-bb4b5c32-0821-41f5-b62f-946a710179eb - - - - - -] ImagePropertiesWeigher: normalized weights {('compute-1.ctlplane.example.com', 'compute-1.ctlplane.example.com'): 1.0, ('compute-0.ctlplane.example.com', 'compute-0.ctlplane.example.com'): 0.0} get_weighed_objects /usr/lib/python3.9/site-packages/nova/weights.py:148^[[00m2025-10-30 19:14:51.732 1 DEBUG nova.weights [None req-bb4b5c32-0821-41f5-b62f-946a710179eb - - - - - -] ImagePropertiesWeigher: score (multiplier * weight) {('compute-1.ctlplane.example.com', 'compute-1.ctlplane.example.com'): '10000.0 * 1.0', ('compute-0.ctlplane.example.com', 'compute-0.ctlplane.example.com'): '10000.0 * 0.0'} get_weighed_objects /usr/lib/python3.9/site-packages/nova/weights.py:166^[[00m...2025-10-30 19:14:51.737 1 DEBUG nova.scheduler.manager [None req-bb4b5c32-0821-41f5-b62f-946a710179eb - - - - - -] Weighed [WeighedHost [host: (compute-1.ctlplane.example.com, compute-1.ctlplane.example.com) ram: 15053MB disk: 70656MB io_ops: 0 instances: 1, allocation_candidates: 1, weight: 10002.848119992505], WeighedHost [host: (compute-0.ctlplane.example.com, compute-0.ctlplane.example.com) ram: 15245MB disk: 71680MB io_ops: 0 instances: 0, allocation_candidates: 1, weight: 3.0]] _get_sorted_hosts /usr/lib/python3.9/site-packages/nova/scheduler/manager.py:697^[[00m
Expected behavior
- os_admin_user and os_version are taken into consideration as part of the raw weights