From c53452e54e21801bbb501056a4213a4c0a1efeaf Mon Sep 17 00:00:00 2001 From: Nicholas Kuechler Date: Wed, 1 Oct 2025 17:19:13 -0500 Subject: [PATCH] feat(nova): Enables nova scheduler filters and adds docs on using them --- components/nova/values.yaml | 11 +++++++++++ docs/operator-guide/openstack-ironic.md | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/components/nova/values.yaml b/components/nova/values.yaml index e5e044d11..989e201b4 100644 --- a/components/nova/values.yaml +++ b/components/nova/values.yaml @@ -81,6 +81,17 @@ conf: api_max_retries: 90 # number of times to retry. default is 60. api_retry_interval: 10 # number of sesconds between retries. default is 2. + # https://docs.openstack.org/nova/2025.1/admin/scheduling.html#the-filter-scheduler + filter_scheduler: + available_filters: nova.scheduler.filters.all_filters + enabled_filters: + - ComputeFilter + - ComputeCapabilitiesFilter + - ImagePropertiesFilter + - ServerGroupAntiAffinityFilter + - ServerGroupAffinityFilter + - JsonFilter + console: # we are working with baremetal nodes and not QEMU so we don't need novnc or spice # connected to QEMU diff --git a/docs/operator-guide/openstack-ironic.md b/docs/operator-guide/openstack-ironic.md index 9c844715b..10444a693 100644 --- a/docs/operator-guide/openstack-ironic.md +++ b/docs/operator-guide/openstack-ironic.md @@ -66,6 +66,30 @@ Clean the node: openstack baremetal node clean --clean-steps raid-clean-steps.json --disable-ramdisk ${NODE_UUID} ``` +## Build nova server to specific ironic node + +Sometimes we need to build to a specific baremetal node. This can be accomplished by using the +[OpenStack Nova filter schedulers](https://docs.openstack.org/nova/2025.1/admin/scheduling.html#the-filter-scheduler) +hint: + +``` text +--hint query='["=","$hypervisor_hostname",""]' +``` + +Below is a full example, where UUID `86eb7354-cc10-4173-8ff2-d1ac2ea6befd` is a node +in the `openstack baremetal node list`: + +``` bash +openstack server create \ + --flavor gp2.small \ + --image 'My-Ubuntu-24.04' \ + --nic net-id=demo-project \ + --key-name team \ + --use-config-drive \ + --hint query='["=","$hypervisor_hostname","86eb7354-cc10-4173-8ff2-d1ac2ea6befd"]' \ + server-jsonfilter-test +``` + ## Troubleshooting Ironic Nodes ### Node History