Commit 423839d 1 parent 0d6d35f commit 423839d Copy full SHA for 423839d
File tree 9 files changed +35
-75
lines changed
9 files changed +35
-75
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,6 @@ if yum list installed | grep ec2-net-utils; then sudo yum remove ec2-net-utils -
86
86
87
87
sudo mkdir -p /etc/eks/
88
88
89
- # ###############################################################################
90
- # ## Time #######################################################################
91
- # ###############################################################################
92
-
93
- sudo mv $WORKING_DIR /configure-clocksource.service /etc/eks/configure-clocksource.service
94
89
95
90
# ###############################################################################
96
91
# ## SSH ########################################################################
Original file line number Diff line number Diff line change @@ -23,9 +23,3 @@ sudo yum install -y "kernel-headers-${KERNEL_VERSION}*" "kernel-devel-${KERNEL_V
23
23
sudo grubby \
24
24
--update-kernel=ALL \
25
25
--args=" psi=1"
26
-
27
- # use the tsc clocksource by default
28
- # https://repost.aws/knowledge-center/manage-ec2-linux-clock-source
29
- sudo grubby \
30
- --update-kernel=ALL \
31
- --args=" clocksource=tsc tsc=reliable"
Original file line number Diff line number Diff line change @@ -335,11 +335,6 @@ if [ "$MOUNT_BPF_FS" = "true" ]; then
335
335
mount-bpf-fs
336
336
fi
337
337
338
- cp -v /etc/eks/configure-clocksource.service /etc/systemd/system/configure-clocksource.service
339
- chown root:root /etc/systemd/system/configure-clocksource.service
340
- systemctl daemon-reload
341
- systemctl enable --now configure-clocksource
342
-
343
338
ECR_URI=$( /etc/eks/get-ecr-uri.sh " ${AWS_DEFAULT_REGION} " " ${AWS_SERVICES_DOMAIN} " " ${PAUSE_CONTAINER_ACCOUNT:- } " )
344
339
PAUSE_CONTAINER_IMAGE=${PAUSE_CONTAINER_IMAGE:- $ECR_URI / eks/ pause}
345
340
PAUSE_CONTAINER=" $PAUSE_CONTAINER_IMAGE :$PAUSE_CONTAINER_VERSION "
Original file line number Diff line number Diff line change 170
170
" KERNEL_VERSION={{user `kernel_version`}}"
171
171
]
172
172
},
173
+ {
174
+ "type" : " shell" ,
175
+ "remote_folder" : " {{ user `remote_folder`}}" ,
176
+ "script" : " {{template_dir}}/../shared/provisioners/set-clocksource.sh" ,
177
+ "environment_vars" : [
178
+ " KUBERNETES_VERSION={{user `kubernetes_version`}}" ,
179
+ " KERNEL_VERSION={{user `kernel_version`}}"
180
+ ]
181
+ },
173
182
{
174
183
"type" : " shell" ,
175
184
"remote_folder" : " {{ user `remote_folder`}}" ,
181
190
{
182
191
"type" : " shell" ,
183
192
"remote_folder" : " {{ user `remote_folder`}}" ,
184
- "inline" : [" sudo reboot" ],
193
+ "inline" : [
194
+ " sudo reboot"
195
+ ],
185
196
"expect_disconnect" : true ,
186
197
"pause_after" : " 90s"
187
198
},
272
283
}
273
284
}
274
285
]
275
- }
286
+ }
Original file line number Diff line number Diff line change 87
87
# Temporary fix for https://github.com/aws/amazon-vpc-cni-k8s/pull/2118
88
88
sudo sed -i " s/^MACAddressPolicy=.*/MACAddressPolicy=none/" /usr/lib/systemd/network/99-default.link || true
89
89
90
- # ###############################################################################
91
- # ## Time #######################################################################
92
- # ###############################################################################
93
-
94
- sudo cp -v $WORKING_DIR /shared/configure-clocksource.service /etc/systemd/system/configure-clocksource.service
95
- sudo systemctl enable configure-clocksource
96
-
97
90
# ###############################################################################
98
91
# ## SSH ########################################################################
99
92
# ###############################################################################
Original file line number Diff line number Diff line change 175
175
" sudo chmod -R a+x {{user `working_dir`}}/gpu/*"
176
176
]
177
177
},
178
+ {
179
+ "type" : " shell" ,
180
+ "remote_folder" : " {{ user `remote_folder`}}" ,
181
+ "script" : " {{template_dir}}/../shared/provisioners/set-clocksource.sh" ,
182
+ "environment_vars" : [
183
+ " KUBERNETES_VERSION={{user `kubernetes_version`}}" ,
184
+ " KERNEL_VERSION={{user `kernel_version`}}"
185
+ ]
186
+ },
178
187
{
179
188
"type" : " shell" ,
180
189
"remote_folder" : " {{ user `remote_folder`}}" ,
322
331
}
323
332
}
324
333
]
325
- }
334
+ }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o pipefail
4
+ set -o nounset
5
+ set -o errexit
6
+
7
+ # use the tsc clocksource by default
8
+ # https://repost.aws/knowledge-center/manage-ec2-linux-clock-source
9
+ sudo grubby \
10
+ --update-kernel=ALL \
11
+ --args=" clocksource=tsc tsc=reliable"
12
+
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments