Ensure quota is set for BFV amphoras

At the moment role does not increase volumes quota for the project
when BFV is enabled for Octavia. This might lead to Amphora
failures to spawn-up once default quota (of 10 volumes) is reached.

With that we also calculate amout of diskspace required based on the
instance limit.

It also changes flavor to contain 0 disk if BFV is enabled to ensure
that ephemeral is not gonna be used.

Change-Id: Ia35948cd2381b13d3792fc0029d93a9e176c884c
This commit is contained in:
Dmitriy Rabotyagov 2024-09-27 18:12:55 +02:00
parent c091f3d2dd
commit 3b6f39ffbd
3 changed files with 23 additions and 2 deletions

View File

@ -72,7 +72,7 @@ octavia_barbican_enabled: false
## Cinder Volume
octavia_cinder_enabled: False
cinder_default_availability_zone: "{{ octavia_amp_availability_zone }}"
octavia_cinder_volume_size: 16
octavia_cinder_volume_size: 20
octavia_cinder_volume_type: "volumes-hdd"
## Database info
@ -365,7 +365,7 @@ octavia_health_manager_port: 5555
octavia_amp_flavor_name: "m1.amphora"
octavia_amp_ram: 1024
octavia_amp_vcpu: 1
octavia_amp_disk: 20
octavia_amp_disk: "{{ octavia_cinder_enabled | ternary(0, 20) }}"
# octavia_amp_extra_specs:
# only increase when it's a really busy system since this is by deployed host,
@ -715,12 +715,14 @@ octavia_ca_private_key_passphrase: "{{ octavia_cert_client_password }}"
# Quotas for the Octavia user - assuming active/passive topology
octavia_num_instances: 10000 # 5000 LB in active/passive
octavia_ram: "{{ (octavia_num_instances | int) * 1024 }}"
octavia_gigabytes: "{{ (octavia_num_volumes | int) * (octavia_cinder_volume_size | int) }}"
octavia_num_server_groups: "{{ ((octavia_num_instances | int) * 0.5) | int | abs }}"
octavia_num_server_group_members: 50
octavia_num_cores: "{{ octavia_num_instances }}"
octavia_num_secgroups: "{{ (octavia_num_instances | int) * 1.5 | int | abs }}" # average 3 listener per lb
octavia_num_ports: "{{ (octavia_num_instances | int) * 10 }}" # at least instances * 10
octavia_num_security_group_rules: "{{ (octavia_num_secgroups | int) * 100 }}"
octavia_num_volumes: "{{ octavia_num_instances }}"
## Tunable overrides
octavia_octavia_conf_overrides: {}

View File

@ -0,0 +1,17 @@
---
features:
- |
Added variables ``octavia_gigabytes`` and ``octavia_num_volumes`` to
control quota defenitions for the project where Octavia Amphorae is
being spawned.
fixes:
- |
Octavia role now handles quota defenition properly when BFV is set for
Amphorae by defining ``octavia_cinder_enabled: True``
upgrade:
- |
Changed default for ``octavia_cinder_volume_size`` to 20gb in order
to align with value of ``octavia_amp_disk``
- |
Amphorae flavor will have 0 disk set (through variable
``octavia_amp_disk``), when ``octavia_cinder_enabled: True``.

View File

@ -36,6 +36,7 @@
quotas:
- name: "{{ octavia_service_project_name }}"
cores: "{{ octavia_num_cores }}"
gigabytes: "{{ octavia_cinder_enabled | ternary(octavia_gigabytes, omit) }}"
instances: "{{ octavia_num_instances }}"
ram: "{{ octavia_ram }}"
server_groups: "{{ octavia_num_server_groups }}"
@ -43,6 +44,7 @@
security_group: "{{ octavia_num_secgroups }}"
security_group_rule: "{{ octavia_num_security_group_rules }}"
port: "{{ octavia_num_ports }}"
volumes: "{{ octavia_cinder_enabled | ternary(octavia_num_volumes, omit) }}"
# Network Resources
_octavia_networks:
networks: