-
Notifications
You must be signed in to change notification settings - Fork 94
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
paths if you sudo #258
Comments
I'm assuming you are asking about the logs-collector script. It is normally recommend to run that script as the root user with sudo. Can you try this?
|
Sorry, I should have specified the script. https://raw.githubusercontent.com/rancherlabs/support-tools/master/collection/rancher/v2.x/systems-information/systems_summary.sh SUSE docs (https://www.suse.com/support/kb/doc/?id=000020192) say to run the like script with "| sudo -E bash -s" at the end which causes the PATH error or newer systems. If you don't use sudo it works fine. I know the issue is doc related, but it'd still be nice to have that PATH in there for people trying it that way. rancher:~/rancher # cat /etc/os-release rancher:~/rancher # env | grep PATH rancher:~/rancher # sudo env | grep PATH rancher:~/rancher # wget -O- https://raw.githubusercontent.com/rancherlabs/support-tools/master/collection/rancher/v2.x/systems-information/systems_summary.sh | sudo -E bash -s
2024-03-18 14:19:52 (35.1 MB/s) - written to stdout [2772/2772] Rancher Systems Summary ReportRun on Mon Mar 18 14:19:52 UTC 2024 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? rancher:~/rancher # which k3s rancher:~/rancher # kubectl get nodes rancher:~/rancher # kubectl get deployments -o wide -n cattle-system |
sudo on a SLES 15 and I'm assuming other OSs removes some of the PATHs. So when the script looks for k3s and rke2 if you sudo it removes "/usr/local/bin" from the path which causes the script fails. Since we know where k3s and rke2 is going to install by default, I suggest we add /usr/local/bin to the path in the script when checking for k3s/rke2. Then if users uses sudo like in the docs it'll still work.
The text was updated successfully, but these errors were encountered: