Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host select #3489

Merged
merged 11 commits into from
Mar 30, 2020
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ jobs:

- <<: *flakytest
python: "3.7"
env: FLAKYTESTS="./flakytests"
env:
FLAKYTESTS="./flakytests"
CYLC_TEST_DEBUG=true

# TODO: run shortlist of regression tests with the
# least contemporary Python version
1 change: 1 addition & 0 deletions .travis/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def main():
if flakytests:
command.append(flakytests)
command.append('--jobs=1')
command.append('-v')
else:
command.append('--jobs=5')
# Safe here - only used in Travis CI for tests with predefined environment
Expand Down
6 changes: 1 addition & 5 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,7 @@
'run ports': [VDR.V_INTEGER_LIST, list(range(43001, 43101))],
'condemned hosts': [VDR.V_ABSOLUTE_HOST_LIST],
'auto restart delay': [VDR.V_INTERVAL],
'run host select': {
'rank': [VDR.V_STRING, 'random', 'load:1', 'load:5', 'load:15',
'memory', 'disk-space'],
'thresholds': [VDR.V_STRING],
},
'ranking': [VDR.V_STRING]
},
}

Expand Down
16 changes: 16 additions & 0 deletions cylc/flow/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,19 @@ class CylcMissingFinalCyclePointError(CyclingError):
class PlatformLookupError(CylcConfigError):
"""Unable to determine the correct job platform from the information
given"""


class HostSelectException(CylcError):
"""No hosts could be selected from the provided configuration."""

def __init__(self, data):
self.data = data
CylcError.__init__(self)

def __str__(self):
ret = f'Could not select host from:'
for host, data in sorted(self.data.items()):
ret += f'\n {host}:'
for key, value in data.items():
ret += f'\n {key}: {value}'
return ret
298 changes: 0 additions & 298 deletions cylc/flow/host_appointer.py

This file was deleted.

Loading