bundles/systemd-networkd: remove usage of systemd-resolved
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
Something in the combination of arch+zfs+netctl+resolved+ipv6 leads to hanging dns, which in turn leads to hanging everything.
This commit is contained in:
parent
891823376f
commit
4823653214
3 changed files with 12 additions and 15 deletions
|
@ -80,9 +80,6 @@ defaults = {
|
||||||
'xdotool': {}, # needed for maim window selection
|
'xdotool': {}, # needed for maim window selection
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'systemd-networkd': {
|
|
||||||
'enable-resolved': True,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
@metadata_reactor.provides(
|
||||||
|
|
|
@ -10,16 +10,12 @@ files = {
|
||||||
|
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
'systemd-networkd': {},
|
'systemd-networkd': {},
|
||||||
|
'systemd-resolved': {
|
||||||
|
'running': False,
|
||||||
|
'enabled': False,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if node.metadata.get('systemd-networkd/enable-resolved', False):
|
|
||||||
svc_systemd['systemd-resolved'] = {}
|
|
||||||
else:
|
|
||||||
files['/etc/resolv.conf'] = {
|
|
||||||
'content_type': 'mako',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
directories = {
|
directories = {
|
||||||
'/etc/systemd/network': {
|
'/etc/systemd/network': {
|
||||||
'purge': True,
|
'purge': True,
|
||||||
|
@ -34,16 +30,16 @@ directories = {
|
||||||
|
|
||||||
mac_host_prefix = '%04x' % (node.magic_number % 65534)
|
mac_host_prefix = '%04x' % (node.magic_number % 65534)
|
||||||
generated_mac = f'52:54:00:{mac_host_prefix[0:2]}:{mac_host_prefix[2:4]}:{{}}'
|
generated_mac = f'52:54:00:{mac_host_prefix[0:2]}:{mac_host_prefix[2:4]}:{{}}'
|
||||||
|
all_interfaces_use_dhcp = True
|
||||||
|
|
||||||
# Don't use .get() here. We might end up with a node without a network
|
for interface, config in node.metadata.get('interfaces').items():
|
||||||
# config!
|
|
||||||
for interface, config in node.metadata['interfaces'].items():
|
|
||||||
if config.get('dhcp', False):
|
if config.get('dhcp', False):
|
||||||
if 'vlans' in config:
|
if 'vlans' in config:
|
||||||
raise BundleError(f'{node.name} interface {interface} cannot use vlans and dhcp!')
|
raise BundleError(f'{node.name} interface {interface} cannot use vlans and dhcp!')
|
||||||
template = 'template-iface-dhcp.network'
|
template = 'template-iface-dhcp.network'
|
||||||
else:
|
else:
|
||||||
template = 'template-iface-nodhcp.network'
|
template = 'template-iface-nodhcp.network'
|
||||||
|
all_interfaces_use_dhcp = False
|
||||||
|
|
||||||
if '.' in interface:
|
if '.' in interface:
|
||||||
vlan_id = int(interface.split('.')[1])
|
vlan_id = int(interface.split('.')[1])
|
||||||
|
@ -94,6 +90,11 @@ for interface, config in node.metadata['interfaces'].items():
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if not all_interfaces_use_dhcp:
|
||||||
|
files['/etc/resolv.conf'] = {
|
||||||
|
'content_type': 'mako',
|
||||||
|
}
|
||||||
|
|
||||||
for bond, config in node.metadata.get('systemd-networkd/bonds', {}).items():
|
for bond, config in node.metadata.get('systemd-networkd/bonds', {}).items():
|
||||||
files[f'/etc/systemd/network/{bond}.netdev'] = {
|
files[f'/etc/systemd/network/{bond}.netdev'] = {
|
||||||
'source': 'template-bond.netdev',
|
'source': 'template-bond.netdev',
|
||||||
|
|
|
@ -80,7 +80,6 @@ nodes['kunsi-t470'] = {
|
||||||
'install_gui': True,
|
'install_gui': True,
|
||||||
},
|
},
|
||||||
'systemd-networkd': {
|
'systemd-networkd': {
|
||||||
'enable-resolved': True,
|
|
||||||
'bridges': {
|
'bridges': {
|
||||||
'br0': {
|
'br0': {
|
||||||
'match': {
|
'match': {
|
||||||
|
|
Loading…
Reference in a new issue