Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
97b6701e
Commit
97b6701e
authored
May 25, 2017
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of patched version of Go 1.8.1
parent
3e8c27af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
49 deletions
+1
-49
Dockerfile
build/build-image/Dockerfile
+1
-1
Dockerfile
build/build-image/cross/Dockerfile
+0
-19
go_181_performance_fix.patch
build/build-image/cross/go_181_performance_fix.patch
+0
-24
golang.sh
hack/lib/golang.sh
+0
-5
No files found.
build/build-image/Dockerfile
View file @
97b6701e
...
@@ -19,7 +19,7 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
...
@@ -19,7 +19,7 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
RUN
touch
/kube-build-image
RUN
touch
/kube-build-image
# To run as non-root we sometimes need to rebuild go stdlib packages.
# To run as non-root we sometimes need to rebuild go stdlib packages.
RUN
chmod
-R
a+rwx /usr/local/go/pkg
${
K8S_PATCHED_GOROOT
}
/pkg
RUN
chmod
-R
a+rwx /usr/local/go/pkg
# For running integration tests /var/run/kubernetes is required
# For running integration tests /var/run/kubernetes is required
# and should be writable by user
# and should be writable by user
...
...
build/build-image/cross/Dockerfile
View file @
97b6701e
...
@@ -77,22 +77,3 @@ RUN export ETCD_VERSION=v3.0.17; \
...
@@ -77,22 +77,3 @@ RUN export ETCD_VERSION=v3.0.17; \
&&
cd
/usr/local/src/etcd
\
&&
cd
/usr/local/src/etcd
\
&&
curl
-fsSL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz |
tar
-xz
\
&&
curl
-fsSL
https://github.com/coreos/etcd/releases/download/
${
ETCD_VERSION
}
/etcd-
${
ETCD_VERSION
}
-linux-amd64
.tar.gz |
tar
-xz
\
&&
ln
-s
../src/etcd/etcd-
${
ETCD_VERSION
}
-linux-amd64
/etcd /usr/local/bin/
&&
ln
-s
../src/etcd/etcd-
${
ETCD_VERSION
}
-linux-amd64
/etcd /usr/local/bin/
# There is a significant performance regression in Go 1.8 comparing to Go 1.7.
# Until this is solved in Go itself, we are patching 1.8.1 version of Go to
# reduce the impact of this regression - for more detailed discussion see:
# https://github.com/kubernetes/kubernetes/issues/45216
#
# TODO: Once this issue is fixed in Go itself, we can get rid of the code below.
ENV
K8S_PATCHED_GOLANG_VERSION=1.8.1 \
K8S_PATCHED_GOROOT=/usr/local/go_k8s_patched
RUN
mkdir
-p
${
K8S_PATCHED_GOROOT
}
\
&&
curl
-sSL
https://github.com/golang/go/archive/go
${
K8S_PATCHED_GOLANG_VERSION
}
.tar.gz |
tar
-xz
-C
${
K8S_PATCHED_GOROOT
}
--strip-components
=
1
COPY
go_181_performance_fix.patch ${K8S_PATCHED_GOROOT}/
RUN
cd
${
K8S_PATCHED_GOROOT
}
\
&&
patch
-p1
< go_181_performance_fix.patch
\
&&
cd
src
\
&&
GOROOT_FINAL
=
${
K8S_PATCHED_GOROOT
}
GOROOT_BOOTSTRAP
=
/usr/local/go ./make.bash
\
&&
for
platform
in
${
KUBE_CROSSPLATFORMS
}
;
do
GOOS
=
${
platform
%/*
}
GOARCH
=
${
platform
##*/
}
GOROOT
=
${
K8S_PATCHED_GOROOT
}
go
install
std
;
done
build/build-image/cross/go_181_performance_fix.patch
deleted
100644 → 0
View file @
3e8c27af
diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go
index 4536b2ff5d..84e78534a9 100644
--- a/src/net/http/h2_bundle.go
+++ b/src/net/http/h2_bundle.go
@@ -3536,9 +3536,17 @@ func (sc *http2serverConn) serve() {
sc.idleTimerCh = sc.idleTimer.C
}
- var gracefulShutdownCh <-chan struct{}
+ var gracefulShutdownCh chan struct{}
if sc.hs != nil {
- gracefulShutdownCh = http2h1ServerShutdownChan(sc.hs)
+ ch := http2h1ServerShutdownChan(sc.hs)
+ gracefulShutdownCh = make(chan struct{})
+ go func() {
+ select {
+ case <-sc.doneServing:
+ case <-ch:
+ close(gracefulShutdownCh)
+ }
+ }()
}
go sc.readFrames()
hack/lib/golang.sh
View file @
97b6701e
...
@@ -267,11 +267,6 @@ kube::golang::set_platform_envs() {
...
@@ -267,11 +267,6 @@ kube::golang::set_platform_envs() {
# Do not set CC when building natively on a platform, only if cross-compiling from linux/amd64
# Do not set CC when building natively on a platform, only if cross-compiling from linux/amd64
if
[[
$(
kube::golang::host_platform
)
==
"linux/amd64"
]]
;
then
if
[[
$(
kube::golang::host_platform
)
==
"linux/amd64"
]]
;
then
# We are currently using go 1.8.1, which has significant performance
# regression. Until this is fixed in Golang head, we are using patched
# version of Go that eliminates this problem.
export
GOROOT
=
${
K8S_PATCHED_GOROOT
:-${
GOROOT
}}
# Dynamic CGO linking for other server architectures than linux/amd64 goes here
# Dynamic CGO linking for other server architectures than linux/amd64 goes here
# If you want to include support for more server platforms than these, add arch-specific gcc names here
# If you want to include support for more server platforms than these, add arch-specific gcc names here
case
"
${
platform
}
"
in
case
"
${
platform
}
"
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment