log collector script distro check issue in sherlock()
Opened this issue · 0 comments
kourosh7 commented
I think the following lines should be an elif
:
https://github.com/rancherlabs/support-tools/blob/master/collection/rancher/v2.x/logs-collector/rancher2_logs_collector.sh#L101
https://github.com/rancherlabs/support-tools/blob/master/collection/rancher/v2.x/logs-collector/rancher2_logs_collector.sh#L114
https://github.com/rancherlabs/support-tools/blob/master/collection/rancher/v2.x/logs-collector/rancher2_logs_collector.sh#L129
Example of why:
- have an RKE2 CP node with
rke2-server.service
down - have docker also running on that node
- run the log collector script
Even though this is an RKE2 CP node, it will evaluate line 114 and give you an rke1 log bundle incorrectly. This is becausecontainerd
is down due to step 1 and so thecrictl ps
check in line 104 fails so it moves on to the next if block that checks if docker is running and then thinks its an rke1 node.
Would it also be better to have a different check other than just doing crictl ps
? I wonder if some of the log bundles we get are missing the distro directory because their containerd is down?