Skip to content

Commit

Permalink
Remove hardcoded MTU network setting for eth0 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roncossek authored Oct 21, 2024
1 parent f712c62 commit a424001
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions pkg/controller/operatingsystemconfig/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ EOF
chmod 0644 /etc/systemd/system/containerd.service.d/11-exec_config.conf
` + writeFilesToDiskScript + `
` + writeUnitsToDiskScript + `
if [[ -d /sys/class/net/eth0 ]]
then
ip link set dev eth0 mtu 1460
grep -q '^MTU' /etc/sysconfig/network/ifcfg-eth0 && sed -i 's/^MTU.*/MTU=1460/' /etc/sysconfig/network/ifcfg-eth0 || echo 'MTU=1460' >> /etc/sysconfig/network/ifcfg-eth0
wicked ifreload eth0
fi
# mitigate https://github.com/systemd/systemd/issues/7082
# ref https://github.com/coreos/bugs/issues/2193#issuecomment-337767555
Expand Down
6 changes: 0 additions & 6 deletions pkg/controller/operatingsystemconfig/actuator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ EOF
cat << EOF | base64 -d > "/etc/systemd/system/some-unit"
Zm9v
EOF
if [[ -d /sys/class/net/eth0 ]]
then
ip link set dev eth0 mtu 1460
grep -q '^MTU' /etc/sysconfig/network/ifcfg-eth0 && sed -i 's/^MTU.*/MTU=1460/' /etc/sysconfig/network/ifcfg-eth0 || echo 'MTU=1460' >> /etc/sysconfig/network/ifcfg-eth0
wicked ifreload eth0
fi
# mitigate https://github.com/systemd/systemd/issues/7082
# ref https://github.com/coreos/bugs/issues/2193#issuecomment-337767555
Expand Down

0 comments on commit a424001

Please sign in to comment.