netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.04k stars 441 forks source link

Netbird configure.sh script fails to detect Curl is actually installed. #2019

Open alex-ritter opened 2 months ago

alex-ritter commented 2 months ago

Describe the problem

When trying to run configure.sh from infrastructure_files the following error message happens :

'This script uses curl fetch OpenID configuration from IDP.'

Currently I'm installing NetBird via ansible to deploy NetBird as IaC, and I'm installing curl before installing Netbird. Directly in the terminal I can run curl before running configure.sh

image

To Reproduce

Steps to reproduce the behavior:

  1. Create a new Alma Linux 9.0 LXC container on Proxmox.
  2. Install Docker, Git, and Curl
  3. Follow the Netbird install documentation up-to configure.sh
  4. The first 2 checks in configure.sh fails

Expected behavior

Netbird should know Curl is installed and move onto the JQ check

Are you using NetBird Cloud?

No

NetBird version

Latest (installed latest from GitHub via IaC)

Additional context

The reason why Netbird fails to verify Curl is installed is because configure.sh is using Which to check if curl is installed, and Which actually is not installed by default on Red Hat / Alma Linux 9, at least for Alma Linux LXC cloud containers.

pascal-fischer commented 2 months ago

Hi @alex-ritter, What's blocking you from installing which as well? We could update the script with a different detection. Does either command -v curl or type curl work on your container?

alex-ritter commented 2 months ago

Hi Pascal

It's currently not affecting my deployment currently since I know why the script is failing. The script is failing because it can't find the package 'Which' on Alma Linux 9 by default but there isn't a condition to check if this package is installed. Netbird uses Which to check if Curl or JQ is installed so what's why it's saying that curl is uninstalled.

I can take a look at this and update the script once I finish the netbird deployment on my side :) It should be a simple enough fix and I've already updated the script on my end to handle it.