You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I want to use CondorSpawner to spawn notebooks on HTCondor.
For this I need to add a pre_spawn_hook to do some work so that the Kerberos
credentials are put into the spawner.environment properly.
When I use CondorSpawner directly the pre_spawn_hook executes and
spawning works.
With wrapspawner.ProfilesSpawner the pre_spawn_hook seems to execute (I added a log message) but spawning doesn't work because the environment in the spawner isn't set properly.
Is adding the pre_spawn_hook via c.Spawner.pre_spawn_hook = get_krb5_var
the right way of doing it or do I need to do it differently so that the hook is added to the child spawners?
The text was updated successfully, but these errors were encountered:
It looks like pre_spawn_hook isn't relayed from WrapSpawner to the child spawner - this has been a problem with other attributes, too. I'd say, check out the way the start method works: https://github.com/jupyterhub/wrapspawner/blob/master/wrapspawner/wrapspawner.py#L121
I think something like that should work with the pre_spawn_hook. I don't have time to make something right now, but you could try if you wanted.
Putting it on c.Spawner puts it on both (I think), but the one on ProfileSpawner doesn't update child spawner (I guess?) and the one on CondorSpawner doesn't get called at all. #27 would relay the attributes from ProfileSpawner to CondorSpawner, but I think that only gets set up when start is called, which happens afterpre_spawn_hook gets called. But it gets harder...
if you set c.Spawner = your_hook, it would also override ProfileSpawner.pre_spawn_hook, which would mean it overrides the the child spawner construction and relaying the call. So I think the simplest thing to support is to only set c.CondorSpawner.pre_spawn_hook (and this should be documented).
Anything above could be wrong... but good luck for now! This will be important to have in general.
Hello,
I want to use CondorSpawner to spawn notebooks on HTCondor.
For this I need to add a pre_spawn_hook to do some work so that the Kerberos
credentials are put into the spawner.environment properly.
When I use CondorSpawner directly the pre_spawn_hook executes and
spawning works.
With wrapspawner.ProfilesSpawner the pre_spawn_hook seems to execute (I added a log message) but spawning doesn't work because the environment in the spawner isn't set properly.
Is adding the pre_spawn_hook via c.Spawner.pre_spawn_hook = get_krb5_var
the right way of doing it or do I need to do it differently so that the hook is added to the child spawners?
The text was updated successfully, but these errors were encountered: