-
Notifications
You must be signed in to change notification settings - Fork 3
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
[ENH]: Change uid and gid permissions on bucket creation #29
base: develop
Are you sure you want to change the base?
Conversation
When I try to select start jupyterlab at the end of
The bucket status is listed as
However, if I try to start the bucket, I get an error that the bucket is already running.
I didn't have any of these issues when I was testing PR #27 . |
…nh_change_uid_gid_permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: Bucket test3 is not running!
happens because the container has been started insideDockerHelper.create_container
and the following is missing:
self.buckets[ind]['docker']['status'] = 'running'
self.save_config()
- The
/usr/local/bin/start.sh
should be executed withdetach=False
for thechown
s to finish before starting jupyter. If the jupyter notebook is started before this process, the notebook with the token doesn't work. - A suggestion would be to put the execution of
/usr/local/bin/start.sh
insideDockerHelper.start_container
. I have tested that and it works. Its in the branch: fix_uid_gid. I could to a PR to merge that into enh_guided_create_bucket - Unfortunately it takes long to chown all the files both in linux and mac. But in mac is not needed. If we find a way to know what systems need this fix. Maybe something like
docker0.info()['OSType'] == 'linux'
. But I don't know if all linux systems need this.
Not touching this until after 2019.1.0rc2 is out. Low priority. |
As per #13, on some systems, the UID and GID of user directories on the host are not the same as the default in the resen-core image. This PR executes
/usr/local/bin/start.sh
with theNB_UID
andNB_GID
environment variables set.The side effect of doing this is that it takes a little while for all of the files in
/home/jovyan
to change permissions, but this will get better once EarthCubeInGeo/resen-core#19 is implemented.To test this, just create a new bucket. Then in jupyterlab, open terminal and execute the
top
command. You will probably see achmod
command running, unless you happen to have the same uid and gid as is default for the jovyan user in the container.Please merged PR #27 before merging this one.