Skip to content

Commit

Permalink
Hotfix for undefined CLUSTERS (NOAA-EMC#2748)
Browse files Browse the repository at this point in the history
Defines `CLUSTERS` as an empty string for all hosts except Gaea and uses
the native `dict` `get` method to prevent grabbing an unset entry.
  • Loading branch information
DavidHuber-NOAA authored Jul 3, 2024
1 parent 7dc6651 commit 2bd106a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions workflow/hosts/awspw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ QUEUE_SERVICE: batch
PARTITION_BATCH: compute
PARTITION_SERVICE: compute
RESERVATION: ''
CLUSTERS: ''
CHGRP_RSTPROD: 'YES'
CHGRP_CMD: 'chgrp rstprod' # TODO: This is not yet supported.
HPSSARCH: 'YES'
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ QUEUE_SERVICE: ''
PARTITION_BATCH: ''
PARTITION_SERVICE: ''
RESERVATION: ''
CLUSTERS: ''
CHGRP_RSTPROD: 'YES'
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'NO'
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: hera
PARTITION_SERVICE: service
RESERVATION: ''
CHGRP_RSTPROD: 'YES'
CLUSTERS: ''
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'YES'
HPSS_PROJECT: emc-global
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/hercules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: hercules
PARTITION_SERVICE: service
RESERVATION: ''
CHGRP_RSTPROD: 'YES'
CLUSTERS: ''
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'NO'
HPSS_PROJECT: emc-global
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/jet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: kjet
PARTITION_SERVICE: service
RESERVATION: ''
CHGRP_RSTPROD: 'YES'
CLUSTERS: ''
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'YES'
HPSS_PROJECT: emc-global
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/orion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: orion
PARTITION_SERVICE: service
RESERVATION: ''
CHGRP_RSTPROD: 'YES'
CLUSTERS: ''
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'NO'
HPSS_PROJECT: emc-global
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/s4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: s4
PARTITION_SERVICE: serial
RESERVATION: ''
CHGRP_RSTPROD: 'NO'
CLUSTERS: ''
CHGRP_CMD: 'ls'
HPSSARCH: 'NO'
HPSS_PROJECT: emc-global
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/wcoss2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PARTITION_BATCH: ''
PARTITION_SERVICE: ''
RESERVATION: ''
CHGRP_RSTPROD: 'YES'
CLUSTERS: ''
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'NO'
HPSS_PROJECT: emc-global
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_resource(self, task_name):
native = '--export=NONE'
if task_config['RESERVATION'] != "":
native += '' if task_name in Tasks.SERVICE_TASKS else ' --reservation=' + task_config['RESERVATION']
if task_config['CLUSTERS'] not in ["", '@CLUSTERS@']:
if task_config.get('CLUSTERS', "") not in ["", '@CLUSTERS@']:
native += ' --clusters=' + task_config['CLUSTERS']

queue = task_config['QUEUE_SERVICE'] if task_name in Tasks.SERVICE_TASKS else task_config['QUEUE']
Expand Down

0 comments on commit 2bd106a

Please sign in to comment.