{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/56394312","id":56394312,"diff_hunk":"@@ -565,6 +565,50 @@ func PodToSystemd(p *stage1commontypes.Pod, interactive bool, flavor string, pri\n \treturn nil\n }\n \n+// evaluateAppMountPath tries to resolve symlinks within the path.\n+// It returns the actual relative path for the given path.\n+// TODO(yifan): This is a temporal fix for systemd-nspawn not handling symlink mounts well.\n+func evaluateAppMountPath(appRootfs, path string) (string, error) {\n+\tlink := appRootfs\n+\n+\tpaths := strings.Split(path, \"/\")\n+\tfor i, p := range paths {","path":"stage1/init/common/pod.go","position":11,"original_position":11,"commit_id":"ffb48503b547ecfde72991eb5080ceac625f8c4e","original_commit_id":"ffb48503b547ecfde72991eb5080ceac625f8c4e","user":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"body":"@alban I think these cases are handled by filepath.Join() as well:\r\nhttps://play.golang.org/p/4czDr7xAEK\r\n","created_at":"2016-03-16T18:56:39Z","updated_at":"2016-03-16T18:56:39Z","html_url":"https://github.com/coreos/rkt/pull/2290#discussion_r56394312","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/2290","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/56394312"},"html":{"href":"https://github.com/coreos/rkt/pull/2290#discussion_r56394312"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2290"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/2290","id":63090040,"html_url":"https://github.com/coreos/rkt/pull/2290","diff_url":"https://github.com/coreos/rkt/pull/2290.diff","patch_url":"https://github.com/coreos/rkt/pull/2290.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/2290","number":2290,"state":"open","locked":false,"title":"stage1: Temporary fix for symlink mount issue.","user":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"body":"nspawn doesn't handle a mount operation correctly if the container path contains a symlink.\r\nThis tries to fix the problem in rkt by evaluating the mount path and resolve any symlinks before passing the mount path to nspawn.\r\n\r\ncc @alban @iaguis @jonboulle @sjpotter","created_at":"2016-03-16T16:03:23Z","updated_at":"2016-03-16T18:56:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b1e8a91a8b0025ac0b6bcefe7c74dabbc938946","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/2290/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/2290/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/2290/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/ffb48503b547ecfde72991eb5080ceac625f8c4e","head":{"label":"yifan-gu:fix_symlink","ref":"fix_symlink","sha":"ffb48503b547ecfde72991eb5080ceac625f8c4e","user":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"repo":{"id":31437138,"name":"rocket","full_name":"yifan-gu/rocket","owner":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yifan-gu/rocket","description":"App Container runtime","fork":true,"url":"https://api.github.com/repos/yifan-gu/rocket","forks_url":"https://api.github.com/repos/yifan-gu/rocket/forks","keys_url":"https://api.github.com/repos/yifan-gu/rocket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yifan-gu/rocket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yifan-gu/rocket/teams","hooks_url":"https://api.github.com/repos/yifan-gu/rocket/hooks","issue_events_url":"https://api.github.com/repos/yifan-gu/rocket/issues/events{/number}","events_url":"https://api.github.com/repos/yifan-gu/rocket/events","assignees_url":"https://api.github.com/repos/yifan-gu/rocket/assignees{/user}","branches_url":"https://api.github.com/repos/yifan-gu/rocket/branches{/branch}","tags_url":"https://api.github.com/repos/yifan-gu/rocket/tags","blobs_url":"https://api.github.com/repos/yifan-gu/rocket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yifan-gu/rocket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yifan-gu/rocket/git/refs{/sha}","trees_url":"https://api.github.com/repos/yifan-gu/rocket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yifan-gu/rocket/statuses/{sha}","languages_url":"https://api.github.com/repos/yifan-gu/rocket/languages","stargazers_url":"https://api.github.com/repos/yifan-gu/rocket/stargazers","contributors_url":"https://api.github.com/repos/yifan-gu/rocket/contributors","subscribers_url":"https://api.github.com/repos/yifan-gu/rocket/subscribers","subscription_url":"https://api.github.com/repos/yifan-gu/rocket/subscription","commits_url":"https://api.github.com/repos/yifan-gu/rocket/commits{/sha}","git_commits_url":"https://api.github.com/repos/yifan-gu/rocket/git/commits{/sha}","comments_url":"https://api.github.com/repos/yifan-gu/rocket/comments{/number}","issue_comment_url":"https://api.github.com/repos/yifan-gu/rocket/issues/comments{/number}","contents_url":"https://api.github.com/repos/yifan-gu/rocket/contents/{+path}","compare_url":"https://api.github.com/repos/yifan-gu/rocket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yifan-gu/rocket/merges","archive_url":"https://api.github.com/repos/yifan-gu/rocket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yifan-gu/rocket/downloads","issues_url":"https://api.github.com/repos/yifan-gu/rocket/issues{/number}","pulls_url":"https://api.github.com/repos/yifan-gu/rocket/pulls{/number}","milestones_url":"https://api.github.com/repos/yifan-gu/rocket/milestones{/number}","notifications_url":"https://api.github.com/repos/yifan-gu/rocket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yifan-gu/rocket/labels{/name}","releases_url":"https://api.github.com/repos/yifan-gu/rocket/releases{/id}","deployments_url":"https://api.github.com/repos/yifan-gu/rocket/deployments","created_at":"2015-02-27T20:12:42Z","updated_at":"2015-04-01T01:18:09Z","pushed_at":"2016-03-16T16:12:38Z","git_url":"git://github.com/yifan-gu/rocket.git","ssh_url":"git@github.com:yifan-gu/rocket.git","clone_url":"https://github.com/yifan-gu/rocket.git","svn_url":"https://github.com/yifan-gu/rocket","homepage":"","size":19256,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"95e6bccbb453dbc177d7f00efa57231b2e02a848","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rkt","full_name":"coreos/rkt","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rkt","description":"rkt is an App Container runtime for Linux","fork":false,"url":"https://api.github.com/repos/coreos/rkt","forks_url":"https://api.github.com/repos/coreos/rkt/forks","keys_url":"https://api.github.com/repos/coreos/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rkt/teams","hooks_url":"https://api.github.com/repos/coreos/rkt/hooks","issue_events_url":"https://api.github.com/repos/coreos/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rkt/events","assignees_url":"https://api.github.com/repos/coreos/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rkt/tags","blobs_url":"https://api.github.com/repos/coreos/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rkt/languages","stargazers_url":"https://api.github.com/repos/coreos/rkt/stargazers","contributors_url":"https://api.github.com/repos/coreos/rkt/contributors","subscribers_url":"https://api.github.com/repos/coreos/rkt/subscribers","subscription_url":"https://api.github.com/repos/coreos/rkt/subscription","commits_url":"https://api.github.com/repos/coreos/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rkt/merges","archive_url":"https://api.github.com/repos/coreos/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rkt/downloads","issues_url":"https://api.github.com/repos/coreos/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rkt/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/rkt/deployments","created_at":"2014-11-11T23:13:18Z","updated_at":"2016-03-16T09:30:45Z","pushed_at":"2016-03-16T18:21:02Z","git_url":"git://github.com/coreos/rkt.git","ssh_url":"git@github.com:coreos/rkt.git","clone_url":"https://github.com/coreos/rkt.git","svn_url":"https://github.com/coreos/rkt","homepage":"","size":23089,"stargazers_count":5312,"watchers_count":5312,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":478,"mirror_url":null,"open_issues_count":254,"forks":478,"open_issues":254,"watchers":5312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2290"},"html":{"href":"https://github.com/coreos/rkt/pull/2290"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/2290"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/2290/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2290/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2290/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/ffb48503b547ecfde72991eb5080ceac625f8c4e"}}}}