{"action":"opened","number":73,"pull_request":{"url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73","id":96380418,"html_url":"https://github.com/data-8/jupyterhub-k8s/pull/73","diff_url":"https://github.com/data-8/jupyterhub-k8s/pull/73.diff","patch_url":"https://github.com/data-8/jupyterhub-k8s/pull/73.patch","issue_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/73","number":73,"state":"open","locked":false,"title":"Fix command not found issue (again) ","user":{"login":"derrickmar","id":4853140,"avatar_url":"https://avatars.githubusercontent.com/u/4853140?v=3","gravatar_id":"","url":"https://api.github.com/users/derrickmar","html_url":"https://github.com/derrickmar","followers_url":"https://api.github.com/users/derrickmar/followers","following_url":"https://api.github.com/users/derrickmar/following{/other_user}","gists_url":"https://api.github.com/users/derrickmar/gists{/gist_id}","starred_url":"https://api.github.com/users/derrickmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derrickmar/subscriptions","organizations_url":"https://api.github.com/users/derrickmar/orgs","repos_url":"https://api.github.com/users/derrickmar/repos","events_url":"https://api.github.com/users/derrickmar/events{/privacy}","received_events_url":"https://api.github.com/users/derrickmar/received_events","type":"User","site_admin":false},"body":"DISCLAIMER: I still need to test more, but this is my hunch of what high-level is currently happening.\r\n\r\n**What was happening**\r\nSpecifically, when I specify `'mountPath': '/home',` and my WORKDIR in my container's Dockerfile specifies any subdirectory of the mountPath (i.e. `WORKDIR /home/jovyan`) , the container fails to startup. It appears to be that it cannot find any executables since I get errors such as `Container command <BLANK>  not found or does not exist`. Additionally, this issue only happens when the persistent volume claim doesn't exist and is created/assigned.\r\n\r\n**Why it was happening**\r\nThe mounting happens at runtime AFTER all the commands in the Docker container which occur at docker-build time (except for the CMD one). So these subdirectories of '/home' that were created at docker-build time get hidden due to the mounting to the pvc. We were running commmands in a hidden directory which is why I think we couldn't find any executables.\r\n\r\n**The temporary fix**\r\nMake sure the WORKDIR command is NOT a subdirectory of the mountPath specified in jupyterhub_config.py. \r\n\r\n**Ideal fix**\r\nIdeally, we want the WORKDIR to /home/<username> because the user should really only be adding files from the notebook server browser in /home/<username>. But since this is a subdirectory of the mount path we'll have to figure out how to do that. The general idea is that we have to cd into /home/jovyan AFTER the mount happens. Something like this may work... I'll explore in the future.\r\n\r\n```\r\nCMD tini -- /bin/bash -c \"cd /home/jovyan && jupyterhub-singleuser \\\r\n  --port=8888 \\\r\n  --ip=0.0.0.0 \\\r\n  --user=\"$JPY_USER\" \\\r\n  --cookie-name=$JPY_COOKIE_NAME \\\r\n  --base-url=$JPY_BASE_URL \\\r\n  --hub-prefix=$JPY_HUB_PREFIX \\\r\n  --hub-api-url=$JPY_HUB_API_URL\"\r\n```\r\n\r\n**How to test**\r\n- Start with a clean deployment. That means delete all pods, pvc's, pv's, etc...\r\n- Run deployment and make sure you can launch a notebook and do stuff and save file\r\n- Delete user pod\r\n- Launch user pod and make sure files are still persisted.\r\n","created_at":"2016-12-03T01:29:20Z","updated_at":"2016-12-03T01:29:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22376b97f4aef1b9435cbdd71b6a5d17604b502b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73/commits","review_comments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73/comments","review_comment_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/comments{/number}","comments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/73/comments","statuses_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/statuses/cfd1e5d7e59c0c7238a828b8771d58029fd76e37","head":{"label":"data-8:fix_tini","ref":"fix_tini","sha":"cfd1e5d7e59c0c7238a828b8771d58029fd76e37","user":{"login":"data-8","id":12195212,"avatar_url":"https://avatars.githubusercontent.com/u/12195212?v=3","gravatar_id":"","url":"https://api.github.com/users/data-8","html_url":"https://github.com/data-8","followers_url":"https://api.github.com/users/data-8/followers","following_url":"https://api.github.com/users/data-8/following{/other_user}","gists_url":"https://api.github.com/users/data-8/gists{/gist_id}","starred_url":"https://api.github.com/users/data-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-8/subscriptions","organizations_url":"https://api.github.com/users/data-8/orgs","repos_url":"https://api.github.com/users/data-8/repos","events_url":"https://api.github.com/users/data-8/events{/privacy}","received_events_url":"https://api.github.com/users/data-8/received_events","type":"Organization","site_admin":false},"repo":{"id":71194479,"name":"jupyterhub-k8s","full_name":"data-8/jupyterhub-k8s","owner":{"login":"data-8","id":12195212,"avatar_url":"https://avatars.githubusercontent.com/u/12195212?v=3","gravatar_id":"","url":"https://api.github.com/users/data-8","html_url":"https://github.com/data-8","followers_url":"https://api.github.com/users/data-8/followers","following_url":"https://api.github.com/users/data-8/following{/other_user}","gists_url":"https://api.github.com/users/data-8/gists{/gist_id}","starred_url":"https://api.github.com/users/data-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-8/subscriptions","organizations_url":"https://api.github.com/users/data-8/orgs","repos_url":"https://api.github.com/users/data-8/repos","events_url":"https://api.github.com/users/data-8/events{/privacy}","received_events_url":"https://api.github.com/users/data-8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/data-8/jupyterhub-k8s","description":"Data 8's deployment of JupyterHub on Kubernetes (work in progress)","fork":false,"url":"https://api.github.com/repos/data-8/jupyterhub-k8s","forks_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/forks","keys_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/teams","hooks_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/hooks","issue_events_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/events{/number}","events_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/events","assignees_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/assignees{/user}","branches_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/branches{/branch}","tags_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/tags","blobs_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/refs{/sha}","trees_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/statuses/{sha}","languages_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/languages","stargazers_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/stargazers","contributors_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/contributors","subscribers_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/subscribers","subscription_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/subscription","commits_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/commits{/sha}","git_commits_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/commits{/sha}","comments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/comments{/number}","issue_comment_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/comments{/number}","contents_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/contents/{+path}","compare_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/merges","archive_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/downloads","issues_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues{/number}","pulls_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls{/number}","milestones_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/milestones{/number}","notifications_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/labels{/name}","releases_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/releases{/id}","deployments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/deployments","created_at":"2016-10-18T01:00:09Z","updated_at":"2016-12-01T01:08:50Z","pushed_at":"2016-12-03T01:29:20Z","git_url":"git://github.com/data-8/jupyterhub-k8s.git","ssh_url":"git@github.com:data-8/jupyterhub-k8s.git","clone_url":"https://github.com/data-8/jupyterhub-k8s.git","svn_url":"https://github.com/data-8/jupyterhub-k8s","homepage":"","size":166,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":13,"default_branch":"master"}},"base":{"label":"data-8:master","ref":"master","sha":"dc0c78b5e0f84194f45f14586e5e9b50b5969e0a","user":{"login":"data-8","id":12195212,"avatar_url":"https://avatars.githubusercontent.com/u/12195212?v=3","gravatar_id":"","url":"https://api.github.com/users/data-8","html_url":"https://github.com/data-8","followers_url":"https://api.github.com/users/data-8/followers","following_url":"https://api.github.com/users/data-8/following{/other_user}","gists_url":"https://api.github.com/users/data-8/gists{/gist_id}","starred_url":"https://api.github.com/users/data-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-8/subscriptions","organizations_url":"https://api.github.com/users/data-8/orgs","repos_url":"https://api.github.com/users/data-8/repos","events_url":"https://api.github.com/users/data-8/events{/privacy}","received_events_url":"https://api.github.com/users/data-8/received_events","type":"Organization","site_admin":false},"repo":{"id":71194479,"name":"jupyterhub-k8s","full_name":"data-8/jupyterhub-k8s","owner":{"login":"data-8","id":12195212,"avatar_url":"https://avatars.githubusercontent.com/u/12195212?v=3","gravatar_id":"","url":"https://api.github.com/users/data-8","html_url":"https://github.com/data-8","followers_url":"https://api.github.com/users/data-8/followers","following_url":"https://api.github.com/users/data-8/following{/other_user}","gists_url":"https://api.github.com/users/data-8/gists{/gist_id}","starred_url":"https://api.github.com/users/data-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-8/subscriptions","organizations_url":"https://api.github.com/users/data-8/orgs","repos_url":"https://api.github.com/users/data-8/repos","events_url":"https://api.github.com/users/data-8/events{/privacy}","received_events_url":"https://api.github.com/users/data-8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/data-8/jupyterhub-k8s","description":"Data 8's deployment of JupyterHub on Kubernetes (work in progress)","fork":false,"url":"https://api.github.com/repos/data-8/jupyterhub-k8s","forks_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/forks","keys_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/teams","hooks_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/hooks","issue_events_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/events{/number}","events_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/events","assignees_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/assignees{/user}","branches_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/branches{/branch}","tags_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/tags","blobs_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/refs{/sha}","trees_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/statuses/{sha}","languages_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/languages","stargazers_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/stargazers","contributors_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/contributors","subscribers_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/subscribers","subscription_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/subscription","commits_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/commits{/sha}","git_commits_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/git/commits{/sha}","comments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/comments{/number}","issue_comment_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/comments{/number}","contents_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/contents/{+path}","compare_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/merges","archive_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/downloads","issues_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues{/number}","pulls_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls{/number}","milestones_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/milestones{/number}","notifications_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/labels{/name}","releases_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/releases{/id}","deployments_url":"https://api.github.com/repos/data-8/jupyterhub-k8s/deployments","created_at":"2016-10-18T01:00:09Z","updated_at":"2016-12-01T01:08:50Z","pushed_at":"2016-12-03T01:29:20Z","git_url":"git://github.com/data-8/jupyterhub-k8s.git","ssh_url":"git@github.com:data-8/jupyterhub-k8s.git","clone_url":"https://github.com/data-8/jupyterhub-k8s.git","svn_url":"https://github.com/data-8/jupyterhub-k8s","homepage":"","size":166,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73"},"html":{"href":"https://github.com/data-8/jupyterhub-k8s/pull/73"},"issue":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/73"},"comments":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/data-8/jupyterhub-k8s/statuses/cfd1e5d7e59c0c7238a828b8771d58029fd76e37"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":9,"deletions":6,"changed_files":2}}
{"actor":{"display_login":"derrickmar"}}