File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,11 @@ readonly -f os::util::format_seconds
120
120
# Return:
121
121
# None
122
122
function os::util::sed() {
123
+ local sudo=" ${USE_SUDO: +sudo} "
123
124
if LANG=C sed --help 2>&1 | grep -q " GNU sed" ; then
124
- sed -i' ' " $@ "
125
+ ${sudo} sed -i' ' " $@ "
125
126
else
126
- sed -i ' ' " $@ "
127
+ ${sudo} sed -i ' ' " $@ "
127
128
fi
128
129
}
129
130
readonly -f os::util::sed
@@ -203,4 +204,4 @@ function os::util::curl_etcd() {
203
204
function os::util::host_platform() {
204
205
echo " $( go env GOHOSTOS) /$( go env GOHOSTARCH) "
205
206
}
206
- readonly -f os::util::host_platform
207
+ readonly -f os::util::host_platform
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ function cleanup()
54
54
os::test::junit::generate_oscmd_report
55
55
set -e
56
56
57
+ # restore journald to previous form
58
+ ${USE_SUDO: +sudo} mv /etc/systemd/{journald.conf.bak,journald.conf}
59
+ ${USE_SUDO: +sudo} systemctl restart systemd-journald.service
60
+
57
61
os::log::info " Exiting"
58
62
ENDTIME=$( date +%s) ; echo " $0 took $(( $ENDTIME - $STARTTIME )) seconds"
59
63
exit $out
@@ -63,6 +67,13 @@ trap "cleanup" EXIT INT TERM
63
67
64
68
os::log::system::start
65
69
70
+ # This increases rate limits in journald to bypass the problem from
71
+ # https://github.com/openshift/origin/issues/12558.
72
+ ${USE_SUDO: +sudo} cp /etc/systemd/{journald.conf,journald.conf.bak}
73
+ os::util::sed " s/^.*RateLimitInterval.*$/RateLimitInterval=1s/g" /etc/systemd/journald.conf
74
+ os::util::sed " s/^.*RateLimitBurst.*$/RateLimitBurst=10000/g" /etc/systemd/journald.conf
75
+ ${USE_SUDO: +sudo} systemctl restart systemd-journald.service
76
+
66
77
out=$(
67
78
set +e
68
79
docker stop origin 2>&1
You can’t perform that action at this time.
0 commit comments