ml2-ansible: Set api_max_retries when net-ansible is used

Some bare metals may take longer time to boot up. It may happen Nova
bails out in Ironic driver too early. Setting higher timeout gives
machines more time to boot up.

Closes-bug: #1816728

Change-Id: I38070efa7e9511ca74e2bfe4e53618e1176ca65b
This commit is contained in:
Jakub Libosvar 2019-02-20 10:22:28 +01:00
parent 321f3ad61a
commit d41f0d7c35
4 changed files with 14 additions and 0 deletions

View File

@ -77,6 +77,7 @@ parameter_defaults:
NeutronTypeDrivers: local,vxlan,vlan,flat
IronicDefaultNetworkInterface: neutron
IronicAutomatedClean: false
IronicApiMaxRetries: 180
NeutronFlatNetworks: datacentre
NeutronNetworkVLANRanges: 'datacentre:500:599,tenant:300:399'
ML2HostConfigs: { "net-ans-br": { "ansible_network_os": "openvswitch", "ansible_host": "127.0.0.1", "ansible_user": "root", "ansible_ssh_private_key_file": "/etc/puppet/ci-key"}}

View File

@ -34,6 +34,7 @@ parameter_defaults:
NeutronMechanismDrivers: ovn,ansible
NeutronNetworkType: vlan
NeutronTypeDrivers: local,geneve,vlan,flat
IronicApiMaxRetries: 180
IronicDefaultNetworkInterface: neutron
IronicAutomatedClean: false
NeutronFlatNetworks: datacentre

View File

@ -50,6 +50,10 @@ parameters:
type: boolean
tags:
- role_specific
IronicApiMaxRetries:
description: The number of times to retry when a request conflicts. If set to 0, only try once, no retries.
type: number
default: -1
conditions:
@ -59,6 +63,8 @@ conditions:
- equals: [{get_param: NovaNfsEnabled}, true]
- equals: [{get_param: [RoleParameters, NovaNfsEnabled]}, '']
- equals: [{get_param: [RoleParameters, NovaNfsEnabled]}, true]
ironic_api_max_retry_cond:
equals: [{get_param: IronicApiMaxRetries}, -1]
resources:
@ -104,6 +110,11 @@ outputs:
nova::ironic::common::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
nova::ironic::common::username: 'ironic'
nova::ironic::common::api_endpoint: {get_param: [EndpointMap, IronicInternal, uri]}
- if:
- ironic_api_max_retry_cond
- {}
- nova::ironic::common::api_max_retries:
get_param: IronicApiMaxRetries
puppet_config:
config_volume: nova
puppet_tags: nova_config,nova_paste_api_ini

View File

@ -2,6 +2,7 @@
resource_registry:
OS::TripleO::Services::NeutronCorePlugin: OS::TripleO::Services::NeutronCorePluginML2Ansible
parameter_defaults:
IronicApiMaxRetries: 180
IronicDefaultNetworkInterface: neutron
NeutronMechanismDrivers: openvswitch,ansible
NeutronTypeDrivers: local,vxlan,vlan,flat