From d94b6e4d84fc3f9ed8d12ea1c200e81506223b7a Mon Sep 17 00:00:00 2001 From: Michael Kavulich Date: Wed, 11 Oct 2023 09:36:20 -0600 Subject: [PATCH] [release/public-v2.2.0] Fix crontab bug for Cheyenne and Derecho, update PR template for new platforms (#939) The option to create an experiment with the option USE_CRON_TO_RELAUNCH=True is currently broken on Cheyenne and Derecho due to some bad python logic. This fixes that issue. Also took the opportunity to update the PR template to include the new supported platforms (Derecho, Hercules, and Gaea C5) Contains an additional fix for removing old crontab entries on Cheyenne and Derecho --- .github/PULL_REQUEST_TEMPLATE | 3 +++ ush/get_crontab_contents.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 7b1cdbf109..1c363c651f 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -32,9 +32,12 @@ - [ ] hera.intel - [ ] orion.intel +- [ ] hercules.intel - [ ] cheyenne.intel - [ ] cheyenne.gnu +- [ ] derecho.intel - [ ] gaea.intel +- [ ] gaeac5.intel - [ ] jet.intel - [ ] wcoss2.intel - [ ] NOAA Cloud (indicate which platform) diff --git a/ush/get_crontab_contents.py b/ush/get_crontab_contents.py index 5e9ccd6fa8..58a17bf35c 100644 --- a/ush/get_crontab_contents.py +++ b/ush/get_crontab_contents.py @@ -35,11 +35,10 @@ def get_crontab_contents(called_from_cron, machine, debug): # themselves being called as cron jobs. In that case, we must instead # call the system version of crontab at /usr/bin/crontab. # - if machine == "CHEYENNE" or machine == "DERECHO": + crontab_cmd = "crontab" + if machine.upper() == "CHEYENNE" or machine.upper() == "DERECHO": if called_from_cron: crontab_cmd = "/usr/bin/crontab" - else: - crontab_cmd = "crontab" print_info_msg( f"""