jupyterhub / batchspawner

Custom Spawner for Jupyterhub to start servers in batch scheduled systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

epilogue not working

lifetooeasy opened this issue · comments

Bug description

It seems that epilogue is not working after stopping the notebook. I set up the epilogue parameter in the configuration file like this:

c.SlurmSpawner.req_epilogue = """!/bin/bash echo 'hostname'""" (just an example). I am able to see the command in jupyterhub log after cmd but nothing happens.

Expected behaviour

run epilogue after stopping the notebook.

Actual behaviour

Your personal set up

  • OS: CentOS 8
  • Version(s):
  • jupyterhub 1.5.0
  • batchspawner 1.1.0
# jupyterhub_config.py
c.SlurmSpawner.req_epilogue = """!/bin/bash echo 'hostname'"""

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Hello! Would you try setting this variable like so instead:

c.SlurmSpawner.req_epilogue = "echo 'hostname'"

The req_epilogue variable is substituted into the Slurm script as-is after the cmd returns, it's not a separate script. The #!/bin/bash prefix is unnecessary, and results in the line being ignored as a comment.

@mbmilligan it still not working. Just for information req_prologue works fine.
Can Slurm Admin restrict prologue/epilogue?