octavia 14.0.0__py3-none-any.whl → 15.0.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- octavia/amphorae/backends/agent/agent_jinja_cfg.py +1 -4
- octavia/amphorae/backends/agent/api_server/amphora_info.py +5 -5
- octavia/amphorae/backends/agent/api_server/keepalived.py +26 -53
- octavia/amphorae/backends/agent/api_server/keepalivedlvs.py +44 -83
- octavia/amphorae/backends/agent/api_server/loadbalancer.py +94 -112
- octavia/amphorae/backends/agent/api_server/lvs_listener_base.py +1 -1
- octavia/amphorae/backends/agent/api_server/osutils.py +11 -8
- octavia/amphorae/backends/agent/api_server/plug.py +12 -13
- octavia/amphorae/backends/agent/api_server/server.py +4 -3
- octavia/amphorae/backends/agent/api_server/templates/keepalived_lvs_check_script.sh.j2 +0 -4
- octavia/amphorae/backends/agent/api_server/util.py +23 -68
- octavia/amphorae/backends/agent/templates/amphora_agent_conf.template +0 -3
- octavia/amphorae/backends/health_daemon/health_daemon.py +6 -7
- octavia/amphorae/backends/health_daemon/health_sender.py +2 -2
- octavia/amphorae/backends/utils/haproxy_query.py +3 -6
- octavia/amphorae/backends/utils/interface.py +11 -50
- octavia/amphorae/backends/utils/interface_file.py +29 -16
- octavia/amphorae/backends/utils/ip_advertisement.py +1 -1
- octavia/amphorae/backends/utils/keepalivedlvs_query.py +7 -8
- octavia/amphorae/backends/utils/network_namespace.py +3 -3
- octavia/amphorae/backends/utils/nftable_utils.py +33 -11
- octavia/amphorae/drivers/driver_base.py +2 -2
- octavia/amphorae/drivers/haproxy/rest_api_driver.py +26 -38
- octavia/amphorae/drivers/health/heartbeat_udp.py +1 -1
- octavia/amphorae/drivers/keepalived/jinja/jinja_cfg.py +1 -2
- octavia/amphorae/drivers/keepalived/jinja/templates/keepalived_base.template +0 -1
- octavia/amphorae/drivers/noop_driver/driver.py +1 -1
- octavia/api/app.py +1 -2
- octavia/api/common/pagination.py +16 -22
- octavia/api/common/types.py +1 -1
- octavia/api/drivers/amphora_driver/v2/driver.py +6 -6
- octavia/api/drivers/driver_agent/driver_listener.py +3 -3
- octavia/api/drivers/driver_agent/driver_updater.py +1 -1
- octavia/api/drivers/noop_driver/driver.py +1 -1
- octavia/api/root_controller.py +2 -2
- octavia/api/v2/controllers/base.py +2 -4
- octavia/api/v2/controllers/health_monitor.py +5 -3
- octavia/api/v2/controllers/listener.py +2 -2
- octavia/api/v2/controllers/load_balancer.py +7 -0
- octavia/api/v2/controllers/member.py +12 -2
- octavia/api/v2/types/amphora.py +1 -1
- octavia/api/v2/types/availability_zone_profile.py +1 -2
- octavia/api/v2/types/availability_zones.py +1 -2
- octavia/api/v2/types/flavor_profile.py +1 -1
- octavia/api/v2/types/flavors.py +1 -1
- octavia/api/v2/types/health_monitor.py +1 -1
- octavia/api/v2/types/l7policy.py +1 -1
- octavia/api/v2/types/l7rule.py +1 -1
- octavia/api/v2/types/listener.py +3 -3
- octavia/api/v2/types/load_balancer.py +3 -3
- octavia/api/v2/types/member.py +2 -2
- octavia/api/v2/types/pool.py +2 -2
- octavia/api/v2/types/quotas.py +2 -2
- octavia/certificates/common/barbican.py +1 -1
- octavia/certificates/common/cert.py +1 -1
- octavia/certificates/generator/cert_gen.py +1 -1
- octavia/certificates/generator/local.py +5 -5
- octavia/certificates/manager/cert_mgr.py +1 -1
- octavia/certificates/manager/local.py +20 -20
- octavia/cmd/agent.py +3 -3
- octavia/cmd/driver_agent.py +2 -3
- octavia/cmd/health_checker.py +4 -4
- octavia/cmd/interface.py +4 -4
- octavia/cmd/prometheus_proxy.py +11 -13
- octavia/common/base_taskflow.py +3 -3
- octavia/common/clients.py +4 -4
- octavia/common/config.py +18 -24
- octavia/common/constants.py +28 -35
- octavia/common/data_models.py +2 -2
- octavia/common/jinja/haproxy/combined_listeners/jinja_cfg.py +5 -5
- octavia/common/jinja/logging/logging_jinja_cfg.py +1 -1
- octavia/common/jinja/lvs/jinja_cfg.py +1 -1
- octavia/common/jinja/user_data_jinja_cfg.py +1 -1
- octavia/common/keystone.py +1 -1
- octavia/common/policy.py +2 -3
- octavia/common/stats.py +1 -1
- octavia/common/tls_utils/cert_parser.py +2 -1
- octavia/common/utils.py +3 -3
- octavia/common/validate.py +9 -13
- octavia/compute/compute_base.py +1 -1
- octavia/compute/drivers/noop_driver/driver.py +1 -1
- octavia/compute/drivers/nova_driver.py +1 -1
- octavia/controller/healthmanager/health_manager.py +1 -1
- octavia/controller/housekeeping/house_keeping.py +2 -2
- octavia/controller/queue/v2/consumer.py +1 -2
- octavia/controller/queue/v2/endpoints.py +1 -1
- octavia/controller/worker/amphora_rate_limit.py +6 -6
- octavia/controller/worker/task_utils.py +1 -1
- octavia/controller/worker/v2/controller_worker.py +3 -3
- octavia/controller/worker/v2/flows/amphora_flows.py +15 -4
- octavia/controller/worker/v2/flows/flow_utils.py +6 -5
- octavia/controller/worker/v2/flows/health_monitor_flows.py +1 -1
- octavia/controller/worker/v2/flows/l7policy_flows.py +1 -1
- octavia/controller/worker/v2/flows/l7rule_flows.py +1 -1
- octavia/controller/worker/v2/flows/listener_flows.py +18 -6
- octavia/controller/worker/v2/flows/load_balancer_flows.py +1 -1
- octavia/controller/worker/v2/flows/member_flows.py +12 -19
- octavia/controller/worker/v2/flows/pool_flows.py +1 -1
- octavia/controller/worker/v2/taskflow_jobboard_driver.py +17 -3
- octavia/controller/worker/v2/tasks/compute_tasks.py +1 -3
- octavia/controller/worker/v2/tasks/network_tasks.py +3 -4
- octavia/db/base_models.py +21 -9
- octavia/db/migration/alembic_migrations/versions/034756a182a2_amphora_add_image_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/034b2dc2f3e0_modernize_l7policy_fields.py +31 -31
- octavia/db/migration/alembic_migrations/versions/0f242cf02c74_add_provider_column.py +2 -2
- octavia/db/migration/alembic_migrations/versions/10d38216ad34_add_timestamps_to_amphora.py +4 -4
- octavia/db/migration/alembic_migrations/versions/11e4bb2bb8ef_fix_ipv6_vip.py +1 -1
- octavia/db/migration/alembic_migrations/versions/13500e2e978d_update_url_and_name_size.py +6 -6
- octavia/db/migration/alembic_migrations/versions/14892634e228_update_vip.py +5 -5
- octavia/db/migration/alembic_migrations/versions/186509101b9b_add_server_group_id_to_loadbalancer.py +2 -2
- octavia/db/migration/alembic_migrations/versions/1afc932f1ca2_l7rule_support_client_cert.py +3 -3
- octavia/db/migration/alembic_migrations/versions/1e4c1d83044c_keepalived_configuration_datamodel.py +26 -26
- octavia/db/migration/alembic_migrations/versions/2351ea316465_adding_terminate_https_tls_ref_support.py +4 -4
- octavia/db/migration/alembic_migrations/versions/256852d5ff7c_add_lb_network_ip_to_amphora.py +2 -2
- octavia/db/migration/alembic_migrations/versions/27e54d00c3cd_add_monitor_address_and_port_to_member.py +4 -4
- octavia/db/migration/alembic_migrations/versions/298eac0640a7_add_amphora_vrrp_port_id_and_ha_port_id.py +4 -4
- octavia/db/migration/alembic_migrations/versions/29ff921a6eb_shared_pools.py +3 -3
- octavia/db/migration/alembic_migrations/versions/2ad093f6353f_add_listener_client_ca_tls_certificate_.py +2 -2
- octavia/db/migration/alembic_migrations/versions/31f7653ded67_allow_multiple_vips_per_loadbalancer.py +10 -10
- octavia/db/migration/alembic_migrations/versions/32e5c35b26a8_add_l7policy_and_l7rule_quota.py +4 -4
- octavia/db/migration/alembic_migrations/versions/357d17a6d5ac_update_lb_and_amphora_data_model_for_.py +20 -20
- octavia/db/migration/alembic_migrations/versions/35dee79d5865_initial_create.py +185 -185
- octavia/db/migration/alembic_migrations/versions/36b94648fef8_add_timestamp.py +2 -2
- octavia/db/migration/alembic_migrations/versions/392fb85b4419_add_primary_key_to_spares_pool.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3a1e1cdb7b27_rename_amphora_host_id.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3b199c848b96_create_no_monitor_operational_status.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3e5b37a0bdb9_add_vrrp_ip_and_ha_ip_to_amphora.py +4 -4
- octavia/db/migration/alembic_migrations/versions/3f8ff3be828e_create_quotas_table.py +12 -12
- octavia/db/migration/alembic_migrations/versions/43287cd10fef_make_pool_lb_algorithm_larger.py +6 -6
- octavia/db/migration/alembic_migrations/versions/443fe6676637_add_network_id_to_vip.py +2 -2
- octavia/db/migration/alembic_migrations/versions/44a2414dd683_adding_name_column_to_member_and_health_.py +1 -1
- octavia/db/migration/alembic_migrations/versions/458c9ee2a011_l7_policies_and_rules.py +57 -57
- octavia/db/migration/alembic_migrations/versions/46d914b2a5e5_seed_the_spares_pool_table.py +2 -2
- octavia/db/migration/alembic_migrations/versions/48660b6643f0_add_new_states_for_amphora.py +3 -3
- octavia/db/migration/alembic_migrations/versions/4aeb9e23ad43_add_draining_operating_status.py +1 -1
- octavia/db/migration/alembic_migrations/versions/4c094013699a_update_load_balancer_amphora.py +9 -9
- octavia/db/migration/alembic_migrations/versions/4f65b4f91c39_amphora_add_flavor_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/4faaa983e7a9_update_member_address_column.py +1 -1
- octavia/db/migration/alembic_migrations/versions/4fe8240425b4_update_vip_add_subnet_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/52377704420e_add_timestamps_to_healthmonitor.py +9 -9
- octavia/db/migration/alembic_migrations/versions/5309960964f8_add_proxy_protocol_for_pool.py +3 -3
- octavia/db/migration/alembic_migrations/versions/543f5d8e4e56_add_a_column_busy_in_table_amphora_health.py +2 -2
- octavia/db/migration/alembic_migrations/versions/55874a4ceed6_add_l7policy_action_redirect_prefix.py +5 -5
- octavia/db/migration/alembic_migrations/versions/5a3ee5472c31_add_cert_expiration__infor_in_amphora_table.py +4 -4
- octavia/db/migration/alembic_migrations/versions/62816c232310_fix_migration_for_mysql_5_7.py +1 -1
- octavia/db/migration/alembic_migrations/versions/6742ca1b27c2_add_l7policy_redirect_http_code.py +2 -2
- octavia/db/migration/alembic_migrations/versions/6ac558d7fc21_add_prometheus_listener_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/6ffc710674ef_spares_pool_table.py +2 -2
- octavia/db/migration/alembic_migrations/versions/7432f1d4ea83_add_http_host_head_inject_for_http_health_check.py +4 -4
- octavia/db/migration/alembic_migrations/versions/74aae261694c_extend_pool_for_backend_ca_and_crl.py +4 -4
- octavia/db/migration/alembic_migrations/versions/76aacf2e176c_extend_support_udp_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/80dba23a159f_tags_support.py +3 -3
- octavia/db/migration/alembic_migrations/versions/82b9402e71fd_update_vip_address_size.py +1 -1
- octavia/db/migration/alembic_migrations/versions/8ac4ed24df3a_add_availability_zone_to_lb.py +4 -4
- octavia/db/migration/alembic_migrations/versions/8b47b2546312_sctp_support.py +2 -2
- octavia/db/migration/alembic_migrations/versions/8c0851bdf6c3_change_tls_container_id_length_in_sni_.py +1 -1
- octavia/db/migration/alembic_migrations/versions/92fe9857279_create_healthmanager_table.py +3 -3
- octavia/db/migration/alembic_migrations/versions/9b5473976d6d_add_provisioning_status_to_objects.py +10 -10
- octavia/db/migration/alembic_migrations/versions/a1f689aecc1d_extend_pool_for_support_backend_reencryption.py +2 -2
- octavia/db/migration/alembic_migrations/versions/a7f187cd221f_add_tls_boolean_type_for_reencryption.py +2 -2
- octavia/db/migration/alembic_migrations/versions/b9c703669314_add_flavor_and_flavor_profile_table.py +18 -18
- octavia/db/migration/alembic_migrations/versions/ba35e0fb88e1_add_backup_field_to_member.py +2 -2
- octavia/db/migration/alembic_migrations/versions/bf171d0d91c3_amphora_add_cached_zone.py +2 -2
- octavia/db/migration/alembic_migrations/versions/c761c8a71579_add_availability_zone_table.py +15 -15
- octavia/db/migration/alembic_migrations/versions/d85ca7258d21_modernize_l7rule.py +13 -13
- octavia/db/migration/alembic_migrations/versions/da371b422669_allowed_cidr_for_listeners.py +7 -7
- octavia/db/migration/alembic_migrations/versions/dcf88e59aae4_add_lb_algorithm_source_ip_port.py +3 -3
- octavia/db/migration/alembic_migrations/versions/e37941b010db_add_lb_flavor_constraint.py +11 -11
- octavia/db/migration/alembic_migrations/versions/e6672bda93bf_add_ping_and_tlshello_monitor_types.py +3 -3
- octavia/db/migration/alembic_migrations/versions/e6ee84f0abf3_add_proxy_v2_pool_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/ebbcc72b4e5e_add_octavia_owned_vip_column_to_vip_.py +2 -2
- octavia/db/migration/alembic_migrations/versions/f21ae3f21adc_add_client_auth_option.py +6 -6
- octavia/db/migration/alembic_migrations/versions/fc5582da7d8a_create_amphora_build_rate_limit_tables.py +11 -11
- octavia/db/migration/alembic_migrations/versions/ffad172e98c1_add_certificate_revoke_list_option.py +2 -2
- octavia/db/models.py +1 -1
- octavia/db/repositories.py +3 -3
- octavia/distributor/drivers/driver_base.py +1 -1
- octavia/distributor/drivers/noop_driver/driver.py +1 -1
- octavia/hacking/checks.py +4 -4
- octavia/image/drivers/noop_driver/driver.py +1 -1
- octavia/image/image_base.py +1 -1
- octavia/network/base.py +1 -1
- octavia/network/drivers/neutron/allowed_address_pairs.py +11 -9
- octavia/network/drivers/neutron/base.py +3 -3
- octavia/network/drivers/noop_driver/driver.py +1 -1
- octavia/policies/amphora.py +6 -12
- octavia/policies/availability_zone.py +5 -10
- octavia/policies/availability_zone_profile.py +5 -15
- octavia/policies/base.py +1 -20
- octavia/policies/flavor.py +5 -10
- octavia/policies/flavor_profile.py +5 -10
- octavia/policies/healthmonitor.py +6 -12
- octavia/policies/l7policy.py +6 -12
- octavia/policies/l7rule.py +5 -10
- octavia/policies/listener.py +7 -14
- octavia/policies/loadbalancer.py +9 -18
- octavia/policies/member.py +5 -10
- octavia/policies/pool.py +6 -12
- octavia/policies/provider.py +1 -2
- octavia/policies/provider_availability_zone.py +1 -3
- octavia/policies/provider_flavor.py +1 -2
- octavia/policies/quota.py +6 -12
- octavia/statistics/stats_base.py +1 -1
- octavia/tests/common/constants.py +1 -1
- octavia/tests/common/data_model_helpers.py +10 -10
- octavia/tests/common/sample_data_models.py +1 -1
- octavia/tests/common/sample_haproxy_prometheus +17 -17
- octavia/tests/common/sample_octavia_prometheus +6 -6
- octavia/tests/common/utils.py +2 -2
- octavia/tests/functional/amphorae/backend/agent/api_server/test_keepalivedlvs.py +36 -62
- octavia/tests/functional/amphorae/backend/agent/api_server/test_server.py +135 -296
- octavia/tests/functional/api/drivers/driver_agent/test_driver_agent.py +10 -11
- octavia/tests/functional/api/v2/base.py +2 -3
- octavia/tests/functional/api/v2/test_amphora.py +6 -6
- octavia/tests/functional/api/v2/test_availability_zone_profiles.py +13 -14
- octavia/tests/functional/api/v2/test_availability_zones.py +19 -19
- octavia/tests/functional/api/v2/test_flavor_profiles.py +19 -20
- octavia/tests/functional/api/v2/test_flavors.py +25 -25
- octavia/tests/functional/api/v2/test_health_monitor.py +35 -18
- octavia/tests/functional/api/v2/test_l7policy.py +11 -11
- octavia/tests/functional/api/v2/test_l7rule.py +19 -20
- octavia/tests/functional/api/v2/test_listener.py +26 -28
- octavia/tests/functional/api/v2/test_load_balancer.py +17 -17
- octavia/tests/functional/api/v2/test_member.py +53 -21
- octavia/tests/functional/api/v2/test_pool.py +11 -11
- octavia/tests/functional/api/v2/test_provider.py +7 -7
- octavia/tests/functional/api/v2/test_quotas.py +9 -9
- octavia/tests/functional/db/test_models.py +1 -1
- octavia/tests/functional/db/test_repositories.py +2 -2
- octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py +60 -61
- octavia/tests/unit/amphorae/backends/agent/api_server/test_keepalived.py +3 -3
- octavia/tests/unit/amphorae/backends/agent/api_server/test_keepalivedlvs.py +1 -19
- octavia/tests/unit/amphorae/backends/agent/api_server/test_loadbalancer.py +94 -34
- octavia/tests/unit/amphorae/backends/agent/api_server/test_osutils.py +19 -21
- octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py +9 -11
- octavia/tests/unit/amphorae/backends/agent/api_server/test_util.py +11 -25
- octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py +0 -13
- octavia/tests/unit/amphorae/backends/health_daemon/test_health_daemon.py +10 -10
- octavia/tests/unit/amphorae/backends/utils/test_haproxy_query.py +1 -1
- octavia/tests/unit/amphorae/backends/utils/test_interface.py +33 -94
- octavia/tests/unit/amphorae/backends/utils/test_interface_file.py +32 -32
- octavia/tests/unit/amphorae/backends/utils/test_network_namespace.py +4 -6
- octavia/tests/unit/amphorae/backends/utils/test_nftable_utils.py +28 -22
- octavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver_1_0.py +77 -118
- octavia/tests/unit/amphorae/drivers/health/test_heartbeat_udp.py +8 -8
- octavia/tests/unit/amphorae/drivers/keepalived/jinja/test_jinja_cfg.py +0 -4
- octavia/tests/unit/api/common/test_pagination.py +84 -14
- octavia/tests/unit/api/v2/types/test_availability_zone_profile.py +1 -1
- octavia/tests/unit/api/v2/types/test_availability_zones.py +1 -1
- octavia/tests/unit/api/v2/types/test_flavor_profile.py +1 -1
- octavia/tests/unit/api/v2/types/test_flavors.py +1 -1
- octavia/tests/unit/api/v2/types/test_health_monitor.py +1 -1
- octavia/tests/unit/api/v2/types/test_listener.py +1 -1
- octavia/tests/unit/api/v2/types/test_load_balancer.py +1 -1
- octavia/tests/unit/api/v2/types/test_pool.py +1 -1
- octavia/tests/unit/base.py +1 -0
- octavia/tests/unit/certificates/generator/local_csr.py +1 -1
- octavia/tests/unit/certificates/generator/test_local.py +5 -5
- octavia/tests/unit/certificates/manager/test_barbican.py +2 -3
- octavia/tests/unit/certificates/manager/test_barbican_legacy.py +1 -1
- octavia/tests/unit/certificates/manager/test_local.py +13 -14
- octavia/tests/unit/cmd/test_health_checker.py +1 -1
- octavia/tests/unit/cmd/test_prometheus_proxy.py +8 -1
- octavia/tests/unit/common/jinja/haproxy/combined_listeners/test_jinja_cfg.py +171 -216
- octavia/tests/unit/common/jinja/logging/test_logging_jinja_cfg.py +1 -1
- octavia/tests/unit/common/sample_configs/sample_configs_combined.py +1 -2
- octavia/tests/unit/common/test_base_taskflow.py +1 -1
- octavia/tests/unit/common/test_decorators.py +2 -2
- octavia/tests/unit/common/test_policy.py +3 -6
- octavia/tests/unit/common/tls_utils/test_cert_parser.py +4 -1
- octavia/tests/unit/controller/worker/v2/flows/test_listener_flows.py +10 -15
- octavia/tests/unit/controller/worker/v2/flows/test_load_balancer_flows.py +4 -6
- octavia/tests/unit/controller/worker/v2/tasks/test_network_tasks.py +6 -2
- octavia/tests/unit/controller/worker/v2/tasks/test_retry_tasks.py +1 -1
- octavia/tests/unit/controller/worker/v2/test_controller_worker.py +56 -1
- octavia/tests/unit/controller/worker/v2/test_taskflow_jobboard_driver.py +348 -0
- octavia/tests/unit/hacking/test_checks.py +3 -3
- octavia/tests/unit/image/drivers/noop_driver/test_driver.py +1 -1
- octavia/tests/unit/image/drivers/test_glance_driver.py +1 -1
- octavia/tests/unit/network/drivers/neutron/test_base.py +1 -1
- octavia/tests/unit/statistics/drivers/test_update_db.py +1 -1
- octavia/tests/unit/statistics/test_stats_base.py +1 -1
- octavia/volume/drivers/noop_driver/driver.py +1 -1
- octavia/volume/volume_base.py +1 -1
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/AUTHORS +6 -0
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/METADATA +3 -5
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/RECORD +302 -305
- octavia-15.0.0.0rc1.dist-info/pbr.json +1 -0
- octavia/amphorae/backends/agent/api_server/templates/keepalived.sysvinit.j2 +0 -87
- octavia/amphorae/backends/agent/api_server/templates/keepalived.upstart.j2 +0 -29
- octavia/amphorae/backends/agent/api_server/templates/sysvinit.conf.j2 +0 -232
- octavia/amphorae/backends/agent/api_server/templates/upstart.conf.j2 +0 -71
- octavia-14.0.0.dist-info/pbr.json +0 -1
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/LICENSE +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/README.rst +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/README.rst +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/diskimage-create.sh +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/image-tests.sh +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/requirements.txt +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/test-requirements.txt +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/tox.ini +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/version.txt +0 -0
- {octavia-14.0.0.data → octavia-15.0.0.0rc1.data}/scripts/octavia-wsgi +0 -0
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/LICENSE +0 -0
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/WHEEL +0 -0
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/entry_points.txt +0 -0
- {octavia-14.0.0.dist-info → octavia-15.0.0.0rc1.dist-info}/top_level.txt +0 -0
octavia/common/clients.py
CHANGED
@@ -31,7 +31,7 @@ NOVA_VERSION = '2.15'
|
|
31
31
|
CINDER_VERSION = '3'
|
32
32
|
|
33
33
|
|
34
|
-
class NovaAuth
|
34
|
+
class NovaAuth:
|
35
35
|
nova_client = None
|
36
36
|
|
37
37
|
@classmethod
|
@@ -70,7 +70,7 @@ class NovaAuth(object):
|
|
70
70
|
return cls.nova_client
|
71
71
|
|
72
72
|
|
73
|
-
class NeutronAuth
|
73
|
+
class NeutronAuth:
|
74
74
|
neutron_client = None
|
75
75
|
|
76
76
|
@classmethod
|
@@ -127,7 +127,7 @@ class NeutronAuth(object):
|
|
127
127
|
return conn.network
|
128
128
|
|
129
129
|
|
130
|
-
class GlanceAuth
|
130
|
+
class GlanceAuth:
|
131
131
|
glance_client = None
|
132
132
|
|
133
133
|
@classmethod
|
@@ -166,7 +166,7 @@ class GlanceAuth(object):
|
|
166
166
|
return cls.glance_client
|
167
167
|
|
168
168
|
|
169
|
-
class CinderAuth
|
169
|
+
class CinderAuth:
|
170
170
|
cinder_client = None
|
171
171
|
|
172
172
|
@classmethod
|
octavia/common/config.py
CHANGED
@@ -148,14 +148,6 @@ amphora_agent_opts = [
|
|
148
148
|
cfg.StrOpt('agent_server_network_dir',
|
149
149
|
help=_("The directory where new network interfaces "
|
150
150
|
"are located")),
|
151
|
-
cfg.StrOpt('agent_server_network_file',
|
152
|
-
help=_("The file where the network interfaces are located. "
|
153
|
-
"Specifying this will override any value set for "
|
154
|
-
"agent_server_network_dir."),
|
155
|
-
deprecated_for_removal=True,
|
156
|
-
deprecated_reason=_('New amphora interface management '
|
157
|
-
'does not support single interface file.'),
|
158
|
-
deprecated_since='Xena'),
|
159
151
|
cfg.IntOpt('agent_request_read_timeout', default=180,
|
160
152
|
help=_("The time in seconds to allow a request from the "
|
161
153
|
"controller to run before terminating the socket.")),
|
@@ -317,13 +309,6 @@ health_manager_opts = [
|
|
317
309
|
default=10,
|
318
310
|
mutable=True,
|
319
311
|
help=_('Sleep time between sending heartbeats.')),
|
320
|
-
|
321
|
-
# Used for updating health
|
322
|
-
cfg.StrOpt('health_update_driver', default='health_db',
|
323
|
-
help=_('Driver for updating amphora health system.'),
|
324
|
-
deprecated_for_removal=True,
|
325
|
-
deprecated_reason=_('This driver interface was removed.'),
|
326
|
-
deprecated_since='Victoria'),
|
327
312
|
]
|
328
313
|
|
329
314
|
oslo_messaging_opts = [
|
@@ -396,8 +381,14 @@ haproxy_amphora_opts = [
|
|
396
381
|
cfg.StrOpt('haproxy_cmd', default='/usr/sbin/haproxy',
|
397
382
|
help=_("The full path to haproxy")),
|
398
383
|
cfg.IntOpt('respawn_count', default=2,
|
384
|
+
deprecated_for_removal=True,
|
385
|
+
deprecated_reason='upstart support has been removed and this '
|
386
|
+
'option is no longer used.',
|
399
387
|
help=_("The respawn count for haproxy's upstart script")),
|
400
388
|
cfg.IntOpt('respawn_interval', default=2,
|
389
|
+
deprecated_for_removal=True,
|
390
|
+
deprecated_reason='upstart support has been removed and this '
|
391
|
+
'option is no longer used.',
|
401
392
|
help=_("The respawn interval for haproxy's upstart script")),
|
402
393
|
cfg.FloatOpt('rest_request_conn_timeout', default=10,
|
403
394
|
help=_("The time in seconds to wait for a REST API "
|
@@ -422,11 +413,6 @@ haproxy_amphora_opts = [
|
|
422
413
|
help=_("The client certificate to talk to the agent")),
|
423
414
|
cfg.StrOpt('server_ca', default='/etc/octavia/certs/server_ca.pem',
|
424
415
|
help=_("The ca which signed the server certificates")),
|
425
|
-
cfg.BoolOpt('use_upstart', default=True,
|
426
|
-
deprecated_for_removal=True,
|
427
|
-
deprecated_reason='This is now automatically discovered '
|
428
|
-
' and configured.',
|
429
|
-
help=_("If False, use sysvinit.")),
|
430
416
|
cfg.IntOpt('api_db_commit_retry_attempts', default=15,
|
431
417
|
help=_('The number of times the database action will be '
|
432
418
|
'attempted.')),
|
@@ -507,9 +493,6 @@ controller_worker_opts = [
|
|
507
493
|
default='distributor_noop_driver',
|
508
494
|
help=_('Name of the distributor driver to use')),
|
509
495
|
cfg.ListOpt('statistics_drivers', default=['stats_db'],
|
510
|
-
deprecated_name='stats_update_driver',
|
511
|
-
deprecated_group='health_manager',
|
512
|
-
deprecated_since='Victoria',
|
513
496
|
help=_('List of drivers for updating amphora statistics.')),
|
514
497
|
cfg.StrOpt('loadbalancer_topology',
|
515
498
|
default=constants.TOPOLOGY_SINGLE,
|
@@ -588,6 +571,10 @@ task_flow_opts = [
|
|
588
571
|
'job id and claims for it.'),
|
589
572
|
cfg.StrOpt('jobboard_redis_sentinel', default=None,
|
590
573
|
help='Sentinel name if it is used for Redis.'),
|
574
|
+
cfg.StrOpt('jobboard_redis_sentinel_username',
|
575
|
+
help='Redis Sentinel server user name'),
|
576
|
+
cfg.StrOpt('jobboard_redis_sentinel_password', secret=True,
|
577
|
+
help='Redis Sentinel server password'),
|
591
578
|
cfg.DictOpt('jobboard_redis_backend_ssl_options',
|
592
579
|
help='Redis jobboard backend ssl configuration options.',
|
593
580
|
default={'ssl': False,
|
@@ -595,6 +582,13 @@ task_flow_opts = [
|
|
595
582
|
'ssl_certfile': None,
|
596
583
|
'ssl_ca_certs': None,
|
597
584
|
'ssl_cert_reqs': 'required'}),
|
585
|
+
cfg.DictOpt('jobboard_redis_sentinel_ssl_options',
|
586
|
+
help='Redis sentinel ssl configuration options.',
|
587
|
+
default={'ssl': False,
|
588
|
+
'ssl_keyfile': None,
|
589
|
+
'ssl_certfile': None,
|
590
|
+
'ssl_ca_certs': None,
|
591
|
+
'ssl_cert_reqs': 'required'}),
|
598
592
|
cfg.DictOpt('jobboard_zookeeper_ssl_options',
|
599
593
|
help='Zookeeper jobboard backend ssl configuration options.',
|
600
594
|
default={'use_ssl': False,
|
@@ -967,7 +961,7 @@ def handle_neutron_deprecations():
|
|
967
961
|
def init(args, **kwargs):
|
968
962
|
register_cli_opts()
|
969
963
|
cfg.CONF(args=args, project='octavia',
|
970
|
-
version='
|
964
|
+
version=f'%prog {version.version_info.release_string()}',
|
971
965
|
**kwargs)
|
972
966
|
validate.check_default_tls_versions_min_conflict()
|
973
967
|
setup_remote_debugger()
|
octavia/common/constants.py
CHANGED
@@ -694,9 +694,7 @@ MIN_QUOTA = QUOTA_UNLIMITED
|
|
694
694
|
MAX_QUOTA = 2000000000
|
695
695
|
|
696
696
|
HAPROXY_BASE_PEER_PORT = 1025
|
697
|
-
KEEPALIVED_JINJA2_UPSTART = 'keepalived.upstart.j2'
|
698
697
|
KEEPALIVED_JINJA2_SYSTEMD = 'keepalived.systemd.j2'
|
699
|
-
KEEPALIVED_JINJA2_SYSVINIT = 'keepalived.sysvinit.j2'
|
700
698
|
CHECK_SCRIPT_CONF = 'keepalived_check_script.conf.j2'
|
701
699
|
KEEPALIVED_CHECK_SCRIPT = 'keepalived_lvs_check_script.sh.j2'
|
702
700
|
|
@@ -722,26 +720,17 @@ AMP_ACTION_RELOAD = 'reload'
|
|
722
720
|
AMP_ACTION_RESTART = 'restart'
|
723
721
|
GLANCE_IMAGE_ACTIVE = 'active'
|
724
722
|
|
725
|
-
INIT_SYSTEMD = 'systemd'
|
726
|
-
INIT_UPSTART = 'upstart'
|
727
|
-
INIT_SYSVINIT = 'sysvinit'
|
728
|
-
INIT_UNKOWN = 'unknown'
|
729
|
-
VALID_INIT_SYSTEMS = (INIT_SYSTEMD, INIT_SYSVINIT, INIT_UPSTART)
|
730
723
|
INIT_PATH = '/sbin/init'
|
731
724
|
|
732
725
|
SYSTEMD_DIR = '/usr/lib/systemd/system'
|
733
|
-
SYSVINIT_DIR = '/etc/init.d'
|
734
|
-
UPSTART_DIR = '/etc/init'
|
735
726
|
|
736
727
|
INIT_PROC_COMM_PATH = '/proc/1/comm'
|
737
728
|
|
729
|
+
LOADBALANCER_SYSTEMD = 'haproxy-%s.service'
|
730
|
+
|
738
731
|
KEEPALIVED_SYSTEMD = 'octavia-keepalived.service'
|
739
|
-
KEEPALIVED_SYSVINIT = 'octavia-keepalived'
|
740
|
-
KEEPALIVED_UPSTART = 'octavia-keepalived.conf'
|
741
732
|
|
742
|
-
|
743
|
-
KEEPALIVED_SYSVINIT_PREFIX = 'octavia-keepalivedlvs-%s'
|
744
|
-
KEEPALIVED_UPSTART_PREFIX = 'octavia-keepalivedlvs-%s.conf'
|
733
|
+
KEEPALIVEDLVS_SYSTEMD = 'octavia-keepalivedlvs-%s.service'
|
745
734
|
|
746
735
|
# Authentication
|
747
736
|
KEYSTONE = 'keystone'
|
@@ -773,24 +762,24 @@ RULE_API_READ_QUOTA = 'rule:load-balancer:read-quota'
|
|
773
762
|
RULE_API_READ_QUOTA_GLOBAL = 'rule:load-balancer:read-quota-global'
|
774
763
|
RULE_API_WRITE_QUOTA = 'rule:load-balancer:write-quota'
|
775
764
|
|
776
|
-
RBAC_LOADBALANCER = '{}:loadbalancer:'
|
777
|
-
RBAC_LISTENER = '{}:listener:'
|
778
|
-
RBAC_POOL = '{}:pool:'
|
779
|
-
RBAC_MEMBER = '{}:member:'
|
780
|
-
RBAC_HEALTHMONITOR = '{}:healthmonitor:'
|
781
|
-
RBAC_L7POLICY = '{}:l7policy:'
|
782
|
-
RBAC_L7RULE = '{}:l7rule:'
|
783
|
-
RBAC_QUOTA = '{}:quota:'
|
784
|
-
RBAC_AMPHORA = '{}:amphora:'
|
785
|
-
RBAC_PROVIDER = '{}:provider:'
|
786
|
-
RBAC_PROVIDER_FLAVOR = '{}:provider-flavor:'
|
787
|
-
RBAC_PROVIDER_AVAILABILITY_ZONE = '{}:
|
788
|
-
|
789
|
-
RBAC_FLAVOR = '{}:flavor:'
|
790
|
-
RBAC_FLAVOR_PROFILE = '{}:flavor-profile:'
|
791
|
-
RBAC_AVAILABILITY_ZONE = '{}:availability-zone:'
|
792
|
-
RBAC_AVAILABILITY_ZONE_PROFILE = '{}:
|
793
|
-
|
765
|
+
RBAC_LOADBALANCER = f'{LOADBALANCER_API}:loadbalancer:'
|
766
|
+
RBAC_LISTENER = f'{LOADBALANCER_API}:listener:'
|
767
|
+
RBAC_POOL = f'{LOADBALANCER_API}:pool:'
|
768
|
+
RBAC_MEMBER = f'{LOADBALANCER_API}:member:'
|
769
|
+
RBAC_HEALTHMONITOR = f'{LOADBALANCER_API}:healthmonitor:'
|
770
|
+
RBAC_L7POLICY = f'{LOADBALANCER_API}:l7policy:'
|
771
|
+
RBAC_L7RULE = f'{LOADBALANCER_API}:l7rule:'
|
772
|
+
RBAC_QUOTA = f'{LOADBALANCER_API}:quota:'
|
773
|
+
RBAC_AMPHORA = f'{LOADBALANCER_API}:amphora:'
|
774
|
+
RBAC_PROVIDER = f'{LOADBALANCER_API}:provider:'
|
775
|
+
RBAC_PROVIDER_FLAVOR = f'{LOADBALANCER_API}:provider-flavor:'
|
776
|
+
RBAC_PROVIDER_AVAILABILITY_ZONE = (f'{LOADBALANCER_API}:'
|
777
|
+
f'provider-availability-zone:')
|
778
|
+
RBAC_FLAVOR = f'{LOADBALANCER_API}:flavor:'
|
779
|
+
RBAC_FLAVOR_PROFILE = f'{LOADBALANCER_API}:flavor-profile:'
|
780
|
+
RBAC_AVAILABILITY_ZONE = f'{LOADBALANCER_API}:availability-zone:'
|
781
|
+
RBAC_AVAILABILITY_ZONE_PROFILE = (f'{LOADBALANCER_API}:'
|
782
|
+
f'availability-zone-profile:')
|
794
783
|
|
795
784
|
RBAC_POST = 'post'
|
796
785
|
RBAC_PUT = 'put'
|
@@ -821,6 +810,10 @@ AMPHORAV2 = 'amphorav2'
|
|
821
810
|
# systemctl commands
|
822
811
|
DISABLE = 'disable'
|
823
812
|
ENABLE = 'enable'
|
813
|
+
STOP = 'stop'
|
814
|
+
START = 'start'
|
815
|
+
RESTART = 'restart'
|
816
|
+
RELOAD = 'reload'
|
824
817
|
|
825
818
|
# systemd amphora netns service prefix
|
826
819
|
AMP_NETNS_SVC_PREFIX = 'amphora-netns'
|
@@ -979,8 +972,8 @@ AMP_NET_DIR_TEMPLATE = '/etc/octavia/interfaces/'
|
|
979
972
|
NFT_ADD = 'add'
|
980
973
|
NFT_CMD = '/usr/sbin/nft'
|
981
974
|
NFT_FAMILY = 'inet'
|
982
|
-
|
983
|
-
|
975
|
+
NFT_RULES_FILE = '/var/lib/octavia/nftables-vip.rules'
|
976
|
+
NFT_TABLE = 'amphora_table'
|
977
|
+
NFT_CHAIN = 'amphora_chain'
|
984
978
|
NFT_VIP_CHAIN = 'amphora_vip_chain'
|
985
|
-
NFT_SRIOV_PRIORITY = '-310'
|
986
979
|
PROTOCOL = 'protocol'
|
octavia/common/data_models.py
CHANGED
@@ -26,7 +26,7 @@ from octavia.common import constants
|
|
26
26
|
LOG = logging.getLogger(__name__)
|
27
27
|
|
28
28
|
|
29
|
-
class BaseDataModel
|
29
|
+
class BaseDataModel:
|
30
30
|
def _to_dict(self, value, calling_classes=None, recurse=False):
|
31
31
|
calling_classes = calling_classes or []
|
32
32
|
# We need to have json convertible data for storing it in
|
@@ -228,7 +228,7 @@ class ListenerStatistics(BaseDataModel):
|
|
228
228
|
self.total_connections += other.total_connections
|
229
229
|
else:
|
230
230
|
raise TypeError( # noqa: O342
|
231
|
-
"unsupported operand type(s) for +=: '{
|
231
|
+
"unsupported operand type(s) for +=: '{}' and '{}'".format(
|
232
232
|
type(self), type(other)))
|
233
233
|
|
234
234
|
return self
|
@@ -60,7 +60,7 @@ CONF = cfg.CONF
|
|
60
60
|
JINJA_ENV = None
|
61
61
|
|
62
62
|
|
63
|
-
class JinjaTemplater
|
63
|
+
class JinjaTemplater:
|
64
64
|
|
65
65
|
def __init__(self,
|
66
66
|
base_amp_path=None,
|
@@ -175,9 +175,9 @@ class JinjaTemplater(object):
|
|
175
175
|
tls_certs,
|
176
176
|
feature_compatibility)
|
177
177
|
if not socket_path:
|
178
|
-
socket_path = '
|
179
|
-
|
180
|
-
state_file_path = '
|
178
|
+
socket_path = (f'{self.base_amp_path}/'
|
179
|
+
f'{listeners[0].load_balancer.id}.sock')
|
180
|
+
state_file_path = '{}/{}/servers-state'.format(
|
181
181
|
self.base_amp_path,
|
182
182
|
listeners[0].load_balancer.id) if feature_compatibility.get(
|
183
183
|
constants.SERVER_STATE_FILE) else ''
|
@@ -341,7 +341,7 @@ class JinjaTemplater(object):
|
|
341
341
|
if listener.tls_certificate_id:
|
342
342
|
ret_value['crt_list_filename'] = os.path.join(
|
343
343
|
CONF.haproxy_amphora.base_cert_dir,
|
344
|
-
loadbalancer.id, '{}.pem'
|
344
|
+
loadbalancer.id, f'{listener.id}.pem')
|
345
345
|
|
346
346
|
if tls_certs is not None:
|
347
347
|
if listener.client_ca_tls_certificate_id:
|
@@ -25,7 +25,7 @@ TEMPLATES_DIR = (os.path.dirname(os.path.realpath(__file__)) +
|
|
25
25
|
constants.LOGGING_TEMPLATES + '/')
|
26
26
|
|
27
27
|
|
28
|
-
class LoggingJinjaTemplater
|
28
|
+
class LoggingJinjaTemplater:
|
29
29
|
|
30
30
|
def __init__(self, logging_templates=None):
|
31
31
|
self.logging_templates = logging_templates or TEMPLATES_DIR
|
octavia/common/keystone.py
CHANGED
octavia/common/policy.py
CHANGED
@@ -137,9 +137,8 @@ class Policy(oslo_policy.Enforcer):
|
|
137
137
|
try:
|
138
138
|
result = self.enforce('context_is_admin', credentials, credentials)
|
139
139
|
except oslo_policy.InvalidScope as e:
|
140
|
-
# This will happen if the token being used is
|
141
|
-
#
|
142
|
-
# enabled.
|
140
|
+
# This will happen if the token being used is system scoped
|
141
|
+
# when scope checking is enabled.
|
143
142
|
LOG.warning(str(e))
|
144
143
|
return False
|
145
144
|
return result
|
octavia/common/stats.py
CHANGED
@@ -193,6 +193,7 @@ def _read_pem_blocks(data):
|
|
193
193
|
state = stSpam
|
194
194
|
if isinstance(data, bytes):
|
195
195
|
data = data.decode('utf-8')
|
196
|
+
certLines = []
|
196
197
|
for certLine in data.replace('\r', '').split('\n'):
|
197
198
|
if not certLine:
|
198
199
|
continue
|
@@ -299,7 +300,7 @@ def get_cert_expiration(certificate_pem):
|
|
299
300
|
try:
|
300
301
|
cert = x509.load_pem_x509_certificate(certificate_pem,
|
301
302
|
backends.default_backend())
|
302
|
-
return cert.
|
303
|
+
return cert.not_valid_after_utc
|
303
304
|
except Exception as e:
|
304
305
|
LOG.exception('Unreadable Certificate.')
|
305
306
|
raise exceptions.UnreadableCert from e
|
octavia/common/utils.py
CHANGED
@@ -104,8 +104,8 @@ def ip_port_str(ip_address, port):
|
|
104
104
|
"""Return IP port as string representation depending on address family."""
|
105
105
|
ip = ipaddress.ip_address(ip_address)
|
106
106
|
if ip.version == 4:
|
107
|
-
return "{ip}:{port}"
|
108
|
-
return "[{ip}]:{port}"
|
107
|
+
return f"{ip}:{port}"
|
108
|
+
return f"[{ip}]:{port}"
|
109
109
|
|
110
110
|
|
111
111
|
def netmask_to_prefix(netmask):
|
@@ -166,7 +166,7 @@ def expand_expected_codes(codes):
|
|
166
166
|
return retval
|
167
167
|
|
168
168
|
|
169
|
-
class exception_logger
|
169
|
+
class exception_logger:
|
170
170
|
"""Wrap a function and log raised exception
|
171
171
|
|
172
172
|
:param logger: the logger to log the exception default is LOG.exception
|
octavia/common/validate.py
CHANGED
@@ -198,26 +198,22 @@ def validate_l7rule_ssl_types(l7rule):
|
|
198
198
|
# key and value are not allowed
|
199
199
|
if req_key:
|
200
200
|
# log error or raise
|
201
|
-
msg = 'L7rule type {
|
202
|
-
rule_type)
|
201
|
+
msg = f'L7rule type {rule_type} does not use the "key" field.'
|
203
202
|
elif req_value.lower() != 'true':
|
204
|
-
msg = 'L7rule value {
|
205
|
-
req_value)
|
203
|
+
msg = f'L7rule value {req_value} is not a boolean True string.'
|
206
204
|
elif compare_type != constants.L7RULE_COMPARE_TYPE_EQUAL_TO:
|
207
|
-
msg = 'L7rule type {
|
205
|
+
msg = 'L7rule type {} only supports the {} compare type.'.format(
|
208
206
|
rule_type, constants.L7RULE_COMPARE_TYPE_EQUAL_TO)
|
209
207
|
|
210
208
|
if rule_type == constants.L7RULE_TYPE_SSL_VERIFY_RESULT:
|
211
209
|
if req_key:
|
212
210
|
# log or raise req_key not used
|
213
|
-
msg = 'L7rule type {
|
214
|
-
rule_type)
|
211
|
+
msg = f'L7rule type {rule_type} does not use the "key" field.'
|
215
212
|
elif not req_value.isdigit() or int(req_value) < 0:
|
216
213
|
# log or raise req_value must be int
|
217
|
-
msg = 'L7rule type {
|
218
|
-
rule_type)
|
214
|
+
msg = f'L7rule type {rule_type} needs a int value, which is >= 0'
|
219
215
|
elif compare_type != constants.L7RULE_COMPARE_TYPE_EQUAL_TO:
|
220
|
-
msg = 'L7rule type {
|
216
|
+
msg = 'L7rule type {} only supports the {} compare type.'.format(
|
221
217
|
rule_type, constants.L7RULE_COMPARE_TYPE_EQUAL_TO)
|
222
218
|
|
223
219
|
if rule_type == constants.L7RULE_TYPE_SSL_DN_FIELD:
|
@@ -227,9 +223,9 @@ def validate_l7rule_ssl_types(l7rule):
|
|
227
223
|
|
228
224
|
if not req_key or not req_value:
|
229
225
|
# log or raise key and value must be specified.
|
230
|
-
msg = 'L7rule type {
|
231
|
-
|
232
|
-
# log or raise the key must be
|
226
|
+
msg = (f'L7rule type {rule_type} needs to specify a '
|
227
|
+
f'key and a value.')
|
228
|
+
# log or raise the key must be splited by '-'
|
233
229
|
elif not dn_regex.match(req_key):
|
234
230
|
msg = 'Invalid L7rule distinguished name field.'
|
235
231
|
|
octavia/compute/compute_base.py
CHANGED
@@ -135,7 +135,7 @@ class VirtualMachineManager(compute_base.ComputeBase):
|
|
135
135
|
# device id = volume_id, device type and size unspecified,
|
136
136
|
# delete-on-terminate = true (volume will be deleted by Nova
|
137
137
|
# on instance termination)
|
138
|
-
block_device_mapping = {'vda': '
|
138
|
+
block_device_mapping = {'vda': f'{volume_id}:::true'}
|
139
139
|
amphora = self.manager.create(
|
140
140
|
name=name, image=image_id, flavor=amphora_flavor,
|
141
141
|
block_device_mapping=block_device_mapping,
|
@@ -27,7 +27,7 @@ LOG = logging.getLogger(__name__)
|
|
27
27
|
CONF = cfg.CONF
|
28
28
|
|
29
29
|
|
30
|
-
class DatabaseCleanup
|
30
|
+
class DatabaseCleanup:
|
31
31
|
def __init__(self):
|
32
32
|
self.amp_repo = repo.AmphoraRepository()
|
33
33
|
self.amp_health_repo = repo.AmphoraHealthRepository()
|
@@ -76,7 +76,7 @@ class DatabaseCleanup(object):
|
|
76
76
|
LOG.info('Deleted load balancer id : %s', lb_id)
|
77
77
|
|
78
78
|
|
79
|
-
class CertRotation
|
79
|
+
class CertRotation:
|
80
80
|
def __init__(self):
|
81
81
|
self.threads = CONF.house_keeping.cert_rotate_threads
|
82
82
|
self.cw = cw2.ControllerWorker()
|
@@ -53,8 +53,7 @@ class ConsumerService(cotyledon.Service):
|
|
53
53
|
if CONF.task_flow.jobboard_enabled:
|
54
54
|
for e in self.endpoints:
|
55
55
|
e.worker.services_controller.run_conductor(
|
56
|
-
'octavia-task-flow-conductor
|
57
|
-
uuidutils.generate_uuid())
|
56
|
+
f'octavia-task-flow-conductor-{uuidutils.generate_uuid()}')
|
58
57
|
|
59
58
|
def terminate(self):
|
60
59
|
if self.message_listener:
|
@@ -28,7 +28,7 @@ CONF = cfg.CONF
|
|
28
28
|
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
29
29
|
|
30
30
|
|
31
|
-
class AmphoraBuildRateLimit
|
31
|
+
class AmphoraBuildRateLimit:
|
32
32
|
|
33
33
|
def __init__(self):
|
34
34
|
self.amp_build_slots_repo = repo.AmphoraBuildSlotsRepository()
|
@@ -48,7 +48,7 @@ class AmphoraBuildRateLimit(object):
|
|
48
48
|
def has_build_slot(self):
|
49
49
|
build_rate_limit = CONF.haproxy_amphora.build_rate_limit
|
50
50
|
session = db_apis.get_session()
|
51
|
-
with session.begin(
|
51
|
+
with session.begin():
|
52
52
|
used_build_slots = (self.amp_build_slots_repo
|
53
53
|
.get_used_build_slots_count(session))
|
54
54
|
available_build_slots = build_rate_limit - used_build_slots
|
@@ -57,7 +57,7 @@ class AmphoraBuildRateLimit(object):
|
|
57
57
|
|
58
58
|
def has_highest_priority(self, amphora_id):
|
59
59
|
session = db_apis.get_session()
|
60
|
-
with session.begin(
|
60
|
+
with session.begin():
|
61
61
|
highest_priority_build_req = (
|
62
62
|
self.amp_build_req_repo.get_highest_priority_build_req(
|
63
63
|
session))
|
@@ -67,13 +67,13 @@ class AmphoraBuildRateLimit(object):
|
|
67
67
|
|
68
68
|
def update_build_status_and_available_build_slots(self, amphora_id):
|
69
69
|
session = db_apis.get_session()
|
70
|
-
with session.begin(
|
70
|
+
with session.begin():
|
71
71
|
self.amp_build_slots_repo.update_count(session, action='increment')
|
72
72
|
self.amp_build_req_repo.update_req_status(session, amphora_id)
|
73
73
|
|
74
74
|
def remove_from_build_req_queue(self, amphora_id):
|
75
75
|
session = db_apis.get_session()
|
76
|
-
with session.begin(
|
76
|
+
with session.begin():
|
77
77
|
self.amp_build_req_repo.delete(session, amphora_id=amphora_id)
|
78
78
|
self.amp_build_slots_repo.update_count(session, action='decrement')
|
79
79
|
LOG.debug("Removed request for %s from queue"
|
@@ -81,7 +81,7 @@ class AmphoraBuildRateLimit(object):
|
|
81
81
|
|
82
82
|
def remove_all_from_build_req_queue(self):
|
83
83
|
session = db_apis.get_session()
|
84
|
-
with session.begin(
|
84
|
+
with session.begin():
|
85
85
|
self.amp_build_req_repo.delete_all(session)
|
86
86
|
self.amp_build_slots_repo.update_count(session, action='reset')
|
87
87
|
LOG.debug("Removed all the build requests and "
|
@@ -55,7 +55,7 @@ def _is_provisioning_status_pending_update(lb_obj):
|
|
55
55
|
return not lb_obj.provisioning_status == constants.PENDING_UPDATE
|
56
56
|
|
57
57
|
|
58
|
-
class ControllerWorker
|
58
|
+
class ControllerWorker:
|
59
59
|
|
60
60
|
def __init__(self):
|
61
61
|
|
@@ -431,8 +431,8 @@ class ControllerWorker(object):
|
|
431
431
|
constants.SERVER_GROUP_ID: db_lb.server_group_id,
|
432
432
|
constants.PROJECT_ID: db_lb.project_id}
|
433
433
|
if cascade:
|
434
|
-
listeners = flow_utils.get_listeners_on_lb(db_lb)
|
435
|
-
pools = flow_utils.get_pools_on_lb(db_lb)
|
434
|
+
listeners = flow_utils.get_listeners_on_lb(db_lb, True)
|
435
|
+
pools = flow_utils.get_pools_on_lb(db_lb, True)
|
436
436
|
|
437
437
|
self.run_flow(
|
438
438
|
flow_utils.get_cascade_delete_load_balancer_flow,
|
@@ -34,7 +34,7 @@ CONF = cfg.CONF
|
|
34
34
|
LOG = logging.getLogger(__name__)
|
35
35
|
|
36
36
|
|
37
|
-
class AmphoraFlows
|
37
|
+
class AmphoraFlows:
|
38
38
|
|
39
39
|
def get_create_amphora_flow(self):
|
40
40
|
"""Creates a flow to create an amphora.
|
@@ -404,7 +404,7 @@ class AmphoraFlows(object):
|
|
404
404
|
def get_amphora_for_lb_failover_subflow(
|
405
405
|
self, prefix, role=constants.ROLE_STANDALONE,
|
406
406
|
failed_amp_vrrp_port_id=None, is_vrrp_ipv6=False,
|
407
|
-
flavor_dict=None):
|
407
|
+
flavor_dict=None, timeout_dict=None):
|
408
408
|
"""Creates a new amphora that will be used in a failover flow.
|
409
409
|
|
410
410
|
:requires: loadbalancer_id, flavor, vip, vip_sg_id, loadbalancer
|
@@ -488,13 +488,24 @@ class AmphoraFlows(object):
|
|
488
488
|
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
489
489
|
provides=constants.AMPHORA_FIREWALL_RULES,
|
490
490
|
inject={constants.AMPHORA_INDEX: 0}))
|
491
|
+
amp_for_failover_flow.add(
|
492
|
+
amphora_driver_tasks.AmphoraeGetConnectivityStatus(
|
493
|
+
name=(prefix + '-' +
|
494
|
+
constants.AMPHORAE_GET_CONNECTIVITY_STATUS),
|
495
|
+
requires=constants.AMPHORAE,
|
496
|
+
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
497
|
+
inject={constants.TIMEOUT_DICT: timeout_dict,
|
498
|
+
constants.NEW_AMPHORA_ID: constants.NIL_UUID},
|
499
|
+
provides=constants.AMPHORAE_STATUS))
|
491
500
|
amp_for_failover_flow.add(
|
492
501
|
amphora_driver_tasks.SetAmphoraFirewallRules(
|
493
502
|
name=prefix + '-' + constants.SET_AMPHORA_FIREWALL_RULES,
|
494
503
|
requires=(constants.AMPHORAE,
|
495
|
-
constants.AMPHORA_FIREWALL_RULES
|
504
|
+
constants.AMPHORA_FIREWALL_RULES,
|
505
|
+
constants.AMPHORAE_STATUS),
|
496
506
|
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
497
|
-
inject={constants.AMPHORA_INDEX: 0
|
507
|
+
inject={constants.AMPHORA_INDEX: 0,
|
508
|
+
constants.TIMEOUT_DICT: timeout_dict}))
|
498
509
|
|
499
510
|
# Plug member ports
|
500
511
|
amp_for_failover_flow.add(network_tasks.CalculateAmphoraDelta(
|