kubernetes: Kubernetes 1.28 builds fail on Fedora 38, 39, and 40 (rawhide)
What happened?
K8S v1.28 rpm builds fail on Fedora 38, 39, and rawhide. These are builds using the establish rpm spec file to create the kubernetes rpms in Fedora. The spec file calls kube::golang::setup_env which is where the error occurs. The error occurs in the new ./hack/tools/ncpu tool.
It is important to note that the spec file sets export FORCE_HOST_GO=y
. Fedora 40/39 current provide golang 1.21.0; Fedora 38 provides golang 1.20.7.
With Fedora 39 and rawhide the following is observed in the build output:
++ go env GOROOT
+ GOROOT=/usr/lib/golang
+ export GOROOT
+ unset GOBIN
+ export GO15VENDOREXPERIMENT=1
+ GO15VENDOREXPERIMENT=1
+ command -v ncpu
+ pushd /builddir/build/BUILD/kubernetes-855e7c48de7388eb330da0f8d9d2394ee818fb8d/src/k8s.io/kubernetes/hack/tools
+ GO111MODULE=on
+ go install ./ncpu
go: downloading go.uber.org/automaxprocs v1.5.2
ncpu/main.go:23:2: GOPROXY list is not the empty string, but contains no entries
++ kube::log::errexit
++ local err=1
++ set +o
++ grep -qe '-o errexit'
++ set +o xtrace
!!! [0815 13:36:21] Call tree:
!!! [0815 13:36:21] 1: /var/tmp/rpm-tmp.rP6APk:57 kube::golang::setup_env(...)
error: Bad exit status from /var/tmp/rpm-tmp.rP6APk (%build)
With Fedora 38 the following is observed:
++ go env GOROOT
+ GOROOT=/usr/lib/golang
+ export GOROOT
+ unset GOBIN
+ export GO15VENDOREXPERIMENT=1
+ GO15VENDOREXPERIMENT=1
+ command -v ncpu
+ pushd /builddir/build/BUILD/kubernetes-855e7c48de7388eb330da0f8d9d2394ee818fb8d/src/k8s.io/kubernetes/hack/tools
+ GO111MODULE=on
+ go install ./ncpu
go: downloading go.uber.org/automaxprocs v1.5.2
ncpu/main.go:23:2: unrecognized import path "go.uber.org/automaxprocs": https fetch: Get "https://go.uber.org/automaxprocs?go-get=1": dial tcp: lookup go.uber.org: Temporary failure in name resolution
++ kube::log::errexit
++ local err=1
++ set +o
++ grep -qe '-o errexit'
++ set +o xtrace
!!! [0815 14:58:17] Call tree:
!!! [0815 14:58:17] 1: /var/tmp/rpm-tmp.wkPWUg:54 kube::golang::setup_env(...)
error: Bad exit status from /var/tmp/rpm-tmp.wkPWUg (%build)
What did you expect to happen?
Something similar to the successful build of K8S 1.27.4 at the same stage in the build process:
++ go env GOROOT
+ GOROOT=/usr/lib/golang
+ export GOROOT
+ unset GOBIN
+ export GO15VENDOREXPERIMENT=1
+ GO15VENDOREXPERIMENT=1
+ export KUBE_GIT_TREE_STATE=clean
How can we reproduce it (as minimally and precisely as possible)?
- Install Fedora 38 (current release)
- sudo dnf install fedora-packager fedora-review
- Checkout the fedora rpm repo for kubernetes and update spec file for v1.28
- Build.
Anything else we need to know?
No response
Kubernetes version
Problem building Kubernetes 1.28
Cloud provider
N/A
OS version
Fedora uses a chrooted build environment so these data may not be accurate for building F39 and 40.
$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
$ uname -a
Linux pico 6.4.10-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 11 12:20:29 UTC 2023 x86_64 GNU/Linux
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, …) and versions (if applicable)
Please let me know what I can do to help resolve!
Many thanks
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (11 by maintainers)
no,
vendor
is for code that actually gets built/linked into released binariesthis module is only used to build an optional utility used to set up the environment when running some tests. https://github.com/kubernetes/kubernetes/pull/119977 and the 1.28 cherry-pick will resolve the issue
https://github.com/kubernetes/kubernetes/pull/119982 is merged so HEAD of release-1.28 will build without trying to install this tool
I am working with the Fedora go-sig and learned that the golang 1.21 package had dropped the go.env file by mistake so they rebuilt the package which will show up in rawhide sometime today. I will update this issue when the update comes through.
Interestingly, I manually added export GOPROXY=https://proxy.golang.org,direct in the spec file. I sill get an error in the ncpu code but the message changed to:
It seems like an IPv6 DNS lookup is being attempted and refused (no ipv6 on this workstation)? I can
wget https://proxy.golang.org/go.uber.org/automaxprocs/@v/v1.5.2.zip
without any problem.I will also note that I am on the team maintaining the Kubernetes rpm packages for Fedora.
I think the GOPROXY message is confusing, but might just be saying it was set in a way to disallow network fetches (non-empty, but doesn’t contain entries). This is likely a duplicate of https://github.com/kubernetes/kubernetes/issues/119768, and would be resolved by https://github.com/kubernetes/kubernetes/pull/119977 (and the 1.28 cherry-pick - https://github.com/kubernetes/kubernetes/pull/119982)
I recommend filing an issue against Fedora. So far as I know, the Kubernetes project does not maintain the Fedora package build code.