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

Remove "disable automatic shutdown" #3942

Merged
merged 4 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions cylc/flow/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,6 @@
(e.g. ``+05:30``), given that the time zone is used as part of
task output filenames.
''')
Conf('disable automatic shutdown', VDR.V_BOOLEAN, desc='''
This has the same effect as the ``--no-auto-shutdown`` flag for
the suite run commands: it prevents the suite server program from
shutting down normally when all tasks have finished (a suite
timeout can still be used to stop the daemon after a period of
inactivity, however). This option can make it easier to re-trigger
tasks manually near the end of a suite run, during suite
development and debugging.
''')

with Conf('main loop'):
with Conf('<plugin name>'):
Expand Down Expand Up @@ -1380,6 +1371,7 @@ def upg(cfg, descr):
u.obsolete('8.0.0', ['cylc', 'abort if any task fails'])
u.obsolete('8.0.0', ['cylc', 'events', 'abort if any task fails'])
u.obsolete('8.0.0', ['cylc', 'events', 'mail retry delays'])
u.obsolete('8.0.0', ['cylc', 'disable automatic shutdown'])
u.deprecate(
'8.0.0',
['cylc', 'task event mail interval'],
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/etc/syntax/cylc.lang
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
<keyword>exclude at start-up</keyword>
<keyword>exclude</keyword>
<keyword>env-script</keyword>
<keyword>disable automatic shutdown</keyword>
<keyword>description</keyword>
<keyword>default node attributes</keyword>
<keyword>default edge attributes</keyword>
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/etc/syntax/cylc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
<RegExpr attribute='Keyword' String=' exclude at start-up '/>
<RegExpr attribute='Keyword' String=' exclude '/>
<RegExpr attribute='Keyword' String=' env-script '/>
<RegExpr attribute='Keyword' String=' disable automatic shutdown '/>
<RegExpr attribute='Keyword' String=' description '/>
<RegExpr attribute='Keyword' String=' default node attributes '/>
<RegExpr attribute='Keyword' String=' default edge attributes '/>
Expand Down
18 changes: 0 additions & 18 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ class Scheduler:
options: Values = None

# suite params
can_auto_stop: bool = True
stop_mode: StopMode = None
stop_task: str = None
stop_clock_time: int = None
Expand Down Expand Up @@ -525,14 +524,6 @@ async def configure(self):
if self.options.profile_mode:
self.previous_profile_point = 0
self.count = 0
if self.options.no_auto_shutdown is not None:
self.can_auto_stop = not self.options.no_auto_shutdown
elif (
self.config.cfg['scheduler']['disable automatic shutdown']
is not None
):
self.can_auto_stop = (
not self.config.cfg['scheduler']['disable automatic shutdown'])

self.profiler.log_memory("scheduler.py: end configure")

Expand Down Expand Up @@ -1178,13 +1169,6 @@ def _load_suite_params(self, row_idx, row):
if self.options.holdcp is None:
self.options.holdcp = value
LOG.info('+ hold point = %s', value)
elif key == self.suite_db_mgr.KEY_NO_AUTO_SHUTDOWN:
value = bool(int(value))
if self.options.no_auto_shutdown is None:
self.options.no_auto_shutdown = value
LOG.info('+ no auto shutdown = %s', value)
else:
LOG.debug('- no auto shutdown = %s (ignored)', value)
elif key == self.suite_db_mgr.KEY_STOP_CLOCK_TIME:
value = int(value)
if time() <= value:
Expand Down Expand Up @@ -1737,8 +1721,6 @@ def stop_clock_done(self):

def check_auto_shutdown(self):
"""Check if we should do an automatic shutdown: main pool empty."""
if not self.can_auto_stop:
return False
self.pool.release_runahead_tasks()
if self.pool.get_tasks():
return False
Expand Down
12 changes: 0 additions & 12 deletions cylc/flow/scheduler_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,6 @@ def get_option_parser(is_restart, add_std_opts=False):
help="Do not daemonize the suite (infers --format=plain)",
action="store_true", dest="no_detach")

parser.add_option(
"-a", "--no-auto-shutdown", help="Do not shut down"
" the suite automatically when all tasks have finished."
" This flag overrides the corresponding suite config item.",
action="store_true", dest="no_auto_shutdown")
hjoliver marked this conversation as resolved.
Show resolved Hide resolved

parser.add_option(
"--auto-shutdown", help="Shut down"
" the suite automatically when all tasks have finished."
" This flag overrides the corresponding suite config item.",
action="store_false", dest="no_auto_shutdown")

parser.add_option(
"--profile", help="Output profiling (performance) information",
action="store_true", dest="profile_mode")
Expand Down
5 changes: 0 additions & 5 deletions cylc/flow/suite_db_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class SuiteDatabaseManager:
KEY_UTC_MODE = 'UTC_mode'
KEY_HOLD = 'is_held'
KEY_HOLD_CYCLE_POINT = 'holdcp'
KEY_NO_AUTO_SHUTDOWN = 'no_auto_shutdown'
KEY_RUN_MODE = 'run_mode'
KEY_STOP_CLOCK_TIME = 'stop_clock_time'
KEY_STOP_TASK = 'stop_task'
Expand Down Expand Up @@ -316,10 +315,6 @@ def put_suite_params(self, schd):
if value is not None:
self.db_inserts_map[self.TABLE_SUITE_PARAMS].append({
"key": key, "value": value})
if schd.options.no_auto_shutdown is not None:
self.db_inserts_map[self.TABLE_SUITE_PARAMS].append({
"key": self.KEY_NO_AUTO_SHUTDOWN,
"value": int(schd.options.no_auto_shutdown)})
for key in (self.KEY_STOP_CLOCK_TIME, self.KEY_STOP_TASK):
value = getattr(schd, key, None)
if value is not None:
Expand Down
76 changes: 0 additions & 76 deletions tests/flakyfunctional/restart/47-no-auto-stop.t

This file was deleted.

3 changes: 1 addition & 2 deletions tests/functional/deprecations/01-cylc8-basic/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
mail from =
mail smtp =
mail footer =
disable automatic shutdown =
[[reference test]]
allow task failures =
live mode suite timeout =
Expand All @@ -38,5 +39,3 @@
mail to =
mail smtp =
mail retry delays =


Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WARNING - * (8.0.0) [cylc][reference test][suite shutdown event handler] - DELE
WARNING - * (8.0.0) [runtime][foo, cat, dog][job][shell] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [runtime][foo, cat, dog][events][mail retry delays] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][abort if any task fails] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][disable automatic shutdown] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][task event mail interval] -> [cylc][mail][task event batch interval] - value unchanged
WARNING - * (8.0.0) [cylc][mail to] -> [cylc][mail][to] - value unchanged
WARNING - * (8.0.0) [cylc][mail from] -> [cylc][mail][from] - value unchanged
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand All @@ -21,18 +21,13 @@ set_test_number 4

install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}"

run_ok "${TEST_NAME_BASE}-run" cylc run "${SUITE_NAME}"
TIMEOUT=$(($(date +%s) + 60))
while (($(date +%s) < TIMEOUT)) && \
! grep -q '\[t1\.1\] .* succeeded' "${SUITE_RUN_DIR}/log/suite/log"
do
sleep 1
done
poll_suite_stopped

grep_ok '\[t1\.1\] .*succeeded' "${SUITE_RUN_DIR}/log/suite/log"

sleep 5
cylc stop --max-polls=10 --interval=2 "${SUITE_NAME}" 1>'/dev/null' 2>&1
run_fail "${TEST_NAME_BASE}-stall" \
run_fail "${TEST_NAME_BASE}-not-stalled" \
grep -q -F 'WARNING - suite stalled' "${SUITE_RUN_DIR}/log/suite/log"
purge
exit
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!jinja2
[scheduler]
disable automatic shutdown = True
[[events]]
abort on stalled = True
abort on inactivity = True
Expand Down
78 changes: 0 additions & 78 deletions tests/functional/restart/48-enable-auto-stop.t

This file was deleted.

Loading