Skip to content

Commit

Permalink
fix(collector-longhorn): k3s cluster missing kubelet log
Browse files Browse the repository at this point in the history
ref: longhorn-7121

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang committed Nov 17, 2023
1 parent bb02d7d commit c518027
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/collector-longhorn
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ function collect_kubelet_log(){
# ref. https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-location-node
chroot ${HOST_PATH} /usr/bin/journalctl -r -u kubelet > kubelet.log

# For K3s cluster
chroot ${HOST_PATH} /usr/bin/journalctl -r -u k3s.service > k3s-service.log
chroot ${HOST_PATH} /usr/bin/journalctl -r -u k3s-agent.service > k3s-agent-service.log

if [ -f ${RKE2_KUBELET_LOG_PATH} ]; then
cp ${RKE2_KUBELET_LOG_PATH} .
fi
Expand Down

0 comments on commit c518027

Please sign in to comment.