-
Notifications
You must be signed in to change notification settings - Fork 95
host-select: fix compatibility with force-condemned hosts #6623
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Auto restart: The "force condemn" option (that tells workflows running on a | ||
| server to shutdown as opposed to migrate) hasn't worked with the host-selection | ||
| mechanism since Cylc 8.0.0. This has now been fixed and the "force condemn" | ||
| option has been restored in the documentation. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -826,16 +826,54 @@ def default_for( | |||||||||||||||
| range. | ||||||||||||||||
| ''') | ||||||||||||||||
| Conf('condemned', VDR.V_ABSOLUTE_HOST_LIST, desc=f''' | ||||||||||||||||
| These hosts will not be used to run jobs. | ||||||||||||||||
| List run hosts that workflows should *not* run on. | ||||||||||||||||
|
|
||||||||||||||||
| If workflows are already running on | ||||||||||||||||
| condemned hosts, Cylc will shut them down and | ||||||||||||||||
| restart them on different hosts. | ||||||||||||||||
| These will be subtracted from the | ||||||||||||||||
| `available <global.cylc[scheduler][run hosts]>`: | ||||||||||||||||
|
|
||||||||||||||||
| * Workflows will not start on condemned hosts. | ||||||||||||||||
| * Workflows that are running on condemned hosts will attempt | ||||||||||||||||
| to migrate to an available host (providing the | ||||||||||||||||
|
Comment on lines
+835
to
+836
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Superfluous in combo with next paragraph. |
||||||||||||||||
| `auto restart | ||||||||||||||||
| <global.cylc[scheduler][main loop][auto restart]>` | ||||||||||||||||
| plugin is enabled). | ||||||||||||||||
|
|
||||||||||||||||
| This feature can be used to drain a host for patching, or | ||||||||||||||||
| remove a host that is surplus to requirements. | ||||||||||||||||
|
|
||||||||||||||||
| If a hostname listed here is followed by a ``!`` character | ||||||||||||||||
| ("force mode"), workflows running on it | ||||||||||||||||
| will shutdown rather than attempting to | ||||||||||||||||
| migrate (providing the | ||||||||||||||||
|
Comment on lines
+844
to
+847
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| `auto restart | ||||||||||||||||
| <global.cylc[scheduler][main loop][auto restart]>` plugin | ||||||||||||||||
| is enabled). | ||||||||||||||||
|
|
||||||||||||||||
| .. rubric:: Example: | ||||||||||||||||
|
|
||||||||||||||||
| .. code-block:: cylc | ||||||||||||||||
|
|
||||||||||||||||
| [scheduler] | ||||||||||||||||
| [[run hosts]] | ||||||||||||||||
| # there are three hosts in the "pool" | ||||||||||||||||
| available = host1, host2, host3 | ||||||||||||||||
|
|
||||||||||||||||
| # however two have been taken out: | ||||||||||||||||
| # * workflows running on "host1" will attempt to | ||||||||||||||||
| # restart on "host3" | ||||||||||||||||
| # * workflows running on "host2" will shutdown | ||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| condemned = host1, host2! | ||||||||||||||||
|
|
||||||||||||||||
| .. seealso:: | ||||||||||||||||
|
|
||||||||||||||||
| :ref:`auto-stop-restart` | ||||||||||||||||
|
|
||||||||||||||||
| .. versionchanged:: 8.4.2 | ||||||||||||||||
|
|
||||||||||||||||
| The force-condemn ("!") option caused issues at workflow | ||||||||||||||||
| startup for Cylc versions between 8.0.0 and 8.4.1 | ||||||||||||||||
| inclusive. | ||||||||||||||||
|
Comment on lines
+873
to
+875
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
|
|
||||||||||||||||
| .. versionchanged:: 8.0.0 | ||||||||||||||||
|
|
||||||||||||||||
| {REPLACES}``[suite servers]condemned hosts``. | ||||||||||||||||
|
|
@@ -1336,7 +1374,7 @@ def default_for( | |||||||||||||||
| The means by which task progress messages are reported back to | ||||||||||||||||
| the running workflow. | ||||||||||||||||
|
|
||||||||||||||||
| ..rubric:: Options: | ||||||||||||||||
| .. rubric:: Options: | ||||||||||||||||
|
|
||||||||||||||||
| zmq | ||||||||||||||||
| Direct client-server TCP communication via network ports | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,6 +128,13 @@ | |
| # be returned with the up-to-date configuration. | ||
| global_config = glbl_cfg(cached=cached) | ||
|
|
||
| # condemned hosts may be suffixed with an "!" to activate "force mode" | ||
| blacklist = [] | ||
| for host in global_config.get(['scheduler', 'run hosts', 'condemned'], []): | ||
| if host.endswith('!'): | ||
| host = host[:-1] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, this line is covered by the test amended in this PR (confirm by running it on master), however, that test is not run in CI due to it's shared filesystem setup. |
||
| blacklist.append(host) | ||
|
|
||
| return select_host( | ||
| # list of workflow hosts | ||
| global_config.get([ | ||
|
|
@@ -138,9 +145,7 @@ | |
| 'scheduler', 'run hosts', 'ranking' | ||
| ]), | ||
| # list of condemned hosts | ||
| blacklist=global_config.get( | ||
| ['scheduler', 'run hosts', 'condemned'] | ||
| ), | ||
| blacklist=blacklist, | ||
| blacklist_name='condemned host' | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,10 @@ create_test_global_config '' " | |||||||||
| ${BASE_GLOBAL_CONFIG} | ||||||||||
| [scheduler] | ||||||||||
| [[run hosts]] | ||||||||||
| available = ${CYLC_TEST_HOST_1} | ||||||||||
| available = ${CYLC_TEST_HOST_1}, ${CYLC_TEST_HOST_2} | ||||||||||
| # ensure the workflow can start if a host is force-condemned | ||||||||||
| # see #6623 | ||||||||||
|
Comment on lines
+54
to
+55
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| condemned = ${CYLC_TEST_HOST_2}! | ||||||||||
| " | ||||||||||
|
|
||||||||||
| set_test_number 8 | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't actually correct. The mode has not been restored, a bug in the host-selection mechanism has been fixed.