Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flavor reservation configuration #318

Open
wants to merge 2 commits into
base: stable/2023.1
Choose a base branch
from
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
5 changes: 5 additions & 0 deletions kolla/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,8 @@ enable_image_cleaner: no

# Manila
default_share_type: cephfsnfstype

# Flavor reservation
enable_host_reservation: "{{ enable_nova | bool }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it be more clear and consistent to name these labels with "blazar_", e.g. "blazar_enable_host_reservation".

enable_flavor_reservation: no
blazar_randomize_hosts: no
9 changes: 8 additions & 1 deletion kolla/node_custom_config/blazar.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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 enable_flavor_reservation | bool %},flavor.instance.plugin{% endif %}

minutes_before_end_lease = {{ blazar_minutes_before_end_lease }}

Expand Down Expand Up @@ -63,6 +63,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 = {{ enable_host_reservation | bool }}
randomize_host_selection = {{ blazar_randomize_hosts | bool }}

{% if enable_zun | bool %}
[device]
Expand All @@ -80,5 +82,10 @@ 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

[api]
allocation_extras = {{ blazar_api_allocation_extras }}
7 changes: 5 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,12 @@ 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}},
}
{% endif %}

# horizon themes are represented as a tuple of name, label, and path
Expand Down Expand Up @@ -193,4 +196,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
Loading