Skip to content

Commit 8423043

Browse files
Force usage of networkd
Signed-off-by: Hanwen <[email protected]>
1 parent 253fc5f commit 8423043

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_ubuntu_common.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,20 @@ def optionally_disable_rnd
8181
command "sed --in-place '/RANDFILE/d' /etc/ssl/openssl.cnf"
8282
end
8383
end
84+
85+
def post_install
86+
# ubuntu-desktop comes with NetworkManager. On a cloud instance NetworkManager is unnecessary and causes delay.
87+
# Instruct Netplan to use networkd for better performance
88+
bash 'Instruct Netplan to use networkd' do
89+
code <<-NETPLAN
90+
set -e
91+
cat > /etc/netplan/95-parallelcluster-force-networkd.yaml << 'EOF'
92+
network:
93+
version: 2
94+
renderer: networkd
95+
EOF
96+
netplan apply
97+
NETPLAN
98+
end unless on_docker?
99+
end
84100
end

0 commit comments

Comments
 (0)