collect logs when ci-entrypoint.sh is used to run e2e tests#2043
Conversation
2094ead to
714bf14
Compare
714bf14 to
7748acd
Compare
|
/assign @jsturtevant @CecileRobertMichon |
| echo "Deploying log-dump-daemonset-windows" | ||
| "${KUBECTL}" apply -f "${REPO_ROOT}/hack/log/log-dump-daemonset-windows.yaml" | ||
| echo "Waiting for log-dump-daemonset-windows" | ||
| "${KUBECTL}" wait pod -l app=log-dump-node-windows --for=condition=Ready --timeout=5m |
There was a problem hiding this comment.
Does anyone know if this would cause issues if there aren't any windows nodes / the DS doesn't schedule any pods?
I'm assuming not but will try and test this out...
There was a problem hiding this comment.
I think it should be fine since total number of pods will be 0. Did you try it out?
There was a problem hiding this comment.
I tried this out and the kubectl command returned with exitcode 1 (and error: no matches resources found).
when I ran kubectl get pod -l app=log-dump-node-windows -ojsonpath='{.items[*].metadata.name}' like on the next line that returns success and no output.
Should we let the wait command fail and exit out of the function or should I add || true there and just the for loop no-op?
There was a problem hiding this comment.
I added a check to see if TEST_WINDOWS envvar was set and only call dump_workload_cluster_logs_windows if it is
|
/retest |
jsturtevant
left a comment
There was a problem hiding this comment.
Looks like you had fun with slashes between windows and linux 😄
| echo "Deploying log-dump-daemonset-windows" | ||
| "${KUBECTL}" apply -f "${REPO_ROOT}/hack/log/log-dump-daemonset-windows.yaml" | ||
| echo "Waiting for log-dump-daemonset-windows" | ||
| "${KUBECTL}" wait pod -l app=log-dump-node-windows --for=condition=Ready --timeout=5m |
There was a problem hiding this comment.
I think it should be fine since total number of pods will be 0. Did you try it out?
I also had fun with the carriage return windows adds in addition to the newline character (which I forgot about) |
7748acd to
15704ac
Compare
|
logs are now showing up for the windows nodes: https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/2043/pull-cluster-api-provider-azure-ci-entrypoint/1489741966068420608/artifacts/workload-cluster/capz-jmsa-xpglz/ /lgtm |
|
This is great and looks good to me. I noticed that the default node dump log is 0 bytes. Is that expected? |
Yes, that container runs the pause image which doesn't log anything to stdout/stderr. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Gets pod logs for Windows nodes when cluster is provisioned with ci-entrypoint.sh
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #1864
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: