Merge pull request #30659 from ixdy/disable-kubemark-ppc

Automatic merge from submit-queue

Disable linux/ppc64le compilation by default

Work-around for #30384.

I'm still testing this locally to see if it actually works. The build is slow. (PR Jenkins won't tell us whether this fixes ppc.)

cc @Random-Liu @spxtr @david-mcmahon @luxas
This commit is contained in:
Kubernetes Submit Queue 2016-08-18 23:12:09 -07:00 committed by GitHub
commit b1194ffb43
2 changed files with 24 additions and 20 deletions

View File

@ -43,6 +43,15 @@ readonly KUBE_GCS_DOCKER_REG_PREFIX=${KUBE_GCS_DOCKER_REG_PREFIX-docker-reg}/
readonly KUBE_GCS_PUBLISH_VERSION=${KUBE_GCS_PUBLISH_VERSION:-}
readonly KUBE_GCS_DELETE_EXISTING="${KUBE_GCS_DELETE_EXISTING:-n}"
# Set KUBE_BUILD_PPC64LE to y to build for ppc64le in addition to other
# platforms.
# TODO(IBM): remove KUBE_BUILD_PPC64LE and reenable ppc64le compilation by
# default when
# https://github.com/kubernetes/kubernetes/issues/30384 and
# https://github.com/kubernetes/kubernetes/issues/25886 are fixed.
# The majority of the logic is in hack/lib/golang.sh.
readonly KUBE_BUILD_PPC64LE="${KUBE_BUILD_PPC64LE:-n}"
# Constants
readonly KUBE_BUILD_IMAGE_REPO=kube-build
readonly KUBE_BUILD_IMAGE_CROSS_TAG="$(cat ${KUBE_ROOT}/build/build-image/cross/VERSION)"
@ -602,6 +611,7 @@ function kube::build::run_build_command() {
docker_run_opts+=(
--env "KUBE_FASTBUILD=${KUBE_FASTBUILD:-false}"
--env "KUBE_BUILDER_OS=${OSTYPE:-notdetected}"
--env "KUBE_BUILD_PPC64LE=${KUBE_BUILD_PPC64LE}" # TODO(IBM): remove
)
# If we have stdin we can run interactive. This allows things like 'shell.sh'
@ -698,12 +708,8 @@ function kube::release::package_hyperkube() {
# If we have these variables set then we want to build all docker images.
if [[ -n "${KUBE_DOCKER_IMAGE_TAG-}" && -n "${KUBE_DOCKER_REGISTRY-}" ]]; then
for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do
# TODO(IBM): Enable hyperkube builds for ppc64le again
if [[ ${arch} != "ppc64le" ]]; then
kube::log::status "Building hyperkube image for arch: ${arch}"
REGISTRY="${KUBE_DOCKER_REGISTRY}" VERSION="${KUBE_DOCKER_IMAGE_TAG}" ARCH="${arch}" make -C cluster/images/hyperkube/ build
fi
kube::log::status "Building hyperkube image for arch: ${arch}"
REGISTRY="${KUBE_DOCKER_REGISTRY}" VERSION="${KUBE_DOCKER_IMAGE_TAG}" ARCH="${arch}" make -C cluster/images/hyperkube/ build
done
fi
}

View File

@ -70,26 +70,32 @@ if [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then
else
# The server platform we are building on.
readonly KUBE_SERVER_PLATFORMS=(
KUBE_SERVER_PLATFORMS=(
linux/amd64
linux/arm
linux/arm64
linux/ppc64le # note: hyperkube is temporarily disabled due to a linking error
)
if [[ "${KUBE_BUILD_PPC64LE:-}" =~ ^[yY]$ ]]; then
KUBE_SERVER_PLATFORMS+=(linux/ppc64le)
fi
readonly KUBE_SERVER_PLATFORMS
# If we update this we should also update the set of golang compilers we build
# in 'build/build-image/cross/Dockerfile'. However, it's only a bit faster since go 1.5, not mandatory
readonly KUBE_CLIENT_PLATFORMS=(
KUBE_CLIENT_PLATFORMS=(
linux/amd64
linux/386
linux/arm
linux/arm64
linux/ppc64le
darwin/amd64
darwin/386
windows/amd64
windows/386
)
if [[ "${KUBE_BUILD_PPC64LE:-}" =~ ^[yY]$ ]]; then
KUBE_CLIENT_PLATFORMS+=(linux/ppc64le)
fi
readonly KUBE_CLIENT_PLATFORMS
# Which platforms we should compile test targets for. Not all client platforms need these tests
readonly KUBE_TEST_PLATFORMS=(
@ -461,15 +467,7 @@ kube::golang::build_binaries_for_platform() {
for binary in "${binaries[@]}"; do
# TODO(IBM): Enable hyperkube builds for ppc64le again
# The current workaround creates a text file with help text instead of a binary
# We're doing it this way so the build system isn't affected so much
if [[ "${binary}" == *"hyperkube" && "${platform}" == "linux/ppc64le" ]]; then
echo "hyperkube build for ppc64le is disabled. Creating dummy text file instead."
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
mkdir -p $(dirname ${outfile})
echo "Not available at the moment. Please see: https://github.com/kubernetes/kubernetes/issues/25886 for more information." > ${outfile}
elif [[ "${binary}" =~ ".test"$ ]]; then
if [[ "${binary}" =~ ".test"$ ]]; then
tests+=($binary)
elif kube::golang::is_statically_linked_library "${binary}"; then
statics+=($binary)
@ -668,7 +666,7 @@ kube::golang::build_binaries() {
kube::golang::build_kube_toolchain
if [[ "${parallel}" == "true" ]]; then
kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"
kube::log::status "Building go targets for {${platforms[*]}} in parallel (output will appear in a burst when complete):" "${targets[@]}"
local platform
for platform in "${platforms[@]}"; do (
kube::golang::set_platform_envs "${platform}"