https://github.com/eandersson/nova-filter-example
https://github.com/eandersson/nova-filter-example
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eandersson/nova-filter-example
- Owner: eandersson
- Created: 2021-11-02T03:40:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-02T03:56:51.000Z (over 3 years ago)
- Last Synced: 2025-01-19T06:41:16.907Z (4 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Installation under devstack
---------------------------
Start with git cloning and installing the package on your system
```
sudo su - stack
git clone https://github.com/eandersson/nova-filter-example.git
cd nova-filter-example
pip install -e .
```Next modify `/etc/nova/nova.conf` to include your new filter. You need to add the new filter to both available_filters and to enabled_filters.
```
[filter_scheduler]
available_filters = nova.scheduler.filters.all_filters
available_filters = nova_filter_example.RandomFilter
track_instance_changes = False
enabled_filters = ComputeFilter,RandomFilter
```Finally, restart Nova.
```
sudo systemctl restart devstack@n-*
```You can confirm that your new random filter works by creating a VM and looking for the log lines we added. These lines will show up inside the nova-scheduler. You can access these logs using this command.
```
sudo journalctl -u devstack@n-sch -f -n 200
```
The logs will then look like this.
```
nova-scheduler DEBUG nova_filter_example [None req-uuid alt_demo admin] Allowing VM on host: ubuntu due to result: 1
nova-scheduler DEBUG nova_filter_example [None req-uuid alt_demo admin] Not Allowing VM on host: ubuntu due to result: 0
```