Skip to content

build/release.sh (hack/lib/golang.sh) requires minimum bash v4.4 #77521

@cjschaef

Description

@cjschaef

What happened: building Kubernetes release and it failed due to a variable not being set (with set -u enabled). It appears a recent commit does not function as expected on bash v4.3 (used Ubuntu 16). Additional details will be provided in comment below

kubernetes/hack/lib/golang.sh: line 295: KUBE_SERVER_PLATFORMS[@]: unbound variable

What you expected to happen: successful build of Kuberentes release or documented minimum supported OS releases (i.e., bash versions)

How to reproduce it (as minimally and precisely as possible): using Ubuntu 16 (bash v4.3), run [build/release.sh] using release-1.14, v1.15.0-alpha.2 or master (containing dcee810 or subsequent cherry pick)

Anything else we need to know?: It appears the issue is with how bash v4.3 and bash v4.4 create readonly variables, where I believe v4.3 does not create the variables with the expected scope (created using local scope versus global scope). This creates a minimum supported OS version when running build/release.sh from the best I can tell.

Environment:

  • Kubernetes version (use kubectl version): v1.15.0-alpha.2 release-1.14
  • Cloud provider or hardware configuration: N/A
  • OS (e.g: cat /etc/os-release):
release 
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Kernel (e.g. uname -a): Linux armada-lb-build 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: build/release.sh
  • Network plugin and version (if this is a network-related bug): N/A
  • Others:

/sig release

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.sig/releaseCategorizes an issue or PR as relevant to SIG Release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions