-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error encountered, when the user is set other than jovyan
, while executing voila
#43
Comments
Thank you for getting in touch. Please could you share more about your config, especially the docker image you are using, and I'll take a look. I may have some of this already, but it could be good to get the latest anyway, and also useful for anyone else reading. |
Yes sure. Here is with more detail specs
Below I received the error message, that the notebook file ( I was wondering if there is away to set the home directory, other than I have tried to run the Here is my config:
Below is the Error message
Thanks you again in advance for your help :) |
You've probably just omitted these lines from your config for brevity, but it doesn't quite make sense to be running:
because these don't have the ContainDS Dashboards components in them by default. (Or maybe you have another way to install them?) Do you mean:
In particular, I don't believe your singleuser image contains the latest jhsingle_native_proxy 0.5.6 (because that passes through absolute paths, whereas the one in your 'error message' section above is relative). So the singleuser image definitely needs updating. No images are specified in your config (although clearly cdsdashboards is installed at some level because you're seeing the cdsdashboards error page). So it would be great if you can just clarify that? Or are you building your own Docker images - if so, it would be really useful to see the Dockerfiles. Mainly as background, what is the main reason for wanting to change the name from jovyan inside the container? (Assuming you mount /home/jovyan to the correct {username} on the volume, they should still see the correct files. But maybe you want to see correct usernames propagated into the central storage, or just make it more user-friendly within the container.) Why have you mounted the extra shared folder at /home/jovyan/shared if you don't want jovyan to be the username? (Maybe extraVolumeMounts doesn't allow substitution of {username} - I haven't checked.) Finally, are you seeing both the 'error message' web output ('Error report from ContainDS Dashboards') from your last post AND the log output from the very first post? Sorry for all the questions! But if we can get you onto the latest versions, and fully understand your config, and then you're still seeing the errors I should be able to try it out for myself to see what's going on... Thanks, Dan |
Hi Dan, Correct, I built as my own docker images. I upgraded the Here is the
Here is
I needed to set the I also tried to keep using I think it's because of the unmatched
|
With the updated
I was wondering, is there a way I could set the absolute path in the dashboard UI, such as I think that will solve my issue. Thanks again in advance for your time and support.
|
A little update. If I execute the command with the expected home directory on
I was wondering if there is a way in the configuration to set a dynamic home directory for the dashboard ? What is your advice, please? Thanks again for your time. Look forward to hearing from you. |
Thank you for working on this further! Please could you let us know more about RZAzureADAuthenticator? That seems to be where NB_USER etc are set. I don't believe 'jovyan' is hard-coded into the cdsdashboards or jhsingle-native-proxy code, but of course /home/jovyan is the default working folder for the Docker image you are using. If you start a normal Jupyter notebook server, does that start up in /home/ril or /home/jovyan? If this all works for standard Jupyter servers, we need to understand why CHOWN_HOME and NB_USER etc aren't being recognized by start.sh script when run through cdsdashboards. If it doesn't work for standard Jupyter servers, then we should fix that first! |
For the jupyter notebook server, the Aha, for the authenticator, the Below is the snippet of class RZAzureADAuthenticator(AzureAdOAuthenticator):
@gen.coroutine
def pre_spawn_start(self, user, spawner):
auth_state = yield user.get_auth_state()
self.log.info('pre_spawn_start auth_state: %s' % auth_state)
self.log.info('pre_spawn_start user: %s' % user)
if not auth_state:
return
spawner.environment['NB_UID'] = auth_state['uid']
# This is set to 'ril'
spawner.environment['NB_USER'] = user.name
# On the config.yaml
auth:
type: custom
custom:
className: 'RZAzureADAuthenticator'
config:
client_id: xxxxx
client_secret: xxxxx
tenant_id: xxxxx
oauth_callback_url: https://jupyterhub.tst/hub/oauth_callback
state:
enabled: true
cryptoKey: xxxxx
admin:
users:
- ril As I looked into the log from the hub during the creation of the dashboard, the
Although there was an error prior to that.
Here is the log from the dashboard-server:
Along with your pointer, it seems the Looking into the container's pod, it is run as
I was wondering, is there a specific hook for the dashboard spawner to ensure the I think the problem is that the environment variables, such as Thank you in advance for your kind guidance. I look forward to hearing from you. |
@ricky-lim sorry for the delay here, but I think I've reproduced most of your setup. I think it might make sense to add GRANT_SUDO: 'yes' in addition to CHOWN_HOME: 'yes'. In any case, cdsdashboards was causing you a problem. The pre_spawn_hook was being called, but then the environment dict was subsequently overwritten. Instead, I've checked in a change that attempts to merge it. This preserves the NB_USER in my tests, although I haven't thought too hard about any other side effects yet. Please could you try it out by using this commit. If you're using my standard images, just try using the hub image from Docker Hub: ideonate/cdsdashboards-jupyter-k8s-hub:sha-d60c383 |
Hi Dan, Thank you for your effort to reproduce the setup. Yes, I have tried it and it works as expected, now Are you going to tag the release for cdsdashaboard ? Cheers |
Great to hear that worked - thank you for letting me know. I will make sure this functionality is brought into the next tagged release, but I'm not sure exactly when. Hopefully you are OK to use the commit version instead for now - let me know if not for some reason. Thanks, Dan |
This is now in version 0.4.0 |
Hi Dan,
In my setup, the user of the jupyter is set with her/his username coupled to the permissions from an active directory.
With each user has its own homedir, such as '/home/ril' instead of
home/jovyan
Unfortunately while trying to execute voila, I encountered the following error, which I think might be caused by trying to set username to jovyan.
I was wondering if you have encountered this issue before and I'll be very grateful if you could help, please.
Thank you in advance for your time and consideration.
The log with its error messages
The text was updated successfully, but these errors were encountered: