Skip to content

Commit 78e1327

Browse files
committed
add config for blazar flavor reservations
1 parent 1cd5029 commit 78e1327

File tree

3 files changed

+134
-1
lines changed

3 files changed

+134
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
enable_blazar_allocation_enforcement: false
4+
5+
blazar_randomize_hosts: false
6+
7+
blazar_project_enforcement_id: charge_code
8+
# When to send lease notification email
9+
blazar_minutes_before_end_lease: 2880
10+
blazar_default_max_lease_duration: "{{ 60 * 60 * 24 * 7 }}"
11+
blazar_default_reservation_extension_window: 172800
12+
blazar_usage_default_allocated: 20000.0
13+
# Redis currently binds on public IP, use public FQDN
14+
blazar_usage_db_host: "{{ kolla_external_fqdn }}"
15+
blazar_usage_project_exemptions: []
16+
blazar_external_service_check_create_endpoint: "{{ chameleon_portal_url }}/api/balance_service/v2/check-create/"
17+
blazar_external_service_check_update_endpoint: "{{ chameleon_portal_url }}/api/balance_service/v2/check-update/"
18+
blazar_external_service_on_end_endpoint: "{{ chameleon_portal_url }}/api/balance_service/v2/on-end/"
19+
blazar_floatingip_billrate: 0.0
20+
21+
# TODO: support looking up network with this name and fetching ID
22+
# blazar_floatingip_reservation_network: public
23+
24+
blazar_database_name: blazar
25+
blazar_database_user: blazar
26+
blazar_database_port: "{{ database_port }}"
27+
blazar_email_relay: "127.0.0.1"
28+
blazar_api_allocation_extras: user_name
29+
blazar_host_default_resource_properties: '["=", "\$node_type", "compute_skylake"]'
30+
blazar_host_retry_without_default_resources: yes
31+
blazar_enable_plugin_network: yes
32+
blazar_network_default_resource_properties: '["=", "\$stitch_provider", "none"]'
33+
blazar_network_retry_without_default_resources: no
34+
blazar_floatingip_reservation_network_regex: "[pP]ublic"
35+
blazar_host_url_format: "https://chameleoncloud.org/hardware/node/sites/{{ chameleon_site_name }}/clusters/chameleon/nodes/{hypervisor_hostname}/"
36+
blazar_physical_polling_monitor: true
37+
blazar_physical_polling_monitor_dry_run: true
38+
blazar_fip_polling_monitor: true
39+
blazar_fip_polling_monitor_dry_run: true
40+
blazar_network_polling_monitor: true
41+
blazar_network_polling_monitor_dry_run: true
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[DEFAULT]
2+
os_region_name = {{ openstack_region_name }}
3+
4+
[enforcement]
5+
{# note: important to preserve newline after this #}
6+
exempt_projects = {% for project_id in blazar_usage_project_exemptions %}{{ project_id }}{% if not loop.last %},{% endif %}{% endfor %}
7+
8+
{% if enable_blazar_allocation_enforcement | bool %}
9+
enabled_filters = MaxLeaseDurationFilter, ExternalServiceFilter
10+
{% if blazar_external_service_endpoint is defined %}
11+
external_service_base_endpoint = {{ blazar_external_service_endpoint }}
12+
{% endif %}
13+
{% if blazar_external_service_check_create_endpoint is defined %}
14+
external_service_check_create_endpoint = {{ blazar_external_service_check_create_endpoint }}
15+
{% endif %}
16+
{% if blazar_external_service_check_update_endpoint is defined %}
17+
external_service_check_update_endpoint = {{ blazar_external_service_check_update_endpoint }}
18+
{% endif %}
19+
{% if blazar_external_service_on_end_endpoint is defined %}
20+
external_service_on_end_endpoint = {{ blazar_external_service_on_end_endpoint }}
21+
{% endif %}
22+
{% else %}
23+
enabled_filters = MaxLeaseDurationFilter
24+
{% endif %}
25+
max_lease_duration = {{ blazar_default_max_lease_duration }}
26+
reservation_extension_window = {{ blazar_default_reservation_extension_window }}
27+
28+
[keystone_authtoken]
29+
region_name = {{ openstack_region_name }}
30+
31+
[manager]
32+
{# note: important to preserve newline after this #}
33+
plugins = network.plugin,virtual.floatingip.plugin{% if enable_nova | bool %},physical.host.plugin{% endif %}{% if enable_zun | bool %},device.plugin{% endif %}{% if blazar_enable_flavor_reservation | bool %},flavor.instance.plugin{% endif %}
34+
35+
minutes_before_end_lease = {{ blazar_minutes_before_end_lease }}
36+
37+
[oslo_messaging_notifications]
38+
# Experiment Precis requires 2.0 message format, i.e. set driver to messagingv2
39+
driver = messagingv2
40+
41+
[oslo_messaging_rabbit]
42+
# Currently needed (Xena) to avoid eventlet deadlock issue
43+
heartbeat_in_pthread = false
44+
45+
{% if enable_ironic | bool %}
46+
[physical:host]
47+
before_end = email
48+
email_relay = {{ blazar_email_relay }}
49+
{% if blazar_email_port is defined %}
50+
email_port = {{ blazar_email_port }}
51+
{% endif %}
52+
{% if blazar_email_ssl is defined %}
53+
email_ssl = {{ blazar_email_ssl }}
54+
{% endif %}
55+
{% if blazar_email_user is defined %}
56+
email_user = {{ blazar_email_user }}
57+
{% endif %}
58+
{% if blazar_email_password is defined %}
59+
email_password = {{ blazar_email_password }}
60+
{% endif %}
61+
enable_polling_monitor = {{ blazar_physical_polling_monitor}}
62+
enable_polling_monitor_dry_run = {{ blazar_physical_polling_monitor_dry_run }}
63+
retry_allocation_without_defaults = {{ blazar_host_retry_without_default_resources | bool }}
64+
default_resource_properties = {{ blazar_host_default_resource_properties }}
65+
{% endif %}
66+
allow_reservation = {{ blazar_enable_host_reservation | bool }}
67+
randomize_host_selection = {{ blazar_randomize_hosts | bool }}
68+
69+
{% if enable_zun | bool %}
70+
[device]
71+
enable_polling_monitor = {{ blazar_zun_polling_monitor}}
72+
{% endif %}
73+
74+
[virtual:floatingip]
75+
billrate = {{ blazar_floatingip_billrate }}
76+
enable_polling_monitor = {{ blazar_fip_polling_monitor}}
77+
enable_polling_monitor_dry_run = {{ blazar_fip_polling_monitor_dry_run }}
78+
79+
[network]
80+
retry_allocation_without_defaults = {{ blazar_network_retry_without_default_resources | bool }}
81+
default_resource_properties = {{ blazar_network_default_resource_properties }}
82+
enable_polling_monitor = {{ blazar_network_polling_monitor}}
83+
enable_polling_monitor_dry_run = {{ blazar_network_polling_monitor_dry_run }}
84+
85+
[flavor:instance]
86+
randomize_host_selection = {{ blazar_randomize_hosts | bool }}
87+
# Note this configures if email is sent. Email relay uses host config.
88+
before_end = email
89+
90+
[api]
91+
allocation_extras = {{ blazar_api_allocation_extras }}

site-config/node_custom_config/nova.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[filter_scheduler]
22
available_filters = nova.scheduler.filters.all_filters
3-
enabled_filters = ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter
3+
available_filters = blazarnova.scheduler.filters.blazar_filter.BlazarFilter
4+
enabled_filters = ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter, BlazarFilter
45

56
[pci]
67

0 commit comments

Comments
 (0)