Skip to content

Commit

Permalink
CI: improve log artifacts
Browse files Browse the repository at this point in the history
Putting the Kubernetes version nearer the start of the file names ensures that
files for the same test case are grouped together when sorting. Sorting by the
type of content is less useful because usually one wants to investigate a
specific test failure which occurred under a specific Kubernetes version.

Splitting up log messages by node makes the individual files smaller and
simplifies debugging of a problem that occurred on a specific node.

To debug the spontanuous node
reboot (intel#1055) the full systemd journal
is needed.
  • Loading branch information
pohly committed Dec 7, 2021
1 parent 858d2ca commit 4df2ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ void TestInVM(worker, distro, distroVersion, kubernetesVersion, skipIfPR) {
"
} } finally {
echo "Writing cluster state and kubelet logs into files."
sh "_work/${env.CLUSTER}/ssh.0 kubectl get nodes -o wide > joblog-${BUILD_TAG}-nodestate-${kubernetesVersion}.log"
sh "_work/${env.CLUSTER}/ssh.0 kubectl get pods --all-namespaces -o wide > joblog-${BUILD_TAG}-podstate-${kubernetesVersion}.log"
sh "for cmd in `ls _work/${env.CLUSTER}/ssh.*`; do \$cmd sudo journalctl -u kubelet >> joblog-${BUILD_TAG}-kubeletlogs-${kubernetesVersion}.log; done"
sh "_work/${env.CLUSTER}/ssh.0 kubectl get nodes -o wide > joblog-${BUILD_TAG}-${kubernetesVersion}-nodestate.log"
sh "_work/${env.CLUSTER}/ssh.0 kubectl get pods --all-namespaces -o wide > joblog-${BUILD_TAG}-${kubernetesVersion}-podstate.log"
sh "for cmd in `ls _work/${env.CLUSTER}/ssh.*`; do suffix=`basename \$cmd | sed -e s/^ssh.//`; \$cmd sudo journalctl -u kubelet > joblog-${BUILD_TAG}-${kubernetesVersion}-kubelet.\${suffix}.log; \$cmd sudo journalctl > joblog-${BUILD_TAG}-${kubernetesVersion}-journal-\${suffix}.log; done"
// Each test run produces junit_*.xml files with testsuite name="PMEM E2E suite".
// To make test names unique in the Jenkins UI, we rename that test suite per run,
// mangle the <testcase name="..." classname="..."> such that
Expand Down

0 comments on commit 4df2ebd

Please sign in to comment.