Skip to content

Commit a04e383

Browse files
committed
Capture nvidiadriver CRs as well
Changes include: 1. Additional step to capture nvidiadriver CRs as well 2. Capture pod logs with timestamps. Without this, for ex for driver pods, its difficult to tell when the pod was restarted. Signed-off-by: Rahul Sharma <[email protected]>
1 parent f463225 commit a04e383

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

hack/must-gather.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,21 @@ else
101101
touch "${ARTIFACT_DIR}/cluster_policy.missing"
102102
fi
103103

104+
echo
105+
echo "#"
106+
echo "# NVIDIADriver"
107+
echo "#"
108+
echo
109+
110+
NVIDIA_DRIVERS=$($K get nvidiadrivers.nvidia.com -A -oname)
111+
112+
if [[ "${NVIDIA_DRIVERS}" ]]; then
113+
echo "Get NVIDIADriver resources"
114+
$K get nvidiadrivers.nvidia.com -A -oyaml > "${ARTIFACT_DIR}/nvidia_drivers.yaml"
115+
else
116+
echo "NVIDIADriver resource(s) not found in the cluster."
117+
fi
118+
104119
echo
105120
echo "#"
106121
echo "# Nodes and machines"
@@ -166,10 +181,12 @@ $K get "${OPERATOR_POD_NAME}" \
166181
echo "Get the GPU Operator Pod logs"
167182
$K logs "${OPERATOR_POD_NAME}" \
168183
-n "${OPERATOR_NAMESPACE}" \
184+
--timestamps \
169185
> "${ARTIFACT_DIR}/gpu_operator_pod.log"
170186

171187
$K logs "${OPERATOR_POD_NAME}" \
172188
-n "${OPERATOR_NAMESPACE}" \
189+
--timestamps \
173190
--previous \
174191
> "${ARTIFACT_DIR}/gpu_operator_pod.previous.log"
175192

@@ -212,11 +229,13 @@ do
212229
$K logs "${pod}" \
213230
-n "${OPERATOR_NAMESPACE}" \
214231
--all-containers --prefix \
232+
--timestamps \
215233
> "${ARTIFACT_DIR}/gpu_operand_pod_$pod_name.log"
216234

217235
$K logs "${pod}" \
218236
-n "${OPERATOR_NAMESPACE}" \
219237
--all-containers --prefix \
238+
--timestamps \
220239
--previous \
221240
> "${ARTIFACT_DIR}/gpu_operand_pod_$pod_name.previous.log"
222241

0 commit comments

Comments
 (0)