Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 1 | {#- Control network with bond. For control plane nodes #} |
| 2 | {#- Provides: #} |
| 3 | {#- br_ctl (linux bridge) + control address #} |
| 4 | {#- _param:keepalived_vip_interface = 'br_ctl' #} |
| 5 | {#- Requirements: #} |
| 6 | {#- _param:single_address #} |
| 7 | {#- _param:control_network_netmask #} |
| 8 | {#- _param:control_vlan #} |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 9 | # {{ interfaces_role }} |
| 10 | {%- for interface_name, interface in interfaces.items() %} |
| 11 | {{ interface_name }}: |
| 12 | mtu: 9000 |
| 13 | enabled: true |
Dmitry Tyzhnenko | d6264e3 | 2018-11-12 17:11:39 +0200 | [diff] [blame] | 14 | master: bond0 |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 15 | name: {{ interface_name }} |
| 16 | proto: manual |
Dmitry Tyzhnenko | d6264e3 | 2018-11-12 17:11:39 +0200 | [diff] [blame] | 17 | type: slave |
Dennis Dmitriev | f4826bc | 2017-09-28 19:03:54 +0300 | [diff] [blame] | 18 | ipflush_onchange: true |
| 19 | {%- endfor %} |
| 20 | bond0: |
| 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 | br_ctl: |
| 36 | address: ${_param:_esc}{_param:single_address} |
| 37 | enabled: true |
| 38 | netmask: ${_param:_esc}{_param:control_network_netmask} |
| 39 | proto: static |
| 40 | type: bridge |
| 41 | use_interfaces: |
| 42 | - bond0.${_param:_esc}{_param:control_vlan} |
| 43 | require_interfaces: |
| 44 | - bond0.${_param:_esc}{_param:control_vlan} |
| 45 | bond0.control_vlan: |
| 46 | name: bond0.${_param:_esc}{_param:control_vlan} |
| 47 | enabled: true |
| 48 | proto: manual |
| 49 | type: vlan |
| 50 | use_interfaces: |
| 51 | - bond0 |
| 52 | require_interfaces: |
Dmitry Tyzhnenko | d6264e3 | 2018-11-12 17:11:39 +0200 | [diff] [blame] | 53 | - bond0 |