Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 1 | {#- Provides: #} |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 2 | {#- vhost0 , as a keepalived vip interface #} |
| 3 | {#- Requirements: #} |
| 4 | {#- _param:tenant_vlan #} |
| 5 | {#- _param:tenant_address #} |
Dennis Dmitriev | cf5f43b | 2017-10-11 15:10:27 +0300 | [diff] [blame] | 6 | {#- _param:tenant_network_netmask #} |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 7 | {#- _param:tenant_network_gateway #} |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 8 | # {{ interfaces_role }} |
| 9 | {%- for interface_name, interface in interfaces.items() %} |
| 10 | {{ interface_name }}: |
| 11 | mtu: 9000 |
| 12 | enabled: true |
abaraniuk | d2ccfae | 2018-11-08 13:52:32 +0200 | [diff] [blame] | 13 | master: bond0 |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 14 | name: {{ interface_name }} |
| 15 | proto: manual |
abaraniuk | d2ccfae | 2018-11-08 13:52:32 +0200 | [diff] [blame] | 16 | type: slave |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 17 | ipflush_onchange: true |
| 18 | {%- endfor %} |
| 19 | bond0: |
| 20 | mtu: 9000 |
| 21 | enabled: true |
| 22 | mode: active-backup |
| 23 | proto: manual |
| 24 | slaves: {{ ' '.join(interfaces.keys()) }} |
| 25 | type: bond |
| 26 | use_interfaces: |
| 27 | {%- for interface_name in interfaces.keys() %} |
| 28 | - {{ interface_name }} |
| 29 | {%- endfor %} |
| 30 | require_interfaces: |
| 31 | {%- for interface_name in interfaces.keys() %} |
| 32 | - {{ interface_name }} |
| 33 | {%- endfor %} |
| 34 | |
| 35 | {{- set_param('keepalived_vip_interface', 'vhost0') }} |
| 36 | vhost0: |
| 37 | mtu: 9000 |
| 38 | address: ${_param:_esc}{_param:tenant_address} |
| 39 | netmask: ${_param:_esc}{_param:tenant_network_netmask} |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 40 | enabled: true |
| 41 | proto: static |
| 42 | type: eth |
| 43 | pre_up_cmds: |
| 44 | - /usr/lib/contrail/if-vhost0 |
| 45 | name_servers: |
| 46 | - ${_param:_esc}{_param:dns_server01} |
| 47 | - ${_param:_esc}{_param:dns_server02} |
| 48 | use_interfaces: |
| 49 | - bond0.${_param:_esc}{_param:tenant_vlan} |
| 50 | require_interfaces: |
| 51 | - bond0.${_param:_esc}{_param:tenant_vlan} |
| 52 | bond0.tenant_vlan: |
| 53 | mtu: 9000 |
| 54 | name: bond0.${_param:_esc}{_param:tenant_vlan} |
| 55 | enabled: true |
| 56 | proto: manual |
| 57 | type: vlan |
| 58 | use_interfaces: |
| 59 | - bond0 |
| 60 | require_interfaces: |
sgudz | 3dcf8f7 | 2017-10-18 17:31:01 +0300 | [diff] [blame] | 61 | - bond0 |