ucsf-wynton / wynton-tools

0 stars 0 forks source link

Report on upcoming downtimes #6

Open HenrikBengtsson opened 11 months ago

HenrikBengtsson commented 11 months ago

Wynton uses SGE calendars to schedule downtimes;

$ mapfile -t cals < <(qconf -scall)
$ for cal in "${cals[@]}"; do qconf -scal "${cal}"; done
calendar_name    beegfs_outage
year             8.7.2019-12.7.2019=off
week             NONE
calendar_name    cc_outage
year             23.10.2019=1-7=off
week             NONE
calendar_name    maint_downtime
year             30.10.2023,31.10.2023,1.11.2023,2.11.2023,3.11.2023=off
week             NONE
calendar_name    n106_outage
year             4.8.2021=14:30-23:59=off 5.8.2021=0:00-8:00=off
week             NONE
calendar_name    rowA_downtime
year             27.4.2022=8-15=off
week             NONE

These are only effective if applies to the queues, e.g.

$ mapfile -t queues < <(qconf -sql)
$ for queue in "${queues[@]}"; do cal=$(qconf -sq "${queue}" | grep -E "^calendar[[:space:]]" | sed 's/.* //'); echo "${queue}: ${cal:-<none>}"; done
4gpu.q: maint_downtime
gpu.q: maint_downtime
long.q: maint_downtime
member.q: maint_downtime
ondemand.q: maint_downtime
short.q: maint_downtime
test.q: maint_downtime

We could parse this and have wynton queues, wynton status, wynton job ..., etc. report on any upcoming downtimes.