openfaas/faasd

faasd hack/install.sh containerd install typo

nunix opened this issue · 5 comments

nunix commented

Due diligence

My actions before raising this issue

After starting a LIMA instance based on faasd template, I could shell in and see that faasd was actually not installed.
Tried to run the install command based on the script (https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh) and I got a containerD error (see below).

LIMA by default create all instances with containerD and ssh installed and configured.

Why do you need this?

LIMA has a faasd template and I wanted to write about it. However due to this issue, faasd instance does not run or it's not configured properly.

Expected Behaviour

faasd is installed without trying to re-install containerD.

Current Behaviour

Due to the typo, the install_containerd function tries to install containerD, however as it's already installed, the script ends with the error: open /usr/local/bin/containerd: text file busy

Are you a GitHub Sponsor (Yes/No?)

Check at: https://github.com/sponsors/openfaas

  • Yes
  • [ X ] No

Not currently a sponsor, but will resume very soon (was for about 1y)

List All Possible Solutions and Workarounds

The character : should be replaced by \

Which Solution Do You Recommend?

Correct the typo.

Steps to Reproduce (for bugs)

  1. Create a new instance: limactl start template://faasd
  2. [optional] change the configuration
  3. Shell in the instance: limactl shell faasd
  4. Run faasd install command: curl -sfL https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh | bash -s -

Your Environment

  • OS and architecture: MacOS Monterey v12.4 on Intel Macbook pro

  • Versions:

go version
N/A

containerd -version
v1.6.4

uname -a
Linux 5.15.0-25-generic

cat /etc/os-release
Ubuntu 22.04 LTS

faasd version
N/A
nunix commented

This is a non-issue from faasd. Will re-open against LIMA repo.

Just to update folks who dropped by here.

X || : means - execute X and if it fails, exit with exit code 0, so continue processing as normal.

I'm not sure why changing || : to \ "fixes" allows things to continue because if the former "X" fails, anything after in a continuation should do too.

cc @welteki

nunix commented

@alexellis created: lima-vm/lima#880
I could finally pinpoint the issue. Thanks a lot for your time and answers.

Thank you 👍