Correct interface information for bonds
When generating bonded interfaces, we still want to have an IP available if the user has defined it. This change will make sure that the address, netmask, and DNS information gets set on bonded interfaces. Also, tagged interfaces that are based off a bond need to be set to `manual`, so that they are not forced to have IPs. Closes-Bug: #1402028 Change-Id: I6ad29f875be6ae8b770f0608874f6a650204f681
This commit is contained in:
parent
6c7e170d98
commit
067119ba89
@ -26,7 +26,7 @@ iface {{ net.device_name }} inet manual
|
||||
{% endif %}
|
||||
|
||||
{% elif net.type == "vlan_tagged" %}
|
||||
iface {{ net.tagged_device_name }} inet static
|
||||
iface {{ net.tagged_device_name }} inet manual
|
||||
vlan-raw-device {{ net.device_name }}
|
||||
|
||||
{% elif net.type == "bonded" %}
|
||||
@ -37,6 +37,21 @@ iface {{ net.device_name }} inet static
|
||||
bond-miimon {{ net.miimon|default('100') }}
|
||||
bond-downdelay {{ net.downdelay|default('200') }}
|
||||
bond-updelay {{ net.updelay|default('200') }}
|
||||
{% if net.address is defined %}
|
||||
address {{ net.address }}
|
||||
{% endif %}
|
||||
{% if net.gateway is defined %}
|
||||
gateway {{ net.gateway }}
|
||||
{% endif %}
|
||||
{% if net.netmask is defined %}
|
||||
netmask {{ net.netmask }}
|
||||
{% endif %}
|
||||
{% if net.dns_nameservers is defined %}
|
||||
dns-nameservers {{ net.dns_nameservers|join(' ') }}
|
||||
{% endif %}
|
||||
{% if net.dns_search is defined %}
|
||||
dns-search {{ net.dns_search|join(' ') }}
|
||||
{% endif %}
|
||||
|
||||
{% elif net.type == "bridged" %}
|
||||
auto {{ net.device_name }}
|
||||
|
Loading…
Reference in New Issue
Block a user