File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -336,3 +336,36 @@ function web-logs-tail() {
336
336
tail -f /var/log/caddy/access.log | jq -r ' "\(.request.host)\(.request.uri)\t\t\(.request.headers."User-Agent")"'
337
337
)
338
338
}
339
+
340
+
341
+ function nom-deploys-check() {
342
+ # admin script that more thoroughly finds and prints out any deploys with any kind of issues
343
+ nomad system gc
344
+ sleep 1.5
345
+ clear -x
346
+ echo ' Task Group Version Desired Status Created Modified'
347
+ ( for i in $( nomad node status | grep -Fv Eligibility | cut -f1 -d' ' ) ; do
348
+ nomad node status -short $i \
349
+ | grep -E ' ^Name|run' \
350
+ | grep -Fv running \
351
+ | perl -pe ' s/^[^ ]+ +[^ ]+ +//'
352
+ done ) \
353
+ | grep -Ev ' ^[^ ]+$' -B1
354
+ # NOTE:👆🏽 final grep is to show any nomad server names (that have deploys with issues)
355
+
356
+ line
357
+
358
+ nomad status | grep -Fv running
359
+ }
360
+
361
+
362
+ function nom-supervisor-status () {
363
+ # admin script that shows the supervisord status of all jobs in each HinD cluster's VMs
364
+ # requires `ssh` access to each VM that is running HinD
365
+ for NODE in $( nomad node status -t ' {{range .}}{{.Name}}{{"\n"}}{{end}}' | sort | grep -E .) ; do
366
+ echo " === $NODE ==="
367
+ ssh $NODE ' sudo podman exec -it hind sh -c "supervisorctl status"'
368
+ echo
369
+ done
370
+ }
371
+
You can’t perform that action at this time.
0 commit comments