Skip to content
This repository was archived by the owner on Dec 3, 2021. It is now read-only.

Commit a421ee0

Browse files
committed
Added WIP function for gathering debug information
Signed-off-by: Matt Oswalt <[email protected]>
1 parent 47e9d7d commit a421ee0

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ _old_contrail/
4040
*ansiblekey.json
4141

4242
platform/antidote-web/target/
43+
44+
selfmedicatedebug

selfmedicate.sh

+23
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,29 @@ sub_start(){
184184
echo -e "${GREEN}Finished!${NC} Antidote should now be available at http://antidote-local:30001/"
185185
}
186186

187+
sub_debug(){
188+
debugs=(
189+
"kubectl -n=ptr get pods --all-namespaces"
190+
"kubectl -n=ptr describe pods --all-namespaces"
191+
"kubectl -n=ptr logs $(kubectl -n=ptr get pods | awk '/syringe/ {print $1;exit}')"
192+
)
193+
194+
echo "Please wait while debug information is gathered..."
195+
196+
rm -f selfmedicatedebug && touch selfmedicatedebug
197+
for i in "${debugs[@]}"
198+
do
199+
echo -e "\n==============================" >> selfmedicatedebug
200+
echo "$i" >> selfmedicatedebug
201+
echo -e "==============================\n" >> selfmedicatedebug
202+
203+
eval $i >> selfmedicatedebug
204+
# date
205+
done
206+
207+
echo "Done."
208+
}
209+
187210
sub_reload(){
188211
echo "Reloading lesson content, please wait..."
189212
kubectl delete pod $(kubectl get pods | grep syringe | awk '{ print $1 }') >> /dev/null

0 commit comments

Comments
 (0)