hypershell 2.8.4__tar.gz → 2.8.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hypershell-2.8.4 → hypershell-2.8.6}/PKG-INFO +1 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/cluster_help.rst +2 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/templates.rst +16 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/security.rst +78 -11
- {hypershell-2.8.4 → hypershell-2.8.6}/pyproject.toml +1 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/share/man/man1/hs.1 +3 -2
- {hypershell-2.8.4 → hypershell-2.8.6}/share/man/man1/hsx.1 +3 -2
- {hypershell-2.8.4 → hypershell-2.8.6}/share/man/man1/hyper-shell.1 +3 -2
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/client.py +59 -4
- hypershell-2.8.6/src/hypershell/cluster/launch.py +378 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/cluster/remote.py +37 -93
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/cluster/ssh.py +31 -34
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/queue.py +92 -12
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/template.py +15 -7
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/server.py +24 -4
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_autoscale.py +4 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_cluster.py +21 -0
- hypershell-2.8.6/tests/test_cluster_launch.py +1441 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_groups.py +34 -11
- hypershell-2.8.6/tests/test_heartmonitor.py +120 -0
- hypershell-2.8.6/tests/test_queue_nodelay.py +235 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/uv.lock +1 -1
- {hypershell-2.8.4 → hypershell-2.8.6}/.gitignore +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/CODE_OF_CONDUCT.md +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/LICENSE +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/README.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/Makefile +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/citation.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/client_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/client_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/client_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/cluster_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/cluster_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_edit_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_edit_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_edit_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_get_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_get_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_get_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_intro.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_intro_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_param_ref.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_pythonpath.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_set_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_set_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_set_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_site_vars.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_task_env.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_task_env_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_which_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_which_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/config_which_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/database.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/database_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/exit_status.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/initdb_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/initdb_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/initdb_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/license.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/security_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/server_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/server_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/server_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/signals.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/submit_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/submit_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/submit_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_groups_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_info_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_info_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_info_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_run_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_run_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_run_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_search_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_search_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_search_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_submit_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_submit_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_submit_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_update_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_update_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_update_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_wait_desc.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_wait_help.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/task_wait_usage.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/templates_alt.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_include/tls_cli_options.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_static/custom.css +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_static/logo-dark-mode.png +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/_static/logo-light-mode.png +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/client.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/cluster.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/data.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/index.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/server.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/api/submit.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20230329_2_2_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20230413_2_3_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20230602_2_4_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20240518_2_5_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20240706_2_5_2_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20241115_2_6_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20241115_announce_logo.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20241231_2_6_1_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20250215_2_6_5_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20250405_2_6_6_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20250504_2_7_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/20260705_2_8_0_release.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/blog/index.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/client.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/cluster.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/config.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/config_edit.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/config_get.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/config_set.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/config_which.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/index.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/initdb.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/server.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/submit.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_info.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_run.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_search.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_submit.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_update.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/cli/task_wait.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/conf.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/config.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/database.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/getting_started.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/index.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/install.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/logging.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/manual.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/roadmap.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/templates.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/tutorial/advanced.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/tutorial/basic.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/tutorial/distributed.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/docs/tutorial/hybrid.rst +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/share/bash_completion.d/hs +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/share/bash_completion.d/hsx +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/share/zsh/site-functions/_hs +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/cluster/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/cluster/local.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/config.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/config.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/exceptions.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/fsm.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/heartbeat.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/logging.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/platform.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/pretty_print.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/remote.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/resource.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/signal.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/sys.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/tag.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/thread.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/tls.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/types.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/core/uuid.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/data/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/data/core.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/data/model.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/submit.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/src/hypershell/task.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/conftest.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_cancel.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_data/__init__.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_data/test_core.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_data/test_model.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_group_order.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_initdb.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_logging.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_main.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_queue_address_family.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_queue_tls.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_retry_gate.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_server.py +0 -0
- {hypershell-2.8.4 → hypershell-2.8.6}/tests/test_submit.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: hypershell
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.6
|
|
4
4
|
Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
|
|
5
5
|
Project-URL: Homepage, https://hypershell.org
|
|
6
6
|
Project-URL: Documentation, https://hypershell.readthedocs.io
|
|
@@ -157,7 +157,8 @@ Options
|
|
|
157
157
|
|
|
158
158
|
``-E``, ``--env``
|
|
159
159
|
Send environment variables. Only for ``--ssh`` mode, all ``HYPERSHELL_`` prefixed environment
|
|
160
|
-
variables can be exported to the remote clients
|
|
160
|
+
variables can be exported to the remote clients, except ``HYPERSHELL_SERVER_AUTH``, which is
|
|
161
|
+
never sent this way.
|
|
161
162
|
|
|
162
163
|
``--remote-exe`` *PATH*
|
|
163
164
|
Path to remote executable on the client side.
|
|
@@ -120,6 +120,13 @@ The incoming command-line args can be substituted with an ``@``.
|
|
|
120
120
|
``{% mktemp -d %}``
|
|
121
121
|
Create temporary directory and insert its path.
|
|
122
122
|
|
|
123
|
+
When a client expands the template, the command runs with the client's own
|
|
124
|
+
environment, without ``HYPERSHELL_SERVER_AUTH`` (see :doc:`/security`). That is
|
|
125
|
+
the environment the client's tasks inherit, before the client adds the
|
|
126
|
+
``[export]`` values and the ``TASK_*`` variables for each task. So the command
|
|
127
|
+
sees an ``[export]`` value only if the client's own environment already holds
|
|
128
|
+
it, as it does for a client that ``hs cluster`` starts through a launcher.
|
|
129
|
+
|
|
123
130
|
-------------------
|
|
124
131
|
|
|
125
132
|
Lambda Expressions
|
|
@@ -131,7 +138,15 @@ Arbitrary Python expressions can be expanded with the ``{= =}`` notation.
|
|
|
131
138
|
The input argument can be used within the expression with the variable ``x``.
|
|
132
139
|
|
|
133
140
|
Exposed standard library modules include ``os``, ``os.path`` as ``path``,
|
|
134
|
-
``math`` and ``datetime`` as ``dt``.
|
|
141
|
+
``math`` and ``datetime`` as ``dt``. The expression is evaluated in the
|
|
142
|
+
process that expands the template, so ``os.environ`` is that process's own
|
|
143
|
+
environment. Under a client that ``hs cluster`` starts as a process of its own,
|
|
144
|
+
through a launcher or over SSH, it includes ``HYPERSHELL_SERVER_AUTH``
|
|
145
|
+
(see :doc:`/security`). Under the default local mode, whose client runs inside
|
|
146
|
+
the ``hs cluster`` process, it includes the variable only if the environment
|
|
147
|
+
that starts ``hs cluster`` already sets it: the key that run mints is never put
|
|
148
|
+
in that process's environment. A client started by hand with ``-k`` has it there
|
|
149
|
+
only if its own environment sets it.
|
|
135
150
|
|
|
136
151
|
Incoming arguments are intelligently coerced into the expected type.
|
|
137
152
|
E.g., ``2`` will be an integer, ``4.67`` a float, ``null`` and ``none``
|
|
@@ -128,9 +128,10 @@ TLS.
|
|
|
128
128
|
|
|
129
129
|
The :class:`hypershell.core.queue.SecureManager` class selects this serializer when an active
|
|
130
130
|
:class:`hypershell.core.tls.TLSConfig` is supplied. If TLS is disabled (or no configuration
|
|
131
|
-
is found), ``SecureManager``
|
|
132
|
-
the
|
|
133
|
-
|
|
131
|
+
is found), ``SecureManager`` selects the ``'hypershell-plain'`` serializer instead. Its pair is
|
|
132
|
+
the stock listener and client, with ``TCP_NODELAY`` set on each TCP connection where the
|
|
133
|
+
platform allows it. The framing, the handshake, and every byte on the wire are those of a stock
|
|
134
|
+
``BaseManager``, so cleartext deployments remain supported for constrained environments.
|
|
134
135
|
|
|
135
136
|
|
|
|
136
137
|
|
|
@@ -166,15 +167,81 @@ placeholder key and enforces a minimum key policy: the key must be at least 16 c
|
|
|
166
167
|
drawn from ``[A-Za-z0-9._+/=-]`` (which admits hex, URL-safe tokens, and standard Base64). The
|
|
167
168
|
key generators used in the deployment guides below satisfy this policy.
|
|
168
169
|
|
|
169
|
-
.. admonition::
|
|
170
|
+
.. admonition:: How cluster launches hand the key to their clients
|
|
170
171
|
:class: note
|
|
171
172
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
When ``hs cluster`` starts its clients as separate processes (``--launcher``, ``--mpi``,
|
|
174
|
+
``--autoscaling`` and ``--ssh``), the per-invocation key is on no command line, either on
|
|
175
|
+
the launching host or on the client hosts. Every client reads its key from the
|
|
176
|
+
``HYPERSHELL_SERVER_AUTH`` environment variable when no ``-k`` is given, and the launch
|
|
177
|
+
delivers it there.
|
|
178
|
+
|
|
179
|
+
* **Launcher modes** (``--launcher``, ``--mpi`` and ``--autoscaling``). The launcher is
|
|
180
|
+
started with the key in its environment, and must pass that environment through to the
|
|
181
|
+
clients it starts. ``srun`` (with its default ``--export=ALL``), MPICH, Intel MPI and
|
|
182
|
+
Flux do. Only when the launcher is one Open MPI may provide does the launch also ask
|
|
183
|
+
Open MPI to forward the variable to remote ranks, by name: through
|
|
184
|
+
``OMPI_MCA_mca_base_env_list``, keeping names already set there, or, if the launcher's
|
|
185
|
+
arguments already hold ``-x`` (also written ``--x``, or either with ``=``; Open MPI 4
|
|
186
|
+
does not accept ``-x`` together with that parameter), by adding
|
|
187
|
+
``-x HYPERSHELL_SERVER_AUTH``. That is ``--mpi``, or a ``--launcher`` whose first word
|
|
188
|
+
has the base name ``mpirun``, ``mpiexec``, ``orterun`` or ``prterun``, or ``mpirun`` or
|
|
189
|
+
``mpiexec`` with a dotted suffix, such as Debian's ``mpirun.openmpi`` (an MPICH name
|
|
190
|
+
such as ``mpiexec.hydra`` matches too; MPICH ignores the Open MPI parameter). Only the
|
|
191
|
+
first word counts: ``srun mpirun`` gets neither, as do ``srun``, any other launcher,
|
|
192
|
+
and ``--autoscaling`` with no launcher. If such a launcher needs Open MPI to forward
|
|
193
|
+
the variable, add ``-x HYPERSHELL_SERVER_AUTH`` (the name only) to ``--launcher``. A
|
|
194
|
+
launcher set to drop the environment, such as ``srun --export=NONE``, leaves its
|
|
195
|
+
clients without the key, so they cannot authenticate.
|
|
196
|
+
Such a client exits with a ``CRITICAL`` error that names ``HYPERSHELL_SERVER_AUTH`` and
|
|
197
|
+
the launcher not passing the environment as the likely cause. With TLS on, where the
|
|
198
|
+
dropped environment also held the client's TLS settings, the client fails to verify the
|
|
199
|
+
server's certificate before it authenticates; when it has no key either, that error
|
|
200
|
+
names the same likely cause.
|
|
201
|
+
|
|
202
|
+
* **SSH** (``--ssh``). The key travels on the ssh channel's standard input. On each remote
|
|
203
|
+
host a short POSIX ``sh`` step reads it into ``HYPERSHELL_SERVER_AUTH`` using shell
|
|
204
|
+
builtins, exports it, and replaces itself with the client, so the key is on no command
|
|
205
|
+
line there either. With ``--env``, the other ``HYPERSHELL_*`` variables of the launching
|
|
206
|
+
environment are still passed on ssh's command line, one ``NAME=value`` word each, with
|
|
207
|
+
the value quoted for a POSIX shell, so a POSIX login shell on the remote host reads back
|
|
208
|
+
exactly that value, and no value can run into another word. ``HYPERSHELL_SERVER_AUTH`` is left out by name before any
|
|
209
|
+
word is built, so it is never among them, whatever the other values hold. (A name that
|
|
210
|
+
is not a valid shell variable name is left out too, with a warning.) The launch owns ssh's standard input and always passes ``-T``, so no remote
|
|
211
|
+
terminal is allocated. A ``-t`` or ``-tt`` in ``--ssh-args`` or ``ssh.args``
|
|
212
|
+
therefore has no effect on client launches, and a bare ``-n`` there is dropped with a
|
|
213
|
+
warning. If no key arrives, for example because a wrapper around ``ssh`` closes its
|
|
214
|
+
standard input, the remote step prints a message naming ``HYPERSHELL_SERVER_AUTH`` and
|
|
215
|
+
ssh's standard input, and exits before any client starts.
|
|
216
|
+
|
|
217
|
+
The key is also redacted from *HyperShell*'s own launch logs, at every level.
|
|
218
|
+
|
|
219
|
+
Tasks run with their client's environment, except that the client does not pass
|
|
220
|
+
``HYPERSHELL_SERVER_AUTH`` to them, and takes that name out of
|
|
221
|
+
``OMPI_MCA_mca_base_env_list`` (keeping any other names, and dropping the variable if none
|
|
222
|
+
is left). The client runs the shell commands of ``{% %}`` template patterns, once per
|
|
223
|
+
task, with that same environment. So, whatever the launch mode, neither a task's
|
|
224
|
+
environment nor a ``{% %}`` command's holds the key or the Open MPI entry the launch set,
|
|
225
|
+
unless the configuration gives it explicitly. This keeps the key out of an environment
|
|
226
|
+
that a task dumps or logs by accident. It does not hide the key from task code that looks
|
|
227
|
+
for it: a task runs as the same user as its client, and that user can generally read the
|
|
228
|
+
client's environment. This applies to clients from this release on; an older client under
|
|
229
|
+
a newer launcher still passes its environment to its tasks unchanged.
|
|
230
|
+
|
|
231
|
+
A task can be given the key in two explicit ways:
|
|
232
|
+
|
|
233
|
+
* An ``[export]`` entry for ``HYPERSHELL_SERVER_AUTH`` (or a
|
|
234
|
+
``HYPERSHELL_EXPORT_HYPERSHELL_SERVER_AUTH`` variable) hands every task a key the
|
|
235
|
+
operator holds, such as the key of a hand-started ``hs server``. Its values are taken
|
|
236
|
+
literally, so it cannot carry the key an ``hs cluster`` run mints, which no one is shown.
|
|
237
|
+
* A ``{= =}`` lambda pattern is Python the client evaluates itself, with ``os`` exposed,
|
|
238
|
+
so ``os.environ`` there is the client's own environment, key included. A template that
|
|
239
|
+
reads it does so on purpose.
|
|
240
|
+
|
|
241
|
+
A task that runs a nested ``hs cluster`` needs neither: that run mints its own key for
|
|
242
|
+
its own server and clients.
|
|
243
|
+
|
|
244
|
+
A directly configured ``server.auth`` is stored in plaintext in the config file and printed
|
|
178
245
|
verbatim by ``hs config get``; prefer the ``_eval`` / ``_env`` suffixes (see below) to
|
|
179
246
|
keep the secret out of the file.
|
|
180
247
|
|
|
@@ -825,7 +892,7 @@ Independent of the deployment style above:
|
|
|
825
892
|
* **Enable audit logging.** Set ``logging.style = "detailed"`` (or ``"system"``) and ship
|
|
826
893
|
logs to a central collector. The server logs every client connection, every task
|
|
827
894
|
dispatched, and every completion. See :ref:`logging <logging>` for details. The
|
|
828
|
-
per-invocation auth key
|
|
895
|
+
per-invocation auth key never appears in launch logs, but avoid shipping full configuration
|
|
829
896
|
dumps (which contain a directly-set ``server.auth``) to shared log infrastructure.
|
|
830
897
|
|
|
831
898
|
* **Sanitize task input.** When generating tasks programmatically, treat the command
|
|
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
28
28
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
29
29
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
30
30
|
..
|
|
31
|
-
.TH "HS" "1" "Nov
|
|
31
|
+
.TH "HS" "1" "Nov 08, 2026" "2.8.6" "hypershell"
|
|
32
32
|
.SH NAME
|
|
33
33
|
hs \- Process shell commands over a distributed, asynchronous queue
|
|
34
34
|
.SH SYNOPSIS
|
|
@@ -274,7 +274,8 @@ See \fIconfiguration\fP section.
|
|
|
274
274
|
.TP
|
|
275
275
|
.B \fB\-E\fP, \fB\-\-env\fP
|
|
276
276
|
Send environment variables. Only for \fB\-\-ssh\fP mode, all \fBHYPERSHELL_\fP prefixed environment
|
|
277
|
-
variables can be exported to the remote clients
|
|
277
|
+
variables can be exported to the remote clients, except \fBHYPERSHELL_SERVER_AUTH\fP, which is
|
|
278
|
+
never sent this way.
|
|
278
279
|
.TP
|
|
279
280
|
.B \fB\-\-remote\-exe\fP \fIPATH\fP
|
|
280
281
|
Path to remote executable on the client side.
|
|
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
28
28
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
29
29
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
30
30
|
..
|
|
31
|
-
.TH "HS" "1" "Nov
|
|
31
|
+
.TH "HS" "1" "Nov 08, 2026" "2.8.6" "hypershell"
|
|
32
32
|
.SH NAME
|
|
33
33
|
hs \- Process shell commands over a distributed, asynchronous queue
|
|
34
34
|
.SH SYNOPSIS
|
|
@@ -274,7 +274,8 @@ See \fIconfiguration\fP section.
|
|
|
274
274
|
.TP
|
|
275
275
|
.B \fB\-E\fP, \fB\-\-env\fP
|
|
276
276
|
Send environment variables. Only for \fB\-\-ssh\fP mode, all \fBHYPERSHELL_\fP prefixed environment
|
|
277
|
-
variables can be exported to the remote clients
|
|
277
|
+
variables can be exported to the remote clients, except \fBHYPERSHELL_SERVER_AUTH\fP, which is
|
|
278
|
+
never sent this way.
|
|
278
279
|
.TP
|
|
279
280
|
.B \fB\-\-remote\-exe\fP \fIPATH\fP
|
|
280
281
|
Path to remote executable on the client side.
|
|
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
28
28
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
29
29
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
30
30
|
..
|
|
31
|
-
.TH "HYPER-SHELL" "1" "Nov
|
|
31
|
+
.TH "HYPER-SHELL" "1" "Nov 08, 2026" "2.8.6" "hypershell"
|
|
32
32
|
.SH NAME
|
|
33
33
|
hyper-shell \- Process shell commands over a distributed, asynchronous queue
|
|
34
34
|
.SH SYNOPSIS
|
|
@@ -274,7 +274,8 @@ See \fIconfiguration\fP section.
|
|
|
274
274
|
.TP
|
|
275
275
|
.B \fB\-E\fP, \fB\-\-env\fP
|
|
276
276
|
Send environment variables. Only for \fB\-\-ssh\fP mode, all \fBHYPERSHELL_\fP prefixed environment
|
|
277
|
-
variables can be exported to the remote clients
|
|
277
|
+
variables can be exported to the remote clients, except \fBHYPERSHELL_SERVER_AUTH\fP, which is
|
|
278
|
+
never sent this way.
|
|
278
279
|
.TP
|
|
279
280
|
.B \fB\-\-remote\-exe\fP \fIPATH\fP
|
|
280
281
|
Path to remote executable on the client side.
|
|
@@ -36,6 +36,7 @@ from types import TracebackType
|
|
|
36
36
|
# Standard libs
|
|
37
37
|
import os
|
|
38
38
|
import sys
|
|
39
|
+
import ssl
|
|
39
40
|
import time
|
|
40
41
|
import random
|
|
41
42
|
import functools
|
|
@@ -437,8 +438,29 @@ DEFAULT_TEMPLATE: Final[str] = DEFAULT_TEMPLATE # redefined for documentation p
|
|
|
437
438
|
"""Default command pattern for template expansion."""
|
|
438
439
|
|
|
439
440
|
|
|
441
|
+
def inherited_task_env() -> Dict[str, str]:
|
|
442
|
+
"""
|
|
443
|
+
The client's own environment as its tasks inherit it, without the authentication key.
|
|
444
|
+
|
|
445
|
+
:const:`AUTH_ENV` is left out, and its name is taken out of :const:`OMPI_ENV_LIST`, which
|
|
446
|
+
is left out too if no other name remains. The client's own environment is not modified.
|
|
447
|
+
"""
|
|
448
|
+
env = {name: value for name, value in os.environ.items() if name != AUTH_ENV}
|
|
449
|
+
if OMPI_ENV_LIST in env:
|
|
450
|
+
names = [name for name in env.pop(OMPI_ENV_LIST).split(';') if name and name != AUTH_ENV]
|
|
451
|
+
if names:
|
|
452
|
+
env[OMPI_ENV_LIST] = ';'.join(names)
|
|
453
|
+
return env
|
|
454
|
+
|
|
455
|
+
|
|
440
456
|
def task_env(task: Task) -> Dict[str, str]:
|
|
441
|
-
"""
|
|
457
|
+
"""
|
|
458
|
+
Build environment dictionary for the given `task`.
|
|
459
|
+
|
|
460
|
+
The task inherits the client's environment without the authentication key (see
|
|
461
|
+
:func:`inherited_task_env`); the configured task environment (`config.export`) is
|
|
462
|
+
applied over it, so a task is given the key only if that names it explicitly.
|
|
463
|
+
"""
|
|
442
464
|
task_data = task.to_json()
|
|
443
465
|
try:
|
|
444
466
|
# We have to flatten tag data separately, otherwise we'd have TASK_TAG='{...}'
|
|
@@ -446,7 +468,7 @@ def task_env(task: Task) -> Dict[str, str]:
|
|
|
446
468
|
except Exception: # noqa: any exception
|
|
447
469
|
tag_data = {}
|
|
448
470
|
return {
|
|
449
|
-
**
|
|
471
|
+
**inherited_task_env(),
|
|
450
472
|
**load_task_env(),
|
|
451
473
|
**Namespace.from_dict(task_data).to_env().flatten(prefix='TASK'),
|
|
452
474
|
**tag_data,
|
|
@@ -655,7 +677,7 @@ class TaskExecutor(StateMachine):
|
|
|
655
677
|
ratelimit: float = None) -> None:
|
|
656
678
|
"""Initialize task executor."""
|
|
657
679
|
self.id = id
|
|
658
|
-
self.template = Template(template)
|
|
680
|
+
self.template = Template(template, shell_env=inherited_task_env)
|
|
659
681
|
self.inbound = inbound
|
|
660
682
|
self.outbound = outbound
|
|
661
683
|
self.redirect_output = redirect_output or sys.stdout
|
|
@@ -1065,6 +1087,26 @@ DEFAULT_PORT: Final[int] = QueueConfig.port
|
|
|
1065
1087
|
DEFAULT_AUTH: Final[str] = QueueConfig.auth
|
|
1066
1088
|
"""Default authentication key for server (**DO NOT USE THIS**)."""
|
|
1067
1089
|
|
|
1090
|
+
AUTH_ENV: Final[str] = 'HYPERSHELL_SERVER_AUTH'
|
|
1091
|
+
"""Environment variable read as the key default; `hs cluster` launchers hand the key over in it."""
|
|
1092
|
+
|
|
1093
|
+
OMPI_ENV_LIST: Final[str] = 'OMPI_MCA_mca_base_env_list'
|
|
1094
|
+
"""Open MPI parameter naming the environment variables `mpirun` forwards to remote ranks."""
|
|
1095
|
+
|
|
1096
|
+
LAUNCH_ENV_HINT: Final[str] = (f'No key reached this client: {AUTH_ENV} is not set in its environment and '
|
|
1097
|
+
f'no -k was given. A client that \'hs cluster\' starts through a launcher '
|
|
1098
|
+
f'receives its key in {AUTH_ENV}, so the launcher most likely did not pass '
|
|
1099
|
+
f'the environment to the client (e.g., srun --export=NONE).')
|
|
1100
|
+
"""Likely cause named when a client without a key of its own fails to authenticate."""
|
|
1101
|
+
|
|
1102
|
+
LAUNCH_ENV_TLS_HINT: Final[str] = (f'No key reached this client either: {AUTH_ENV} is not set in its environment '
|
|
1103
|
+
f'and no -k was given. A client that \'hs cluster\' starts through a launcher '
|
|
1104
|
+
f'receives its key in {AUTH_ENV} and may take its TLS settings from the '
|
|
1105
|
+
f'environment too, so the launcher most likely did not pass the environment to '
|
|
1106
|
+
f'the client (e.g., srun --export=NONE), and the client got neither its key nor '
|
|
1107
|
+
f'the TLS settings that let it trust the server.')
|
|
1108
|
+
"""Likely cause named when a client without a key of its own cannot verify the server's certificate."""
|
|
1109
|
+
|
|
1068
1110
|
|
|
1069
1111
|
class ClientThread(Thread):
|
|
1070
1112
|
"""
|
|
@@ -1481,7 +1523,7 @@ class ClientApp(Application):
|
|
|
1481
1523
|
port: int = config.server.port
|
|
1482
1524
|
interface.add_argument('-p', '--port', type=int, default=port)
|
|
1483
1525
|
|
|
1484
|
-
auth: str = config.server.auth
|
|
1526
|
+
auth: Optional[str] = None # Without -k, the key is config.server.auth (see run)
|
|
1485
1527
|
interface.add_argument('-k', '--auth', default=auth)
|
|
1486
1528
|
|
|
1487
1529
|
template: str = DEFAULT_TEMPLATE
|
|
@@ -1549,6 +1591,11 @@ class ClientApp(Application):
|
|
|
1549
1591
|
|
|
1550
1592
|
def run(self: ClientApp) -> None:
|
|
1551
1593
|
"""Run client."""
|
|
1594
|
+
auth_given = self.auth is not None
|
|
1595
|
+
if not auth_given:
|
|
1596
|
+
self.auth = config.server.auth
|
|
1597
|
+
# The hints below name a missing key only when none came from -k, the environment or a configuration file.
|
|
1598
|
+
no_key = not auth_given and AUTH_ENV not in os.environ and self.auth == DEFAULT_AUTH
|
|
1552
1599
|
try:
|
|
1553
1600
|
self.check_args()
|
|
1554
1601
|
self.enable_tls()
|
|
@@ -1574,6 +1621,14 @@ class ClientApp(Application):
|
|
|
1574
1621
|
tls=self.tls)
|
|
1575
1622
|
except gaierror:
|
|
1576
1623
|
raise HostAddressInfo(f'Could not resolve host \'{self.host}\'')
|
|
1624
|
+
except AuthenticationError as error:
|
|
1625
|
+
if no_key:
|
|
1626
|
+
raise AuthenticationError(f'{error}\n{LAUNCH_ENV_HINT}') from error
|
|
1627
|
+
raise
|
|
1628
|
+
except ssl.SSLCertVerificationError as error:
|
|
1629
|
+
if no_key:
|
|
1630
|
+
raise ssl.SSLCertVerificationError(error.errno, f'{error}\n{LAUNCH_ENV_TLS_HINT}') from error
|
|
1631
|
+
raise
|
|
1577
1632
|
|
|
1578
1633
|
def check_args(self: ClientApp) -> None:
|
|
1579
1634
|
"""Check for logical errors in command-line arguments."""
|