Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions kolla/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ backup_location: "{{ mariabackup_location if enable_mariabackup | bool else mysq
# Blazar
enable_blazar: yes
enable_blazar_allocation_enforcement: no
enable_blazar_max_lease_enforcement: no
blazar_project_enforcement_id: charge_code
# When to send lease notification email
blazar_minutes_before_end_lease: 2880
Expand Down Expand Up @@ -370,3 +371,10 @@ enable_image_cleaner: no

# Manila
default_share_type: cephfsnfstype

# Flavor reservation
blazar_enable_host_reservation: "{{ enable_nova | bool }}"
blazar_enable_flavor_reservation: no
blazar_randomize_hosts: no
# The trait which permits flavor reservation
blazar_flavor_reservation_trait: blazar_flavor_reservation
22 changes: 17 additions & 5 deletions kolla/node_custom_config/blazar.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ os_region_name = {{ openstack_region_name }}
{# note: important to preserve newline after this #}
exempt_projects = {% for project_id in blazar_usage_project_exemptions %}{{ project_id }}{% if not loop.last %},{% endif %}{% endfor %}

{% set filters = [] %}
{% if enable_blazar_max_lease_enforcement | bool %}
{% set _ = filters.append("MaxLeaseDurationFilter") %}
{% endif %}
{% if enable_blazar_allocation_enforcement | bool %}
enabled_filters = MaxLeaseDurationFilter, ExternalServiceFilter
{% set _ = filters.append("ExternalServiceFilter") %}
{% endif %}
enabled_filters = {{ filters | join(", ") }}

{% if blazar_external_service_endpoint is defined %}
external_service_base_endpoint = {{ blazar_external_service_endpoint }}
{% endif %}
Expand All @@ -19,9 +26,6 @@ external_service_check_update_endpoint = {{ blazar_external_service_check_update
{% if blazar_external_service_on_end_endpoint is defined %}
external_service_on_end_endpoint = {{ blazar_external_service_on_end_endpoint }}
{% endif %}
{% else %}
enabled_filters = MaxLeaseDurationFilter
{% endif %}
max_lease_duration = {{ blazar_default_max_lease_duration }}
reservation_extension_window = {{ blazar_default_reservation_extension_window }}

Expand All @@ -30,7 +34,7 @@ region_name = {{ openstack_region_name }}

[manager]
{# note: important to preserve newline after this #}
plugins = network.plugin,virtual.floatingip.plugin{% if enable_nova | bool %},physical.host.plugin{% endif %}{% if enable_zun | bool %},device.plugin{% endif %}
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 %}

minutes_before_end_lease = {{ blazar_minutes_before_end_lease }}

Expand Down Expand Up @@ -63,6 +67,8 @@ enable_polling_monitor_dry_run = {{ blazar_physical_polling_monitor_dry_run }}
retry_allocation_without_defaults = {{ blazar_host_retry_without_default_resources | bool }}
default_resource_properties = {{ blazar_host_default_resource_properties }}
{% endif %}
allow_reservation = {{ blazar_enable_host_reservation | bool }}
randomize_host_selection = {{ blazar_randomize_hosts | bool }}

{% if enable_zun | bool %}
[device]
Expand All @@ -80,5 +86,11 @@ default_resource_properties = {{ blazar_network_default_resource_properties }}
enable_polling_monitor = {{ blazar_network_polling_monitor}}
enable_polling_monitor_dry_run = {{ blazar_network_polling_monitor_dry_run }}

[flavor:instance]
randomize_host_selection = {{ blazar_randomize_hosts | bool }}
# Note this configures if email is sent. Email relay uses host config.
before_end = email
placement_reservation_permitted_trait = {{ blazar_flavor_reservation_trait }}

[api]
allocation_extras = {{ blazar_api_allocation_extras }}
8 changes: 6 additions & 2 deletions kolla/node_custom_config/horizon/custom_local_settings
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ OPENSTACK_BLAZAR_DEVICE_RESERVATION = {
'enabled': {{ enable_zun | bool }},
}
OPENSTACK_BLAZAR_HOST_RESERVATION = {
'enabled': {{ enable_nova | bool }},
'enabled': {{ enable_host_reservation | bool }},
'url_format': '{{ blazar_host_url_format }}',
}
OPENSTACK_BLAZAR_FLAVOR_RESERVATION = {
"enabled": {{ enable_flavor_reservation | bool}},
"blazar_flavor_reservation_trait": '{{ blazar_flavor_reservation_trait }}',
}
{% endif %}

# horizon themes are represented as a tuple of name, label, and path
Expand Down Expand Up @@ -193,4 +197,4 @@ OPENSTACK_MANILA_FEATURES = {
X_FRAME_OPTIONS = 'SAMEORIGIN'

# disable usage report on overview page
OPENSTACK_USE_SIMPLE_TENANT_USAGE = False
OPENSTACK_USE_SIMPLE_TENANT_USAGE = False
2 changes: 2 additions & 0 deletions kolla/node_custom_config/placement/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"placement:resource_providers:traits:list": "@"
"placement:resource_providers:list": "@"