Skip to content
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

Log collector automatic detection does not work for the new added kubeadm clusters #212

Open
gnuninu opened this issue Feb 2, 2023 · 0 comments

Comments

@gnuninu
Copy link

gnuninu commented Feb 2, 2023

PR #211 introduced recent support for Kubeadm clusters using the switch -r kubeadm
However, automatic detection is not working at the moment because a check is missing from the sherlock function.
This is an important feature when it comes to embed the script into other collector tools like supportconfig as plugin.

Details:

wget https://raw.githubusercontent.com/rancherlabs/support-tools/master/collection/rancher/v2.x/logs-collector/rancher2_logs_collector.sh


sudo ./rancher2_logs_collector.sh 
2023-02-01 15:30:33: Created ./tmp.jchaD0DGbD
2023-02-01 15:30:33: Detecting available commands... renice ionoice
2023-02-01 15:30:33: Detecting OS... opensuse-leap 15.4
2023-02-01 15:30:33: Detecting k8s distribution... 
2023-02-01 15:30:33: couldn't detect k8s distro

It's missing this part in the sherlock function:

      if $(command -v kubeadm >/dev/null 2>&1)
        then
          if $(kubeadm version >/dev/null 2>&1)
            then
              DISTRO=kubeadm
              echo "kubeadm"
            else
              FOUND+="kubeadm"
          fi
      fi

This is harmless because kubeadm is not installed and unnecessary in Rancher clusters
I am more than happy to send a new PR to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant