{"action":"created","issue":{"url":"https://api.github.com/repos/hyperhq/hyperstart/issues/67","repository_url":"https://api.github.com/repos/hyperhq/hyperstart","labels_url":"https://api.github.com/repos/hyperhq/hyperstart/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/hyperhq/hyperstart/issues/67/comments","events_url":"https://api.github.com/repos/hyperhq/hyperstart/issues/67/events","html_url":"https://github.com/hyperhq/hyperstart/pull/67","id":145522056,"number":67,"title":"recreate docker init layer files","user":{"login":"bergwolf","id":88972,"avatar_url":"https://avatars.githubusercontent.com/u/88972?v=3","gravatar_id":"","url":"https://api.github.com/users/bergwolf","html_url":"https://github.com/bergwolf","followers_url":"https://api.github.com/users/bergwolf/followers","following_url":"https://api.github.com/users/bergwolf/following{/other_user}","gists_url":"https://api.github.com/users/bergwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/bergwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergwolf/subscriptions","organizations_url":"https://api.github.com/users/bergwolf/orgs","repos_url":"https://api.github.com/users/bergwolf/repos","events_url":"https://api.github.com/users/bergwolf/events{/privacy}","received_events_url":"https://api.github.com/users/bergwolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-03T17:37:25Z","updated_at":"2016-04-04T17:21:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hyperhq/hyperstart/pulls/67","html_url":"https://github.com/hyperhq/hyperstart/pull/67","diff_url":"https://github.com/hyperhq/hyperstart/pull/67.diff","patch_url":"https://github.com/hyperhq/hyperstart/pull/67.patch"},"body":"So that it is possible for the container creation code to skip\r\nthe init layer all together.\r\n"},"comment":{"url":"https://api.github.com/repos/hyperhq/hyperstart/issues/comments/205403147","html_url":"https://github.com/hyperhq/hyperstart/pull/67#issuecomment-205403147","issue_url":"https://api.github.com/repos/hyperhq/hyperstart/issues/67","id":205403147,"user":{"login":"laijs","id":125671,"avatar_url":"https://avatars.githubusercontent.com/u/125671?v=3","gravatar_id":"","url":"https://api.github.com/users/laijs","html_url":"https://github.com/laijs","followers_url":"https://api.github.com/users/laijs/followers","following_url":"https://api.github.com/users/laijs/following{/other_user}","gists_url":"https://api.github.com/users/laijs/gists{/gist_id}","starred_url":"https://api.github.com/users/laijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laijs/subscriptions","organizations_url":"https://api.github.com/users/laijs/orgs","repos_url":"https://api.github.com/users/laijs/repos","events_url":"https://api.github.com/users/laijs/events{/privacy}","received_events_url":"https://api.github.com/users/laijs/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T17:21:02Z","updated_at":"2016-04-04T17:21:02Z","body":"I copy one of my note in the code here:\r\n\r\nhyperstart already create mountpoint when it need to mount something.\r\n\r\nbut container_recreate_file() might be still need with some changes.\r\n\r\ncurrent hyperstart creates the mountpoints without unlink them at first.\r\nit will have problems when the user intently create the mountpoint in they image at first.\r\n1) file type dismatch (fail to mount)\r\n2) file permission dismatch (user process might fail)\r\n\r\nbut these hardly happen (only when the user intently create the wrong\r\nmountpoint in they image at first.) But IMO, it is the user's responsibility for the fail.\r\nand in most cases, the container doesn't touch the rootfs(`hyper run ubuntu ls`),\r\nand the `unlink` adds burden to the storage driver (especially rbd driver).\r\n\r\nI think we can check the files, if the file type & mode match we don't unlink them?\r\n\r\n"}}