New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl/bash giving false error? No prebuilt binary for linux-armv7. #5273

Closed
alexellis opened this Issue Feb 6, 2019 · 9 comments

Comments

Projects
None yet
2 participants
@alexellis
Copy link
Contributor

alexellis commented Feb 6, 2019

Output of helm version:

Output of kubectl version:

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

On a Raspberry Pi 3 with Raspbian I got the following when trying to install helm.

pi@rnode-1:~ $  curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7236  100  7236    0     0  19811      0 --:--:-- --:--:-- --:--:-- 19824
No prebuilt binary for linux-armv7.
To build from source, go to https://github.com/helm/helm
Failed to install helm
	For support, go to https://github.com/helm/helm.

This seems like it may be a false error, because arm (armv7) binaries are given here: https://github.com/helm/helm/releases/tag/v2.12.3 alongside what is being called "arm64" i.e. aarch64 / armv8.

cc @ibuildthecloud @rimusz

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

If it helps we have a similar utility script to yours which figures out the architecture then downloads the correct binary from our releases page: https://github.com/openfaas/cli.openfaas.com/blob/master/get.sh#L59

@bacongobbler

This comment has been minimized.

Copy link
Member

bacongobbler commented Feb 6, 2019

Probably something to do with how we capture the output of uname -m on armv7. See

helm/scripts/get

Lines 26 to 39 in 16c10be

# initArch discovers the architecture for this system.
initArch() {
ARCH=$(uname -m)
case $ARCH in
armv5*) ARCH="armv5";;
armv6*) ARCH="armv6";;
armv7*) ARCH="armv7";;
aarch64) ARCH="arm64";;
x86) ARCH="386";;
x86_64) ARCH="amd64";;
i686) ARCH="386";;
i386) ARCH="386";;
esac
}

If you want to make a PR to make that work on an rpi3, that'd be appreciated.

@bacongobbler bacongobbler added the feature label Feb 6, 2019

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

I see armv7l on Raspberry Pi and on the Asus Tinkerboard.

I see that @technosophos added the support 2 years ago. Matt, how was the armv7 string derived? Would you be OK with us adding an alias to what is observed on the most popular 32-bit ARM device - the RPi?

Alex

@bacongobbler

This comment has been minimized.

Copy link
Member

bacongobbler commented Feb 6, 2019

Yes.

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

Hmm the case/switch looks like it might be working as expected:

$ uname -m
armv7l
export $ARCH=""

initArch() {
  ARCH=$(uname -m)
  case $ARCH in
    armv5*) ARCH="armv5";;
    armv6*) ARCH="armv6";;
    armv7*) ARCH="armv7";;
  esac
}

$ initArch
$ echo $ARCH
armv7

Looks like the problem could be: https://github.com/helm/helm/blob/master/scripts/get#L65

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

So I updated the script to look for linux-armv7 instead of linux-arm, but then we get a mismatch with the binary release. The binary release could do with being called linux-armv7 instead of linux-arm - then patching line 65 would make this work.

local supported="darwin-386\ndarwin-amd64\nlinux-386\nlinux-amd64\nlinux-arm\nlinux-arm64\nlinux-ppc64le\nwindows-386\nwindows-amd64"

=>

local supported="darwin-386\ndarwin-amd64\nlinux-386\nlinux-amd64\nlinux-armv7\nlinux-arm64\nlinux-ppc64le\nwindows-386\nwindows-amd64"

What do you think?

@bacongobbler

This comment has been minimized.

Copy link
Member

bacongobbler commented Feb 6, 2019

If I'm understanding the issue correctly, you probably just want to change the check on line 32 to evaluate armv7* as arm.

In other words, change

    armv7*) ARCH="armv7";;

to

    armv7*) ARCH="arm";;

And the script should fetch the right release binary.

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

I would consider the release file as being incorrectly labelled and this being a work-around rather than a fix.

Happy to go with that if it unblocks users on RPi/ARMHF.

Thanks for being so responsive

Alex

@alexellis

This comment has been minimized.

Copy link
Contributor Author

alexellis commented Feb 6, 2019

The suggestion worked:

$ bash test.sh 
Downloading https://kubernetes-helm.storage.googleapis.com/helm-v2.12.3-linux-arm.tar.gz
Preparing to install helm and tiller into /usr/local/bin

[sudo] password for alex: 
helm installed into /usr/local/bin/helm
tiller installed into /usr/local/bin/tiller
Run 'helm init' to configure helm.

alex@3cb949fb:~$ helm version
Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:8080: connect: connection refused
alex@3cb949fb:~$ 

alexellis added a commit to alexellis/helm that referenced this issue Feb 6, 2019

Fix issue helm#5273 for get script on armv7l
This fixes issue helm#5273 in the get script by making the armv7l
architecture point at the correctly named "arm" binary on the
release page.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

@alexellis alexellis referenced this issue Feb 6, 2019

Merged

Fix issue #5273 for get script on armv7l #5275

0 of 3 tasks complete

bacongobbler added a commit that referenced this issue Feb 6, 2019

Fix issue #5273 for get script on armv7l (#5275)
This fixes issue #5273 in the get script by making the armv7l
architecture point at the correctly named "arm" binary on the
release page.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment