[
https://issues.apache.org/jira/browse/HDDS-7646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai reassigned HDDS-7646:
--------------------------------------
Assignee: (was: Szabolcs Gál)
> No logs if pod stuck in PodInitializing
> ---------------------------------------
>
> Key: HDDS-7646
> URL: https://issues.apache.org/jira/browse/HDDS-7646
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: test
> Reporter: Attila Doroszlai
> Priority: Major
> Labels: usability
>
> Kubernetes check fails to get pod logs if cluster cannot start.
> {code:title=https://github.com/dombizita/ozone/actions/runs/3686201025/jobs/6238380664#step:5:362}
> Defaulted container "scm" out of: scm, init (init)
> Error from server (BadRequest): container "scm" in pod "scm-0" is waiting to
> start: PodInitializing
> {code}
> {code:title=https://github.com/apache/ozone/blob/6064b8457655b4aa3d9358699deee4e80c45c19d/hadoop-ozone/dist/src/main/k8s/examples/testlib.sh#L83-L91}
> get_logs() {
> mkdir -p logs
> for pod in $(kubectl get pods -o custom-columns=NAME:.metadata.name | tail
> -n +2); do
> for initContainer in $(kubectl get pod -o
> jsonpath='{.spec.initContainers[*].name}' "${pod}"); do
> kubectl logs "${pod}" "${initContainer}" >
> logs/"pod-${pod}-${initContainer}.log"
> done
> kubectl logs "${pod}" > logs/"pod-${pod}.log"
> done
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]