jupyterhub / jupyterhub/systemdspawner

service_running doesn't account for chroot

Open
#90 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
100
Forks
44
PR merge metrics
No merged PRs in 30d

Description

https://github.com/jupyterhub/systemdspawner/blob/e75caddd7f310c591f642cdd559107c171a1e657/systemdspawner/systemd.py#L158

`systemctl is-active` outputs a warning and exits with `0` when run in a chroot environment ([by "design", to quote the designer](https://bugzilla.redhat.com/show_bug.cgi?id=1110675#c2)), after which `jupyterhub` attempts to stop a non-existent unit and fails:

```
Running in chroot, ignoring command 'is-active'
Running in chroot, ignoring command 'stop'
500 GET /hub/spawn (127.0.0.1): Error in Authenticator.pre_spawn_start: Exception Could not stop already existing unit
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.