Skip to content

Commit 4747946

Browse files
authored
Merge pull request #112 from rkdarst/dev
Integration branch for next release
2 parents c320f05 + 755f4fe commit 4747946

File tree

5 files changed

+250
-67
lines changed

5 files changed

+250
-67
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,32 @@
22
language: python
33
sudo: false
44
python:
5+
- 3.7-dev
56
- 3.6
67
- 3.5
78
- 3.4
89
env:
910
- JHUB_VER=0.7.2
1011
- JHUB_VER=0.8.1
11-
- JHUB_VER=0.9.0b2
12+
- JHUB_VER=0.9.1
1213
matrix:
1314
include:
1415
- python: 3.7-dev
15-
env: JHUB_VER=0.9.0b2
16-
- python: 3.6
1716
env: JHUB_VER=master
1817
exclude:
1918
- python: 3.4
20-
env: JHUB_VER=0.9.0b2
19+
env: JHUB_VER=0.9.1
2120
allow_failures:
2221
- env: JHUB_VER=master
23-
- python: 3.7-dev
2422

2523
before_install:
2624
- npm install -g configurable-http-proxy
2725
- git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels
2826
- git clone --quiet --branch $JHUB_VER https://github.com/jupyter/jupyterhub.git jupyterhub
2927
install:
3028
# Don't let requirements pull in tornado 5 yet except for jupyterhub master
31-
- if [ $JHUB_VER != "master" -a $JHUB_VER != "0.9.0b2" ]; then pip install "tornado<5.0"; fi
29+
- if [ $JHUB_VER != "master" -a $JHUB_VER != "0.9.1" ]; then pip install "tornado<5.0"; fi
30+
- pip install jsonschema!=3.0.0a1 # issue #110, remove later
3231
- pip install --pre -f travis-wheels/wheelhouse -r jupyterhub/dev-requirements.txt
3332
- pip install --pre -e jupyterhub
3433

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ This package formerly included WrapSpawner and ProfilesSpawner, which provide me
2424

2525
## Batch Spawners
2626

27+
For information on the specific spawners, see [SPAWNERS.md](SPAWNERS.md).
28+
2729
### Overview
2830

2931
This file contains an abstraction layer for batch job queueing systems (`BatchSpawnerBase`), and implements
@@ -82,6 +84,19 @@ to run Jupyter notebooks on an academic supercomputer cluster.
8284
c.TorqueSpawner.state_exechost_exp = r'int-\1.mesabi.xyz.edu'
8385
```
8486

87+
### Security
88+
89+
Unless otherwise stated for a specific spawner, assume that spawners
90+
*do* evaluate shell environment for users and thus the [security
91+
requiremnts of JupyterHub security for untrusted
92+
users](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html)
93+
are not fulfilled because some (most?) spawners *do* start a user
94+
shell which will execute arbitrary user environment configuration
95+
(``.profile``, ``.bashrc`` and the like) unless users do not have
96+
access to their own cluster user account. This is something which we
97+
are working on.
98+
99+
85100
## Provide different configurations of BatchSpawner
86101

87102
### Overview
@@ -141,11 +156,33 @@ clusters, as well as an option to run a local notebook directly on the jupyterhu
141156

142157
### dev (requires minimum JupyterHub 0.7.2 and Python 3.4)
143158

159+
Added (user)
160+
144161
* Add Jinja2 templating as an option for all scripts and commands. If '{{' or `{%` is used anywhere in the string, it is used as a jinja2 template.
145-
* Update Slurm batch script. Now, the single-user notebook is run in a job step, with a wrapper of `srun`. This may need to be removed if you don't want environment variables limited.
146162
* Add new option exec_prefix, which defaults to `sudo -E -u {username}`. This replaces explicit `sudo` in every batch command - changes in local commands may be needed.
163+
* New option: `req_keepvars_extra`, which allows keeping extra variables in addition to what is defined by JupyterHub itself (addition of variables to keep instead of replacement). #99
164+
* Add `req_prologue` and `req_epilogue` options to scripts which are inserted before/after the main jupyterhub-singleuser command, which allow for generic setup/cleanup without overriding the entire script. #96
165+
* SlurmSpawner: add the `req_reservation` option. #
166+
167+
Added (developer)
168+
147169
* Add many more tests.
170+
* Add a new page `SPAWNERS.md` which information on specific spawners. Begin trying to collect a list of spawner-specific contacts. #97
171+
172+
Changed
173+
148174
* Update minimum requirements to JupyterHub 0.8.1 and Python 3.4.
175+
* Update Slurm batch script. Now, the single-user notebook is run in a job step, with a wrapper of `srun`. This may need to be removed using `req_srun=''` if you don't want environment variables limited.
176+
* Pass the environment dictionary to the queue and cancel commands as well. This is mostly user environment, but may be useful to these commands as well in some cases. #108, #111 If these envioronment variables were used for authentication as an admin, be aware that there are pre-existing security issues because they may be passed to the user via the batch submit command, see #82.
177+
178+
Fixed
179+
180+
* Improve debugging on failed submission by raising errors including error messages from the commands. #106
181+
* Many other non-user or developer visible changes. #107 #106 #100
182+
* In Travis CI, blacklist jsonschema=3.0.0a1 because it breaks tests
183+
184+
Removed
185+
149186

150187
### v0.8.1 (bugfix release)
151188

SPAWNERS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Notes on specific spawners
2+
3+
## `TorqueSpawner`
4+
5+
Maintainers:
6+
7+
8+
## `MoabSpawner`
9+
10+
Subclass of TorqueSpawner
11+
12+
Maintainers:
13+
14+
15+
## `SlurmSpawner`
16+
17+
Maintainers: @rkdarst
18+
19+
This spawner enforces the environment if `srun` is used to wrap the
20+
spawner command, which is the default. If you *do* want user
21+
environment to be used, set `req_srun=''`. However, this is not
22+
perfect: there is still a bash shell begun as the user which could run
23+
arbitrary startup, define shell aliases for `srun`, etc.
24+
25+
Use of `srun` is required to gracefully terminate.
26+
27+
28+
## `GridengineSpawner`
29+
30+
Maintainers:
31+
32+
33+
## `CondorSpawner`
34+
35+
Maintainers:
36+
37+
38+
## `LsfSpawner`
39+
40+
Maintainers:
41+
42+
43+
# Checklist for making spawners
44+
45+
Please document each of these things under the spawner list above, -
46+
even if it is "OK", we need to track status of all spawners. If it is
47+
a bug, users really need to know.
48+
49+
- Does your spawner read shell environment before starting? (See
50+
[Jupyterhub
51+
Security](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html).
52+
53+
- Does your spawner send SIGTERM to the jupyterhub-singleuser process
54+
before SIGKILL? It should, so that the process can terminate
55+
gracefully. Add `echo "terminated gracefully"` to the end of the
56+
batch script - if you see this in your singleuser server output, you
57+
know that you DO receive SIGTERM and terminate gracefully. If your
58+
batch system can not automatically send SIGTERM before SIGKILL, PR
59+
#75 might help here, ask for it to be finished.
60+

0 commit comments

Comments
 (0)