k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
27.9k stars 2.33k forks source link

installer (installer.sh) errors out on `Installing k3s to /opt/bin/k3s` #2639

Closed idcrook closed 3 years ago

idcrook commented 3 years ago

Environmental Info: K3s Version:

N/A

Node(s) CPU architecture, OS, and Version:

Linux rpihp2 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux

Cluster Configuration:

Bootstrapping control plane node

Describe the bug:

Steps To Reproduce:

Expected behavior:

Install with normal defaults

Actual behavior:

Errors out when Installing k3s to /opt/bin/k3s

Additional context / logs:

$ curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=v1.19 INSTALL_K3S_EXEC="--disable=traefik" sh -
[INFO]  Finding release for channel v1.19
[INFO]  Using v1.19.4+k3s1 as release
[INFO]  Downloading hash https://github.com/rancher/k3s/releases/download/v1.19.4+k3s1/sha256sum-arm.txt
[INFO]  Downloading binary https://github.com/rancher/k3s/releases/download/v1.19.4+k3s1/k3s-armhf
[INFO]  Verifying binary download
[INFO]  Installing k3s to /opt/bin/k3s
mv: cannot move '/tmp/k3s-install.WAfOPFqLTf/k3s.bin' to '/opt/bin/k3s': No such file or directory

I think the problem arose related to this commit (three hours ago as of this writing)

install.sh commit eb3e4c154cc1956b8bcada958d1fae90792ce9fe

+# --- use /usr/local/bin if we can write to it, otherwise try /opt
  BIN_DIR=/usr/local/bin
+touch ${BIN_DIR}/k3s-ro-test 2>/dev/null && rm -rf ${BIN_DIR}/k3s-ro-test || BIN_DIR=/opt/bin
idcrook commented 3 years ago

explicitly adding INSTALL_K3S_BIN_DIR=/usr/local/bin to installer invocation succeeds.

curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=v1.19 INSTALL_K3S_BIN_DIR=/usr/local/bin INSTALL_K3S_EXEC="--disable=traefik" sh -

idcrook commented 3 years ago

note: /opt/bin does not exist "out-of-the-box" on Raspberry Pi OS (32 bit) or Ubuntu 20.04 (64-bit)

brandond commented 3 years ago

2640